DKDKCISSP
PolicyINCIDENT

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

A critical flaw in the binary-parser library enables JavaScript injection, allowing code execution through malicious parser definitions.

DKCISSP News Desk23 Nov 2026, 6:52 pm2 min read
Critical binary-parser Flaw Enables JavaScript Injection via Malicious Parser Definitions
Image courtesy of The Hacker News. Original report

A significant security vulnerability has been identified in the binary-parser library, which could let attackers execute arbitrary code if they control parser definitions. This flaw affects versions prior to 2.3.1 and has been assigned a CVE designation.

The vulnerability, tracked as CVE-2026-134814, carries a CVSS score of 9.2. It allows attackers who control parser definitions to inject JavaScript code through unvalidated string-typed options passed to the Context.generateOption() function. The flaw specifically impacts binary-parser versions before 2.3.1, making it critical for users of the library to take immediate action.

The mechanism of the attack involves attackers supplying crafted values for options such as length, key, and offset. When the parser is compiled, these unvalidated inputs can lead to the execution of arbitrary JavaScript within the Node.js process. This vulnerability arises from the direct insertion of user-controlled string options into generated JavaScript code without sufficient validation.

Binary-parser is a library used to parse binary data in Node.js applications. It allows developers to define how binary data structures should be interpreted. The library takes user-defined parser definitions and generates JavaScript code to handle the binary data. However, if these definitions are not properly validated, it can lead to code injection vulnerabilities, as seen in this case.

The flaw affects users of the binary-parser library who have not updated to version 2.3.1. The potential scale of the impact is significant, as many applications rely on this library for parsing binary data. Attackers gaining control over parser definitions could exploit this vulnerability to execute malicious code, leading to severe security breaches.

On November 11, 2026, the project maintainer released an advisory regarding the vulnerability, prompting users to update to the latest version of the library. This advisory highlighted that the new version includes validation for identifier paths, rejecting expressions that could lead to code injection, such as 'len - 1'.

It remains unclear how many users have yet to update their libraries or have been affected by this flaw. Additionally, the relationship between this vulnerability and a previous one, CVE-2026-1245, which was an incomplete fix for another code injection issue, raises questions about the overall security of the binary-parser library.

What security teams should do

  • Update to version 2.3.1 of the binary-parser library.
DKCISSP VIEWOur take, not reported fact

What it meansA critical vulnerability in the binary-parser library allows for JavaScript injection via unvalidated inputs, posing significant risks to applications using the library.

Ask your IT team this weekWhich applications in our environment use the binary-parser library? Have they been updated?What measures are in place to validate user-controlled inputs in our parsers?

DecisionThe IT team updates all instances of the binary-parser library to version 2.3.1, and security checks that this is completed.

MORE IN POLICY

More cybersecurity reporting

Researchers Demonstrate Ghostscript Sandbox-Escape RCE via Crafted File Uploads in Popular Apps22 Nov 2026, 10:33 amGnuPG Warns Critical GPGME Flaw Could Expose App Data via Malicious OpenPGP Keys21 Nov 2026, 4:36 pmHandling the NIST 800-171 Rev 3 Transition20 Nov 2026, 7:30 pmCISA Urges Immediate Patching of Java4Shell Flaw That Could Allow Remote Code Execution20 Nov 2026, 3:05 pm