Critical binary-parser flaw allows JavaScript injection through parser definitions

Summary
CVE-2026-134814 affects binary-parser versions before 2.3.1. Crafted string options in attacker-controlled parser definitions can inject JavaScript into the Node.js process when a parser is compiled; the maintainer advises updating.
Key points
- CVE-2026-134814 affects binary-parser versions prior to 2.3.1 and is described as a code-injection vulnerability.
- An attacker who controls parser definitions can supply crafted string options that are inserted into generated JavaScript without adequate validation.
- The flaw can execute arbitrary JavaScript in the host Node.js process when the parser is compiled.
- The maintainer said parsing untrusted binary data with a trusted parser definition is not affected.
- Version 2.3.1 validates the options as identifier paths; expressions such as `len - 1` are rejected, with functions suggested instead.
- The article describes the issue as an incomplete fix for CVE-2026-1245, a code-injection flaw fixed in January 2026.
Article Details
- Vulnerability Types
- Code injection
- Severity
- Critical (CVSS scores: 9.2 / 8.1)
- Affected Versions
- binary-parser versions prior to 2.3.1
- Exploitation Status
- unknown
- Exploit Availability
- unknown
- Patch Status
- available
MITRE ATT&CK
CVE
CVE-2026-1245binary-parser · binary-parserCVE-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 fieldCVE-2026-134814keichi · binary-parserThe 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.
People
Products
binary-parserA 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.Node.js"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."
