Technical assessment
The artifact is a proof-of-concept exploit for CVE-2026-40897, a sandbox bypass leading to remote code execution in the Math.js expression parser. It includes a vulnerable Node.js server (server.js) that evaluates user-supplied expressions via math.evaluate, a Dockerfile to build the vulnerable environment, and a README.md with step-by-step instructions to achieve a reverse shell by submitting a crafted expression that overwrites ArrayNode's internal .map to access Function.constructor.
Backdoor review
No backdoor observed in reviewed code
The supplied evidence consists of a Dockerfile, a README.md, and a server.js file that together demonstrate a proof-of-concept (PoC) for CVE-2026-40897, a sandbox bypass leading to remote code execution in Math.js. The server.js file implements a simple HTTP server that accepts mathematical expressions and evaluates them using a vulnerable version of Math.js (15.1.0). The README.md describes the vulnerability and provides a payload that exploits the expression parser to achieve reverse shell access. All observed behavior is consistent with the stated purpose of demonstrating the CVE. No concealed executable behavior, unrelated payloads, persistence mechanisms, credential theft, or other backdoor functionality was found in the reviewed text files.
Model confidence95%
AuthenticationNot required
Languagesjavascriptmarkdowndockerfile
Target softwaremathjs
Attack typesremote code executionsandbox bypassprototype pollution
Evidence & reasoningClassification basis · observed behavior · safety review
Technical evidenceClassification basis and observed behavior
Classification basis
The artifact contains a complete, executable exploit chain: a vulnerable server (server.js) that evaluates user input, a Dockerfile to reproduce the vulnerable environment, and a README with a specific payload and instructions to achieve a reverse shell. The payload is designed to exercise the vulnerability by overwriting internal object properties to execute arbitrary code, which is the definition of an exploit.
README.md:14-15README.md:44-61server.js:19-21Requirements
- A vulnerable Math.js version (13.1.1 to 15.1.1) must be installed and used to evaluate user-controlled expressions.
Dockerfile:3README.md:23 - The application must pass untrusted user input directly to math.evaluate without additional sanitization.
server.js:19-21README.md:70 - The attacker must have network access to the vulnerable server and a listener for the reverse shell.
README.md:47-50
Observed behavior
- The server.js file creates an HTTP server that accepts POST requests to /calculate, parses a JSON body containing an 'expr' field, splits it by newline, and passes the resulting array directly to math.evaluate.
server.js:13-21 - The README.md provides a multi-line JavaScript payload that uses reviver to obtain an ArrayNode, overwrites its .map property with a function that returns Function.constructor, and then uses a FunctionAssignmentNode to trigger internal code that calls the overwritten .map, ultimately executing a reverse shell command.
README.md:54-61 - The Dockerfile builds a container with Math.js version 15.1.0 (vulnerable), copies the server.js, and creates a flag file to demonstrate file system access after exploitation.
Dockerfile:1-6
Safety-review evidenceBehaviors behind the backdoor verdict
Observables
- Vulnerable Dependency
- mathjs@15.1.0The Dockerfile installs a version of Math.js known to be vulnerable to CVE-2026-40897, which is the subject of the PoC.
Dockerfile:3 - Exploit Payload
- JavaScript expression that overwrites ArrayNode.map to access Function.constructor and execute a reverse shell command.The README.md provides a multi-line expression that exploits the Math.js parser to achieve arbitrary code execution, consistent with the described CVE.
README.md:55-60 - Network Service
- HTTP server on port 3000 accepting POST /calculate with JSON body {"expr": "..."}The server.js file implements the vulnerable endpoint that evaluates user-supplied expressions, which is the attack surface for the PoC.
server.js:13-21
Review boundariesWhat the analysis did not establish
- The evidence includes one non-text media file (an image in the README) that was not analyzed; its content is not required for classification.
- The artifact's behavior is inferred from static code analysis and documentation; the code was not executed, and the exploit's reliability is not verified.
- One non-text media file (a PNG image embedded in server.js as a base64 data URI) was not analyzed; it appears to be a team logo and is unlikely to contain executable code.
- The review is limited to the static source code and documentation; runtime behavior or network interactions were not observed.
Model interpretationThis review is limited to the supplied PoC code and context. It does not assert that the code works or is safe to execute.