CVE-2026-134814: binary-parser JavaScript Injection RCE Teardown
Defensive teardown of CVE-2026-134814 in binary-parser before 2.3.1: root cause, patch commands, detection rules, and hardening checklist for DevSecOps teams.
CVE-2026-134814 is a critical code injection flaw in binary-parser before 2.3.1 that lets attackers inject JavaScript through unvalidated string-typed parser options via Context.generateOption(); upgrade to 2.3.1 or later.
Key Numbers & Verified Specs
7 metrics| Metric / Spec | Verified Finding | Source |
|---|---|---|
| CVE ID | CVE-2026-134814 | github.com |
| CVSS v4 Score | 9.2 Critical | github.com |
| Affected Versions | binary-parser before 2.3.1 | github.com |
| Patched Version | binary-parser 2.3.1 or later | github.com |
| Vulnerable Function | Context.generateOption() | github.com |
| Attack Vector | Network, Attack Complexity High, Privileges Required None | github.com |
| CISA KEV Status | Not listed as of publication | cisa.gov |
Jump to section (4) +
CVE-2026-134814 is a critical code injection vulnerability in the binary-parser npm package. Versions before 2.3.1 allow attackers who control parser definitions to inject JavaScript through string-typed options passed unvalidated by Context.generateOption(). The flaw yields arbitrary JavaScript execution inside the Node.js process when a malicious parser is compiled. CVSS v4 scores this at 9.2 Critical with network attack vector, high attack complexity, no privileges required, and no user interaction.
Incident Timeline & Blast-Radius Table
| Item | Detail | Source |
|---|---|---|
| CVE ID | CVE-2026-134814 | GitHub Advisory Database |
| CVSS v4 Base Score | 9.2 Critical | GitHub Advisory Database |
| Affected Versions | binary-parser < 2.3.1 | GitHub Advisory Database |
| Patched Version | binary-parser >= 2.3.1 | Patch Commit 110206b |
| Vulnerable Function | Context.generateOption() | binary_parser.ts v2.3.0 lines 26-35 |
| Attack Vector | Network, High Complexity, None Required | GitHub Advisory Database |
| CISA KEV Listed | No | CISA KEV Catalog |
| Published | Nov 22, 2026 (NVD), Nov 23, 2026 (GitHub) | GitHub Advisory Database |
The blast radius covers any Node.js service that accepts user-supplied or externally controlled parser definition objects. Backend maintainers using binary-parser to decode proprietary binary protocols, file formats, or telemetry streams are directly exposed if attacker-controlled input reaches parser option fields. Services that hardcode parser definitions internally and never accept external definition payloads face a narrower exposure window.
Technical Root Cause & Attack Vector (Defensive Analysis)
The vulnerability lives in Context.generateOption(), which builds parser option strings without sanitizing attacker-controlled input. When a parser definition includes crafted values for length, lengthInBytes, key, tag, offset, or namely() aliases, those strings are interpolated into generated JavaScript. The Node.js process then executes that code during parser compilation.
This is a classic unsafe code-generation pattern. String-typed options flow directly into a code string that is evaluated or compiled at runtime. Because the attack vector is network-based and requires no privileges or user interaction, an attacker who can influence parser definition configuration achieves remote code execution in the application context.
The root cause is missing input validation and unsafe string interpolation in generated parser code. Defensive remediation requires validating all parser option values against an allowlist before they reach the code-generation path, or upgrading to a version that performs this validation.

Exact Patch, Upgrade & Verification Commands
Upgrade binary-parser immediately. The fix landed in version 2.3.1.
# Check current installed version
npm ls binary-parser
# Upgrade to patched version
npm install binary-parser@2.3.1
# Verify the installed version after upgrade
node -e "const p = require('binary-parser/package.json'); console.log(p.version)"
# Yarn alternative
yarn upgrade binary-parser@2.3.1
yarn list --pattern binary-parserIf an immediate upgrade is impossible, audit every parser definition source. Reject any definition object whose option fields contain executable-looking strings, template literals, or unexpected characters. Treat parser definitions as untrusted code configuration until the package is patched.
Detection Rules & Hardening Checklist
Monitor Node.js processes for anomalous parser compilation behavior. Look for child process spawning, unexpected network connections, or file system writes from services that use binary-parser. Enable audit logging on parser definition ingestion endpoints.
- Pin binary-parser to 2.3.1 or later in package.json and lockfiles.
- Run npm audit or yarn audit regularly to catch reintroduced vulnerable versions.
- Block parser definition uploads from untrusted sources at the API gateway.
- Validate all string-typed parser options against strict allowlists before passing them to binary-parser.
- Isolate binary-parser workloads in containers with non-root users and read-only filesystems where possible.
- Review GitHub Dependabot alerts for GHSA-hhq6-2gpv-hrf4.
When NOT to use this guidance: If your service generates parser definitions entirely from internal, hardcoded sources and never accepts external definition payloads, the immediate exploitation risk is lower, though you should still upgrade to eliminate supply-chain risk. Do not attempt to patch binary-parser by monkeypatching Context.generateOption() at runtime; that approach is fragile and may break parser compilation.
Primary sources: GitHub Advisory Database, NVD CVE Detail, The Hacker News coverage.
Reader Q&A
Frequently Asked Questions
Which versions of binary-parser are affected by CVE-2026-134814?
How does the Context.generateOption() injection work?
Is CVE-2026-134814 on the CISA Known Exploited Vulnerabilities catalog?
Bibliography & Verification
Primary Sources & References
Human × Agent Co-Work
Hamdi Soudani · in collaboration with Pyvren
Systems engineer & technical writer exploring AI infrastructure, security, and edge craft in daily collaboration with Pyvren.
Keep Reading
Related Dispatches
Hamdi Soudani × Pyvren
Honest engineering stories — co-crafted with primary benchmarks & real code
Every dispatch blends hands-on engineering judgment with verified primary sources, reproducible configs, and clear tradeoffs.