Critical binary-parser Flaw Enables JavaScript Injection via Malicious Parser Definitions
Our summary
The widely used npm package binary-parser has received a fix for a severe code-injection flaw, tracked as CVE-2026-134814 with a CVSS score of 9.2/8.1. The bug affects all versions prior to 2.3.1 and stems from Context.generateOption() inserting user-supplied string values — such as length, lengthInBytes, key, tag, offset, or the alias given to namely() — directly into generated JavaScript without proper checks. Anyone able to control the parser definition could therefore run arbitrary JavaScript inside the Node.js process when the parser is compiled, though data parsed by an already-trusted definition remains safe. Maintainer Keichi Takahashi patched the issue on November 11, 2026, by restricting these fields to simple identifier paths and rejecting expressions, and the flaw is also described as a follow-up fix to the earlier CVE-2026-1245 from January 2026. Users should upgrade to the newest release of binary-parser as soon as possible.
The Hacker News publishes this story on its own site; we link to it rather than reprint it.
Worried this affects your company?
Discuss a security assessment of your internet-facing systems. Scope agreed before testing.