binary-parser before 2.3.1 Code Injection via String-Typed Parser Options
- State
- Published
- Severity
- 9.2 Critical
- Published
- Nov 22, 2026
- Updated
- Nov 28, 2026
- Reserved
- Nov 22, 2026
Description
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.
| Product | Versions |
|---|---|
| binary-parser keichi | before 2.3.1 Affected |
| CVSS | Score | How It's Reached | Source |
|---|---|---|---|
| 4.0 | 9.2 Critical | VulnCheck | |
| 3.1 | 8.1 High | VulnCheck |
Weaknesses
- CWE-94 Improper Control of Generation of Code ('Code Injection')
References
- GitHub Security Advisory (GHSA-xmxc-6c22-m377)Vendor Advisory
- https://github.com/keichi/binary-parser/commit/110206bb126a80071158fb0e2e3d7cc658f2bfe4Patch
- https://github.com/keichi/binary-parser/commit/4b26e04c396253e704ad8e41b928d9e31316f62ePatch
- https://github.com/keichi/binary-parser/blob/v2.3.0/lib/binary_parser.ts#L26-L35Technical Details
- VulnCheck Advisory: binary-parser before 2.3.1 Code Injection via String-Typed Parser OptionsThird-Party Advisory
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.