binary-parser Exposes Critical Code Injection Vulnerability
11/23/2026
binary-parser has a critical code injection vulnerability: controlling the parser definition can execute arbitrary JavaScript.
Key Points
•Vulnerability ID CVE-2026-134814, CVSS score 9.2/8.1, affects versions before 2.3.1.
•When an attacker controls the parser definition, they can inject JavaScript and execute it in the Node.js process.
•The root cause is that Context.generateOption() does not validate string options; fixed in 2.3.1.
Impact
•Node.js projects that use untrusted parser definitions are affected.
•Scenarios that only parse untrusted binary data while parser definitions are trusted are not affected.
Recommendations
1.Upgrade binary-parser to 2.3.1 or the latest version.
2.Review parser definitions and avoid using user input as options such as length and key.
3.Expressions such as len - 1 will be rejected; use a function instead.