Summary
binary-parser before version 2.3.1 contains a code injection vulnerability (CVE-2026-134814) that allows arbitrary JavaScript to run in the Node.js process when a parser with crafted definitions is compiled. The CVSS 4.0 score is 9.2 and the severity is critical.
What happened
The binary-parser library, by keichi, passes certain string-typed options unvalidated through Context.generateOption(). An attacker who controls the parser definitions can supply crafted values in the length, lengthInBytes, key, tag or offset options, or in namely() aliases, resulting in JavaScript injection. That code runs in the Node.js process when the parser is compiled. The weakness is classified as CWE-94 (code injection).
Why it matters
Execution of arbitrary JavaScript in the Node.js process can compromise the application using the library. Exploitation requires the attacker to be able to influence the parser definitions. The CVSS 4.0 score is 9.2 (vector CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N), assigned by VulnCheck as CNA, and the severity is critical. According to CISA's KEV catalog, no known active exploitation is recorded. The source does not state that this is a zero-day.
Affected products and versions
binary-parser (vendor: keichi), versions before 2.3.1 (< 2.3.1).
| Product | Versions | Fixed in |
|---|---|---|
| keichi binary-parser | < 2.3.1 | — |
Action recommended by the source
The source states that versions before 2.3.1 are affected, and the advisory title uses that version as the boundary. It links a vendor advisory on GitHub (GHSA-xmxc-6c22-m377) and two fix commits in the keichi/binary-parser repository. Readers are advised to consult the vendor advisory for upgrade guidance; the source does not detail additional mitigations.
Sources and references
- https://github.com/keichi/binary-parser/security/advisories/GHSA-xmxc-6c22-m377 — CVE Program
- https://github.com/keichi/binary-parser/commit/110206bb126a80071158fb0e2e3d7cc658f2bfe4 — CVE Program
- https://github.com/keichi/binary-parser/commit/4b26e04c396253e704ad8e41b928d9e31316f62e — CVE Program
- https://github.com/keichi/binary-parser/blob/v2.3.0/lib/binary_parser.ts#L26-L35 — CVE Program
- https://www.vulncheck.com/advisories/binary-parser-before-2.3.1-code-injection-via-string-typed-parser-options — CVE Program
Weaknesses (CWE): CWE-94
Relevant change history
Advisory correction
The preliminary version was replaced by the full write-up.
Published
Preliminary advisory published.