Key facts
- The library called binary-parser has a code injection flaw tracked as CVE-2026-134814; versions older than 2.3.1 are affected and version 2.3.1 fixes it.
- The flaw sits in Context.generateOption(), where string-typed options are not properly validated.
- Crafted values for length, lengthInBytes, key, tag, offset or the namely() alias can trigger the injection.
- The project maintainer issued an advisory on November 11, 2026, saying user-controlled string options went straight into generated JavaScript code without proper validation.
Attackers who control parser definitions can run arbitrary JavaScript in the Node.js process through a code injection flaw tracked as CVE-2026-134814 in binary-parser versions older than 2.3.1, the library’s maintainer said in a November 11, 2026 advisory. The advisory said user-controlled string options went straight into generated JavaScript code without proper validation. Version 2.3.1 is the fixed release.
The vulnerability sits in Context.generateOption(), where string-typed options are not properly validated. Crafted values for length, lengthInBytes, key, tag, offset or the namely() alias can trigger the injection, allowing arbitrary JavaScript execution at parser compilation time. The patched library validates options as identifier paths such as foo and $parent.len, rejecting expressions such as len – 1 and telling users to use a function instead.
Keichi Takahashi, who maintains binary-parser, said trusted parser definitions remain safe even when the binary data is untrusted. “Parsing untrusted binary data with a trusted parser definition is not affected,” Takahashi said.
Zachariah Mithani of AploSec originally found and disclosed CVE-2026-134814, per the CVE Program record, and VulnCheck registered or reserved the CVE ID. Advisories disagree on severity, rating CVE-2026-134814 at CVSS 9.2 or 8.1.
CVE Brief describes the 8.1 rating as high severity and ties successful exploitation to integrity and availability risks for applications that parse data with the library. Successful exploitation could give an attacker full system compromise, unauthorized data access, or malicious payload execution on the host server. No public exploit is available for CVE-2026-134814, and cve.now reports that no exploitation in the wild has been observed.
The new flaw is an incomplete fix for CVE-2026-1245, which was fixed in January 2026 and scored 6.5. Both CVE-2026-1245 and CVE-2026-134814 arise from inserting untrusted parser input directly into dynamically generated JavaScript code without adequate validation, and the bug class recurs because the earlier fix was incomplete.
CVE-2026-1245 came from poor checks on field names and encoding parameters, and user-supplied parser field names and encoding parameters went directly into generated JavaScript code without validation or sanitization. At runtime, binary-parser creates JavaScript code through the Function constructor, which is central to how untrusted input becomes executable code.

Version 2.3.0 from the vendor adds input validation and reduces risks from unsafe code generation tied to CVE-2026-1245. The earlier flaw affected all versions of binary-parser before 2.3.0, before the vendor issued the fixed version. Its risk exists only when dynamic parser definitions are built from external or untrusted input sources, and static, hardcoded parser definitions are not affected by CVE-2026-1245. CERT/CC advised upgrading to version 2.3.0 or later and auditing apps that use externally sourced data in parser definitions.
Depending on where an application is deployed and what privileges it holds, exploiting CVE-2026-1245 might let an attacker reach local data, change how the application logic works, run system commands, or move sideways across networked infrastructure. Apps in enterprises that handle data from third parties run a higher danger from CVE-2026-1245.
The binary-parser library is commonly used to write efficient binary parsers in a simple, declarative manner, and services that parse untrusted binary data with attacker-controlled parser definitions face supply-chain exposure through arbitrary JavaScript execution in the Node.js process. Any application that uses binary-parser to parse data faces a high-severity threat to its integrity and availability at CVSS 8.1. Upwind Security advised users on social media to update to the latest version of the library.
Until patched, only compile parser definitions from trusted sources. Security teams should check application logs for strange JavaScript execution behavior or unexpected errors when the parser compiles, and they should apply strict input validation or sanitization to any data passed into parser definitions. Users should upgrade to version 2.3.1 or later.

Join the discussion