A critical security flaw has been disclosed in the popular binary-parser library that could allow an attacker who controls parser definitions to execute arbitrary code.

The vulnerability, tracked as CVE-2026-134814 (CVSS score: 9.2 / 8.1), is a case of code injection impacting binary-parser versions prior to 2.3.1.

"Binary-parser before 2.3.1 contains a code injection vulnerability that allows attackers controlling parser definitions to inject JavaScript through string-typed options passed unvalidated by Context.generateOption()," according to a description of the flaw in the NIST National Vulnerability Database (NVD).

"Attackers can supply crafted length, lengthInBytes, key, tag, offset, or namely() alias values to execute arbitrary JavaScript in the Node.js process when the parser is compiled.".

According to an advisory released by the project maintainer on November 11, 2026, the problem arose from the fact that some user-controlled string options were inserted directly into the generated JavaScript code without adequate validation.

It has been revealed that "Parsing untrusted binary data with a trusted parser definition is not affected," Keichi Takahashi, who maintains the library, said. "These options are now validated as identifier paths (e.g. foo, $parent.len). Expressions such as 'len - 1' are rejected; use a function instead.".

CVE-2026-134814 can also be viewed as an incomplete fix for CVE-2026-1245 (CVSS score: 6.5), another code injection vulnerability that was fixed back in January 2026 and resulted from insufficient validation of field names and encoding parameters.

Industry observers note that "[The flaw] allows attackers controlling parser definitions to inject and execute arbitrary JavaScript within the host Node.js process upon parser compilation," Upwind Security noted in an X post. Users are advised to upgrade to the latest version of the library for optimal protection.

Discover why SHA pinning alone isn't enough and learn how to close hidden security gaps in your GitHub Actions pipelines.

Learn what 6,000 real-world attacks reveal about MFA weaknesses and how to stop AI-driven phishing and account takeovers.

Get the latest news, expert insights, exclusive resources, and strategies from industry leaders, all for free.

→ Read original article