binary-parser Code Injection Flaw CVE-2026-134814 Allows JavaScript Execution via Crafted Parser Definitions (Fixed in 2.3.1)
A critical code injection vulnerability, CVE-2026-134814 (CVSS 9.2 / 8.1 per the article), affects the binary-parser Node.js library in versions before 2.3.1. An attacker who controls parser definitions can inject JavaScript that runs in the Node.js process when the parser is compiled. The maintainer Keichi Takahashi published an advisory on November 11, 2026. The flaw is described as an incomplete fix for CVE-2026-1245 (CVSS 6.5), which was fixed in January 2026. Upwind Security also commented on the flaw. No exploitation in the wild is reported. This research could not be checked against external sources, so the report relies on the article alone.
Entenda a falha
A vulnerabilidade
CVE-2026-134814 is a code injection flaw in the binary-parser Node.js library, in versions before 2.3.1 (fixed in 2.3.1). It is rated CVSS 9.2 / 8.1. An attacker who controls the parser definition can inject JavaScript through string options such as length, lengthInBytes, key, tag, offset and the namely() alias. The code runs in the Node.js process when the parser is compiled. Parsing untrusted binary data with a trusted parser definition is not affected, which limits real-world exposure.
Como funciona
The library builds a parser by generating JavaScript source from the definition and compiling it. Some string options from the definition are placed into that generated code by Context.generateOption(). If an option holds a crafted string instead of a plain field reference, it becomes part of the generated code. It then runs when the parser is compiled, inside the host Node.js process.
Por que é vulnerável
The root cause is missing validation: user-controlled string options were inserted directly into generated JavaScript. The flaw is described as an incomplete fix for CVE-2026-1245 (CVSS 6.5), an earlier code injection fixed in January 2026 that came from insufficient validation of field names and encoding parameters. Version 2.3.1 validates these options as identifier paths such as foo or $parent.len. Expressions such as len - 1 are now rejected, and a function must be used instead.
Onde está
The NVD description and the maintainer's advisory point to Context.generateOption(), which handles the length, lengthInBytes, key, tag, offset and namely() alias options.
Como foi descoberta
The articles do not say who found the flaw or how. The maintainer, Keichi Takahashi, published an advisory on November 11, 2026, and the NVD carries a description of it. Upwind Security commented on it in an X post. The flaw is an incomplete fix for CVE-2026-1245, fixed in January 2026. No exploitation in the wild is reported.
Explicação gerada por IA a partir da matéria e dos artigos, em 23/11/2026 11:15.
Detalhes técnicos
Some string-typed options were inserted unvalidated into generated JavaScript by Context.generateOption(). The affected options are length, lengthInBytes, key, tag, offset and the alias passed to namely(). Exploitation requires control over the parser definition. Per the maintainer, parsing untrusted binary data with a trusted parser definition is not affected, which limits real-world exposure.
Remediação
Update to binary-parser 2.3.1 or later. The options are now validated as identifier paths, such as foo or $parent.len. Expressions such as len - 1 are rejected, so use a function instead. Do not build parser definitions from untrusted input.
Linha do tempo
-
binary-parser Code Injection Flaw CVE-2026-134814 Allows JavaScript Execution via Crafted Parser Definitions (Fixed in 2.3.1)
ler a análise desta fonte ocultar
A critical code injection vulnerability, CVE-2026-134814 (CVSS 9.2 / 8.1 per the article), affects the binary-parser Node.js library in versions before 2.3.1. An attacker who controls parser definitions can inject JavaScript that runs in the Node.js process when the parser is compiled. The maintainer Keichi Takahashi published an advisory on November 11, 2026. The flaw is described as an incomplete fix for CVE-2026-1245 (CVSS 6.5), which was fixed in January 2026. Upwind Security also commented on the flaw. No exploitation in the wild is reported. This research could not be checked against external sources, so the report relies on the article alone.
Technical Details
Some string-typed options were inserted unvalidated into generated JavaScript by
Context.generateOption(). The affected options arelength,lengthInBytes,key,tag,offsetand the alias passed tonamely(). Exploitation requires control over the parser definition. Per the maintainer, parsing untrusted binary data with a trusted parser definition is not affected, which limits real-world exposure.Remediation
Update to binary-parser 2.3.1 or later. The options are now validated as identifier paths, such as
fooor$parent.len. Expressions such aslen - 1are rejected, so use a function instead. Do not build parser definitions from untrusted input.