CVE-2026-134814 in binary-parserinfo

Summary

by MITRE • 11/23/2026

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(). 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.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 11/23/2026

The vulnerability identified in binary-parser versions prior to 2.3.1 represents a critical code injection flaw rooted in insufficient input validation within the library's core parsing logic. This security issue specifically affects the Context.generateOption() method, which is responsible for processing configuration parameters that dictate how data structures are interpreted from raw byte streams. The fundamental technical failure lies in the acceptance of string-typed options without rigorous sanitization or type checking before they are integrated into the parser compilation process. When an attacker gains control over these parser definitions, typically through untrusted input sources such as network requests or file uploads that define binary data structures, they can manipulate specific properties including length, lengthInBytes, key, tag, offset, and notably() aliases to inject malicious JavaScript code.

From a technical perspective, the exploitation mechanism relies on how the library constructs functions dynamically during compilation. By supplying crafted values for parameters like offset or length, an attacker can cause the internal string concatenation or evaluation mechanisms to execute arbitrary commands within the Node.js runtime environment. This is not merely a data corruption issue but a direct path to remote code execution if the parser is compiled with untrusted definitions. The vulnerability exploits the trust relationship between the application and its parsing configuration, assuming that structural metadata provided by external parties will be safe for evaluation. However, because these values are passed directly into contexts where they influence executable logic or string interpolation without proper escaping or validation, the boundary between data and code is effectively blurred, allowing injection payloads to bypass standard security controls.

The operational impact of this vulnerability is severe, particularly in applications that process binary protocols from untrusted sources such as IoT devices, network packet analyzers, or file upload services. Successful exploitation allows an attacker to achieve arbitrary JavaScript execution within the Node.js process context. This can lead to full system compromise, including data exfiltration, modification of application state, installation of backdoors, or use of the compromised server for further attacks against internal networks. The severity is amplified by the fact that binary parsers are often used in high-throughput environments where performance optimizations may inadvertently bypass security checks, and because the vulnerability exists at a foundational level, it affects any downstream functionality relying on correctly parsed data structures derived from potentially hostile inputs.

To mitigate this risk, organizations must immediately upgrade to version 2.3.1 or later of binary-parser, which addresses these validation gaps by implementing stricter type checking and sanitization for all options passed through Context.generateOption(). For applications unable to update immediately due to dependency constraints, it is critical to enforce strict allow-listing on parser definitions received from external sources, ensuring that only predefined, trusted structures are processed. Additionally, developers should avoid using dynamic evaluation of user-supplied strings in parsing logic and instead rely on static configuration where possible. Implementing a Web Application Firewall with rules targeting injection patterns in binary data headers can also provide an additional layer of defense against exploitation attempts while remediation efforts are underway.

This vulnerability aligns with CWE-94, which describes Improper Control of Generation of Code (Code Injection), as the flaw allows attackers to inject and execute code through manipulated input parameters. In terms of offensive security frameworks, it maps to MITRE ATT&CK technique T1059, specifically Command and Scripting Interpreter sub-techniques such as JavaScript or Node.js, where adversaries leverage scripting languages to execute commands within a compromised environment. Understanding this mapping helps in configuring detection rules that monitor for unusual patterns in binary data parsing operations, particularly those involving dynamic string construction from untrusted sources.

Responsible

VulnCheck

Reservation

11/22/2026

Disclosure

11/23/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!