CVE-2026-15697 Overview
CVE-2026-15697 is a prototype pollution vulnerability in the svgdotjs/svg.js JavaScript library through version 3.2.5. The flaw resides in the EventTarget.on function exposed via the npm Package API. An attacker who can influence input to this function can trigger improperly controlled modification of object prototype attributes, categorized as [CWE-94] code injection through prototype manipulation. The issue was reported to the project through a public issue tracker but has not yet received a response from the maintainers.
Critical Impact
Remote attackers with low privileges can pollute JavaScript object prototypes in applications that pass attacker-influenced data into the vulnerable EventTarget.on handler, potentially altering downstream application behavior.
Affected Products
- svgdotjs svg.js versions up to and including 3.2.5
- npm packages that consume the vulnerable svg.js API surface
- Web applications and Node.js services bundling the affected library
Discovery Timeline
- 2026-07-14 - CVE-2026-15697 published to NVD
- 2026-07-15 - Last updated in NVD database
Technical Details for CVE-2026-15697
Vulnerability Analysis
The vulnerability affects the EventTarget.on function within svgdotjs/svg.js. This function registers event handlers on SVG objects and accepts caller-supplied keys used to index into internal event maps. When these keys are not validated against reserved property names, the library writes to prototype-chain properties instead of the intended own-property namespace. This leads to prototype pollution, a class of flaw where attacker-controlled input mutates Object.prototype or other shared prototypes. Downstream code that later reads properties from plain objects can observe the polluted values, changing control flow, bypassing security checks, or introducing unexpected behavior in the host application.
Root Cause
The root cause is missing validation of property names passed into event registration logic. Keys such as __proto__, constructor, or prototype are treated as normal event identifiers and assigned onto shared object structures. Because the library exposes this behavior through its public npm API, any consumer that forwards untrusted input into EventTarget.on inherits the flaw.
Attack Vector
The attack vector is network-based and requires low privileges with no user interaction. An attacker submits crafted input, typically through an application feature that binds SVG events using user-controlled names, causing the library to write attacker-chosen values onto object prototypes. Exploitation impact depends on how the host application uses object properties after pollution, and may enable configuration tampering, denial of service, or logic bypass. See the GitHub SVG.js Issue #1343 and VulDB CVE-2026-15697 entry for additional technical detail.
Detection Methods for CVE-2026-15697
Indicators of Compromise
- Unexpected property values appearing on plain objects such as Object.prototype at runtime
- Application logs showing event handler registration using suspicious keys like __proto__, constructor, or prototype
- HTTP request payloads containing prototype-related keys targeted at endpoints that process SVG or event configuration data
Detection Strategies
- Perform Software Composition Analysis (SCA) across build artifacts and package-lock.json files to identify svg.js versions at or below 3.2.5
- Instrument JavaScript runtimes to detect writes to Object.prototype and other shared prototypes during request handling
- Review application code paths that forward user-controlled strings into EventTarget.on or similar event binding APIs
Monitoring Recommendations
- Enable dependency scanning in CI/CD pipelines to flag vulnerable svg.js releases before deployment
- Monitor web application firewall (WAF) telemetry for request bodies containing __proto__, constructor.prototype, or nested prototype keys
- Track exception rates and unexpected type errors in front-end and Node.js services that render SVG content
How to Mitigate CVE-2026-15697
Immediate Actions Required
- Inventory all applications and services depending on svgdotjs/svg.js and record the installed version
- Sanitize any input passed to EventTarget.on by rejecting keys equal to __proto__, constructor, or prototype
- Apply input validation at the application layer to constrain event names to an allow-list of expected identifiers
Patch Information
At the time of publication, the maintainers of svg.js had not responded to the public issue report, and no fixed release is listed in the NVD entry. Consumers should monitor the svgdotjs/svg.js GitHub repository and GitHub SVG.js Issue #1343 for a patched version and upgrade once available.
Workarounds
- Wrap calls to EventTarget.on with a validation layer that rejects reserved property names before invocation
- Freeze Object.prototype early in application startup using Object.freeze(Object.prototype) where compatibility allows
- Use Object.create(null) for internal maps that store event names to avoid inherited prototype exposure
- Isolate SVG rendering in sandboxed contexts such as separate workers or iframes where prototype pollution cannot affect security-sensitive code
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

