{"answers":{"affected":"2 open source packages ship an affected version, including mathjs. It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-41139 in the wild and no public exploit code.","fix":"Upgrade mathjs to 15.2.0 or later.","what":"CVE-2026-41139 is a high-severity code injection vulnerability in josdejong mathjs, published on 7 May 2026. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-41139 and fix it if it is affected.\n\nWhat it is: CVE-2026-41139 is a high-severity code injection vulnerability in josdejong mathjs, published on 7 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2026-41139 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- mathjs (npm): affected from 13.1.0; fixed in 15.2.0\n- mathjs (npm): affected from 13.1.0; fixed in 15.2.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-41139/ (Markdown: https://insights.sbomify.com/CVE-2026-41139/index.md)","id":"CVE-2026-41139","markdown":"https://insights.sbomify.com/CVE-2026-41139/index.md","name":"CVE-2026-41139","record":{"aliases":["GHSA-5v89-rwgr-qj6g","GHSA-jvff-x2qm-6286"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"JavaScript math library","requires_auth":"low_privilege","summary":"Attackers can execute arbitrary JavaScript code via the expression parser in the mathjs library, requiring an upgrade to the latest version.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"mathjs","vendor":"mathjs"}],"cvss":{"score":8.8,"severity":"high","source":"cna","vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.0"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"},{"id":"CWE-915","name":"Improperly Controlled Modification of Dynamically-Determined Object Attributes"}],"description":"Math.js is an extensive math library for JavaScript and Node.js. From version 13.1.0 to before version 15.2.0, arbitrary JavaScript can be executed via the expression parser of mathjs. This issue has been patched in version 15.2.0.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Unsafe array index getter in mathjs","id":"CVE-2026-41139","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"code_injection","year":"2026"},"n_packages":2,"n_references":5,"next":{"headline":"Poetry: Path traversal in tar extraction on Python 3.10.0 - 3.10.12 and 3.11.0 - 3.11.4","id":"CVE-2026-41140"},"packages":[{"ecosystem":"npm","fixed":["15.2.0"],"introduced":["13.1.0"],"last_affected":[],"package":"mathjs","purl":null,"source":"GHSA-jvff-x2qm-6286"},{"ecosystem":"npm","fixed":["15.2.0"],"introduced":["13.1.0"],"last_affected":[],"package":"mathjs","purl":"pkg:npm/mathjs","source":"GHSA-jvff-x2qm-6286"}],"prev":{"headline":"Flowise: Remote code execution vulnerability in AirtableAgent.ts caused by lack of input verification when using `Pandas`.","id":"CVE-2026-41138"},"products":["mathjs"],"published":"2026-05-07","related":[{"cvss_score":8.8,"headline":"Math.js: Unsafe object property setter in mathjs","id":"CVE-2026-40897","kev_date_added":null,"published":"2026-04-24"},{"cvss_score":7.3,"headline":"Prototype Pollution","id":"CVE-2020-7743","kev_date_added":null,"published":"2020-10-13"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-07-15","vendors":["josdejong"]},"summary":"Attackers can execute arbitrary JavaScript code via the expression parser in the mathjs library, requiring an upgrade to the latest version.","url":"https://insights.sbomify.com/CVE-2026-41139/"}