Math.js: When 1 + 1 Equals Root Shell (CVE-2017-1001003)
Jan 12, 2026·6 min read·4 visits
Executive Summary (TL;DR)
The math.js library attempted to block access to dangerous properties like `constructor` by comparing property names against a blacklist. However, it failed to normalize Unicode escape sequences before this check. An attacker could pass `co\u006Estructor`, which evades the textual blacklist but is resolved by the JavaScript engine to `constructor`. This grants access to the `Function` constructor, enabling arbitrary code execution on the host server.
A critical sandbox escape in the popular math.js library allows attackers to bypass property restrictions using Unicode escape sequences, leading to Remote Code Execution via the constructor chain.
Official Patches
Fix Analysis (1)
Technical Appendix
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HAffected Systems
Affected Versions Detail
| Product | Affected Versions | Fixed Version |
|---|---|---|
math.js Jos de Jong | < 3.17.0 | 3.17.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-88 |
| CVSS v3.0 | 9.8 (Critical) |
| Vector | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Attack Vector | Network (Input Injection) |
| EPSS Score | 0.48% |
| Exploit Status | PoC Available |
MITRE ATT&CK Mapping
Improper Neutralization of Argument Delimiters or Special Characters
Known Exploits & Detection
Vulnerability Timeline
Subscribe to updates
Get the latest CVE analysis reports delivered to your inbox.