A newly disclosed vulnerability in the popular open-source binary-parserlibrary for Node.js allows attackers who control parser definitions to inject JavaScript code. Tracked as CVE-2026-134814 and rated “Critical” (CVSS 9.2 / 8.1), the flaw impacts versions prior to 2.3.1. A fix has been issued to close the hole.
How the Flaw Works
The issue lies in the library’s Context.generateOptionfunction, which processes various parser options like length, lengthInBytes, key, tag, offset, and aliases passed to namely. When those parameters are provided as strings and not validated, they can be interpolated directly into generated code. That enables attackers with control over the parser definition to inject arbitrary JavaScript into the Node.js process during parser compilation.
The discovery comes on the heels of a previous related flaw named CVE-2026-1245, which also involved improper validation of field names and encoding parameters—fixed earlier in 2026. This new vulnerability is considered an incomplete fix for that issue, as many of the underlying validation problems persisted.
Severity, Affected Versions & Mitigation
Because the exploit does not require user interaction or valid credentials—and may be triggered over the network with crafted parser definitions—the CVSS score was pegged at 9.2. Affected are all installations using binary-parserversions earlier than 2.3.1.
The maintainers fixed this issue in release 2.3.1 on November 11, 2026. The patch ensures that string-typed parameters now accept only valid identifier paths—expressions like len − 1are rejected; developers must use a function instead if such logic is needed.
There’s no public exploit known so far, and the vulnerability has not yet been added to CISA’s Known Exploited Vulnerabilities (KEV) catalog. But experts warn that systems taking schema- or JSON-driven parser definitions from untrusted sources are especially at risk.
What Users Should Do
- Identify whether your project uses binary-parser, and check whether the version is earlier than 2.3.1—vulnerable installs are those at 2.3.0 or below.
- Immediately upgrade to version 2.3.1 or later, which enforces stricter validation.
- Avoid compiling parser definitions sourced from untrusted input until you’re patched; consider sanitizing or allow-listing configuration values.
This vulnerability underscores how complex code-generation paths in open source libraries can expose critical security risks if input validation is lacking. As Node.js ecosystems increasingly rely on schema-driven parsing tools, the trust placed in configuration files—and where they originate—becomes a serious attack vector. Going forward, developers should scrutinize dependencies, check for stringent validation in parsing libraries, and monitor advisories like this closely before relying heavily on dynamic configurations. The speed of this patch suggests the community is paying attention—but what we still don’t know, such as whether any exploit has been seen in the wild, is what we’ll be watching for.