ShieldPack SHIELD PACK
With you since 2022

Where would you like to start?

Services, updates, and ways to contact us, all in one place

Pricing and orders →

Use the bot or chat with us—whichever you prefer

ShieldPack posts

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

About 3 min read

A critical security vulnerability has been disclosed in the widely used binary‑parser JavaScript library, allowing an attacker who can supply malicious parser definitions to execute arbitrary code inside a Node.js process. The flaw, catalogued as CVE‑2026‑134814, carries a CVSS base score of 9.2 (critical) and an environmental score of 8.1, and it affects every version of the library released before 2.3.1.
The problem stems from the way the library’s Context.generateOption function handles string‑typed options. When a developer provides options such as length, lengthInBytes, key, tag, offset or the alias namely(), the values are inserted directly into the JavaScript code that the parser compiles, without any validation of their content. An attacker who can control any of those option fields can therefore craft a payload that is interpreted as executable JavaScript, leading to code injection at parser compilation time. The vulnerability is limited to scenarios where the attacker can influence the parser definition; parsing untrusted binary data with a trusted, static parser definition remains safe.
Keichi Takahashi, the maintainer of binary‑parser, confirmed the issue in an advisory posted on November 11, 2026. He explained that the library now validates the affected options as identifier paths—strings that match simple identifiers such as foo or $parent.len. More complex expressions, for example ‘len - 1’, are rejected, and developers are encouraged to use a function to perform calculations instead of embedding them in the option string. This change is intended to block the injection vector by ensuring that only safe identifier syntax can reach the code‑generation stage.
The newly disclosed CVE‑2026‑134814 can be seen as an incomplete remediation of an earlier vulnerability, CVE‑2026‑1245, which received a CVSS score of 6.5. That earlier flaw, fixed in January 2026, also involved code injection but was limited to insufficient validation of field names and encoding parameters. While the January fix addressed those specific entry points, the November flaw reveals that other string options remained unchecked, reopening the attack surface for JavaScript injection.
Critical binary-parser Flaw Enables JavaScript Injection via Malicious Parser Definitions
Security firm Upwind Security highlighted the severity of the issue in a post on the social platform X, noting that the vulnerability enables arbitrary JavaScript execution within the host Node.js process as soon as the parser is compiled. Because the malicious code runs in the same runtime as the application, it can potentially access any resources available to the process, including file system access, network sockets, and environment variables, thereby escalating the impact far beyond a simple denial‑of‑service.
Developers who rely on binary‑parser in production environments are strongly urged to upgrade to version 2.3.1 or later, where the validation logic has been added. The upgrade not only patches CVE‑2026‑134814 but also incorporates the earlier fixes for CVE‑2026‑1245, providing a more comprehensive defense against code‑injection attacks. Projects that cannot immediately upgrade should audit their parser definitions for any user‑controlled strings passed to the vulnerable options and replace them with safe, function‑based alternatives wherever possible.
The broader implications for the Node.js ecosystem are notable. Binary‑parser is a common component in applications that need to interpret binary protocols, file formats, or network packets. An injection flaw in such a low‑level library can cascade into many downstream projects, potentially exposing a wide range of services—from IoT device gateways to financial transaction processors—to remote code execution. The incident underscores the importance of rigorous input validation in code‑generation utilities and serves as a reminder that even well‑maintained open‑source packages can harbor critical bugs if their internal code‑building mechanisms are not carefully sandboxed.
In summary, the CVE‑2026‑134814 vulnerability represents a high‑severity injection risk in the binary‑parser library prior to version 2.3.1, triggered by unchecked string options in parser definitions. The fix introduced in version 2.3.1 validates those options as simple identifier paths, rejecting complex expressions and thereby blocking the injection path. Users should apply the update immediately, review any custom parser definitions for unsafe strings, and monitor related advisories for further guidance.

Source: The Hacker News · Cybersecurity

ShieldPack media