Vulnerability / Open Source 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. The parser options include - length lengthInBytes key tag offset, and the alias passed to namely() "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. "[The flaw] allows attackers controlling parser definitions to inject and execute arbitrary JavaScript within the host Node.js process upon parser compilation," Upwind Security said in an X post. Users are advised to update to the latest version of the library for optimal protection. Found this article interesting? Follow us on Google News, Twitter and LinkedIn to read more exclusive content we post.
Critical binary-parser Flaw Enables JavaScript Injection via Malicious Parser Definitions
Full Article
Original Source
Read the full article at Thehackernews →KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.