Skip to content

fix(deps): update dependency mathjs to v15 [security]#4282

Open
renovate-bot wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
renovate-bot:renovate/npm-mathjs-vulnerability
Open

fix(deps): update dependency mathjs to v15 [security]#4282
renovate-bot wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
renovate-bot:renovate/npm-mathjs-vulnerability

Conversation

@renovate-bot
Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
mathjs (source) ^13.0.0^15.2.0 age confidence

GitHub Vulnerability Alerts

GHSA-jvff-x2qm-6286

Impact

Two security vulnerabilities where detected that allowed executing arbitrary JavaScript via the expression parser of mathjs. You can be affected when you have an application where users can evaluate arbitrary expressions using the mathjs expression parser.

Patches

The problem is patched in mathjs v15.2.0.

Workarounds

There is no workaround without upgrading.


Release Notes

josdejong/mathjs (mathjs)

v15.2.0

Compare Source

  • Feat: Add amp-hour charge unit Ah (#​3617). Thanks @​adrfantini.
  • Feat: #​3595 implement num and den functions returning the parts of
    a fraction (#​3605). Thanks @​AnslemHack.
  • Fix: Provide TypeScript types for [and/or]TransformDependencies (#​3639).
    Thanks @​NilsDietrich.
  • Fix: two security vulnerabilities that allowed executing arbitrary JavaScript
    via the expression parser. Thanks @​CykuTW for finding and reporting them.

v15.1.1

Compare Source

v15.1.0

Compare Source

v15.0.0

Compare Source

!!! BE CAREFUL: BREAKING CHANGES !!!

v14.9.1

Compare Source

  • Fix: issue in HISTORY.md listing all fixes of v14.8.2 under v14.9.0.

v14.9.0

Compare Source

v14.8.2

Compare Source

v14.8.1

Compare Source

  • Fix: #​3538 config printing a warning when using { number: 'bigint' }
    (#​3540).

v14.8.0

Compare Source

v14.7.0

Compare Source

  • Feat: faster DenseMatrix symbol iterator (#​3521). Thanks @​dvd101x.
  • Feat: implement serialization support for Parser, fixing #​3509 (#​3525).
  • Fix: #​3519, #​3368 categories "Core functions" and "Construction functions"
    missing from the generated function overview.
  • Fix: #​3517 printTransformDependencies not exported in the type definitions.
  • Fix: add missing type definition for function diff (#​3520). Thanks @​dodokw.
  • Fix: #​3396 improve documentation of function range.
  • Fix: #​3523 cleanup old polyfills from the browser bundle
    by removing core-js (#​3524).

v14.6.0

Compare Source

v14.5.3

Compare Source

v14.5.2

Compare Source

  • Fix: add embedded docs for the deprecated physical constant coulomb,
    see #​3472.
  • Fix: #​3469 add ResultSet interface and improve isResultSet typing
    (#​3481). Thanks @​ranidam.

v14.5.1

Compare Source

  • Fix: #​3482 mathjs throwing an error related to BigInt when loading in
    specific environments.
  • Fix: syntax section of function numeric (see #​3448).
  • Fix: #​3472 rename physical constant coulomb to coulombConstant. The old
    name is still available for backward compatibility.
  • Fix: support multiplication of arrays with units (#​3456). Thanks @​Delaney.

v14.5.0

Compare Source

v14.4.0

Compare Source

v14.3.1

Compare Source

  • Fix: #​3350 cannot import a constant that is a complex number.

v14.3.0

Compare Source

v14.2.1

Compare Source

  • Fix: #​3377 remove redundant dependency @lambdatest/node-tunnel.

v14.2.0

Compare Source

v14.1.0

Compare Source

  • Feat: implement bigint support in functions log, log2, log10,
    larger, smaller, max, min (#​3345). Thanks @​gwhitney.
  • Fix: #​3342 hexadecimal input not turned into a bigint (#​3348).
  • Fix randomInt() not working (#​3345).
  • Docs: fixed description of sign in the embedded docs (#​3338).
    Thanks @​witer33.

v14.0.1

Compare Source

v14.0.0

Compare Source

!!! BE CAREFUL: BREAKING CHANGES !!!

  • Feat: Upgrade to fraction.js@5, using bigint under the hood (#​3283).
  • Feat: Implement support for Unit in functions ceil, floor, and fix.
    Possible breaking changes in the type definitions of arrays and matrices
    due to the introduction of generics (#​3269). Thanks @​orelbn.
  • Feat: Implement support for log(x: Fraction, base: Fraction).
  • Fix: #​3301 precedence of % (mod) being higher than * and / (#​3311).
    Thanks @​nkumawat34.
  • Fix: #​3222 prevent math.import(...) from overriding units unless you
    specify { override: true } (#​3225).
  • Fix: #​3219 let functions dotDivide, dotPow, bitXor, xor, equal,
    larger, largerEq, smaller, smallerEq, and unequal return a sparse
    matrix when the input is two sparse matrices (#​3307). Thanks @​Aakash-Rana.
  • Fix: Improve type definitions of arrays (#​3306). Thanks @​orelbn.

v13.2.3

Compare Source

  • Fix: #​3260 improve type definitions and documentation on the callback
    indices of map, filter, and forEach.
  • Fix: #​3323 support functions in function clone.
  • Docs: fix a broken link in the documentation (#​3316).
    Thanks @​emmanuel-ferdman.

v13.2.2

Compare Source

v13.2.1

Compare Source

  • Update to the latest version of complex.js.
  • Fix Index.dimension(dim) accepting non-numeric input.
  • Fix: #​3290 should validate variables names in method Parser.set (#​3308).
    Thanks @​nkumawat34.

v13.2.0

Compare Source

  • Feat: improve performance of functions map, filter and forEach (#​3256).
    Thanks @​dvd101x.
  • Feat: improve performance of the methods map() and forEach()
    of DenseMatrix (#​3251). Thanks @​Galm007.
  • Fix: #​3253 cannot use identifiers containing special characters in function
    derivative.
  • Fix: improve the type definitions of ConstantNode to support all data
    types (#​3257). Thanks @​smith120bh.
  • Fix: #​3259 function symbolicEqual missing in the TypeScript definitions.
  • Fix: #​3246 function leafCount missing in the TypeScript definitions.
  • Fix: #​3267 implicit multiplication with a negative number and unit in.
  • Docs: fix broken links on the Configuration page. Thanks @​vassudanagunta.
  • Docs: document the syntax of map and forEach in the expression parser
    (#​3272). Thanks @​dvd101x.

v13.1.1

Compare Source

  • Fix security vulnerability in the CLI and web API allowing to call functions
    import, createUnit and reviver, allowing to get access to the internal
    math namespace and allowing arbitrary code execution. Thanks @​StarlightPWN.
  • Fix security vulnerability: when overwriting a rawArgs function with a
    non-rawArgs function, it was still called with raw arguments. This was both
    a functional issue and a security issue. Thanks @​StarlightPWN.
  • Fix security vulnerability: ensure that ObjectWrappingMap cannot delete
    unsafe properties. Thanks @​StarlightPWN.
  • Fix: not being able to use methods and properties on arrays inside the
    expression parser.

v13.1.0

Compare Source

  • Feat: support multiple inputs in function map (#​3228, #​3196).
    Thanks @​dvd101x.
  • Feat: add matrix datatypes in more cases (#​3235). Thanks @​dvd101x.
  • Feat: export util functions isMap, isPartitionedMap, and
    isObjectWrappingMap.
  • Fix: #​3241 function map not always working with matrices (#​3242).
    Thanks @​dvd101x.
  • Fix: #​3244 fix broken link to ResultSet in the docs about classes.
  • Docs: add a link to the documentation page about the syntax expression
    from the function evaluate (see #​3238).
  • Docs: improve the documentation of scope and fix the example
    custom_scope_objects.js (#​3150)
  • Docs: spelling fixes in the embedded docs (#​3252). Thanks @​dvd101x.

v13.0.3

Compare Source

  • Fix: #​3232 fix type definitions of function format to support notations
    hex, bin, and oct.
  • Fix: use more precise definitions for US liquid volume units (#​3229).
    Thanks @​Vistinum.
  • Fix: #​2286 types static methods and members for Unit class (#​3230).
    Thanks @​orelbn.

v13.0.2

Compare Source

v13.0.1

Compare Source


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • ""
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate-bot renovate-bot requested review from a team as code owners April 10, 2026 23:05
@product-auto-label product-auto-label bot added samples Issues that are directly related to samples. api: automl Issues related to the AutoML API. api: language Issues related to the Cloud Natural Language API API. labels Apr 10, 2026
@dpebot
Copy link
Copy Markdown
Contributor

dpebot commented Apr 10, 2026

/gcbrun

@trusted-contributions-gcf trusted-contributions-gcf bot added kokoro:force-run Add this label to force Kokoro to re-run the tests. actions:force-run labels Apr 10, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the mathjs dependency from version 13.0.0 to 15.2.0 in the automl and cloud-language packages. Feedback indicates that this update introduces a compatibility issue because mathjs v15 requires Node.js >= 18.0.0, while the engines field in both package.json files still specifies Node.js >= 16.0.0. The engines field needs to be updated to prevent installation or runtime issues for users on older Node.js versions.

"dependencies": {
"@google-cloud/automl": "^4.0.0",
"mathjs": "^13.0.0"
"mathjs": "^15.2.0"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The update to mathjs v15 introduces a requirement for Node.js >= 18.0.0. However, the engines field in this file (line 7) still specifies >=16.0.0, which is incompatible with this update. This mismatch will cause installation or runtime issues for users on Node.js 16. Please update the engines field to reflect the new requirement of the updated dependency.

"@google-cloud/language": "^6.1.0",
"@google-cloud/storage": "^7.0.0",
"mathjs": "^13.0.0",
"mathjs": "^15.2.0",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The update to mathjs v15 introduces a requirement for Node.js >= 18.0.0. However, the engines field in this file (line 6) still specifies >=16.0.0, which is incompatible with this update. This mismatch will cause installation or runtime issues for users on Node.js 16. Please update the engines field to reflect the new requirement of the updated dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

actions:force-run api: automl Issues related to the AutoML API. api: language Issues related to the Cloud Natural Language API API. kokoro:force-run Add this label to force Kokoro to re-run the tests. major samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants