CONNECT WITH US
Cyber Security

Cyber Security

Critical binary-parser Flaw Enables JavaScript Injection via Malicious Parser Definitions

The Hacker News logo

Published on

Add as a preferred source on Google
Critical binary-parser Flaw Enables JavaScript Injection via Malicious Parser Definitions

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.

"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.

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.


Source link

Disclaimer

We strive to uphold the highest ethical standards in all of our reporting and coverage. We TheMorningPulse.fyi want to be transparent with our readers about any potential conflicts of interest that may arise in our work. It's possible that some of the investors we feature may have connections to other businesses, including competitors or companies we write about. However, we want to assure our readers that this will not have any impact on the integrity or impartiality of our reporting. We are committed to delivering accurate, unbiased news and information to our audience, and we will continue to uphold our ethics and principles in all of our work. Thank you for your trust and support.