binary-parser code injection RCE
High risk · public exploit
Risk assessment
binary-parser before 2.3.1 lets crafted parser definitions inject JavaScript and run code in Node.js (CVSS 9.2). Update to 2.3.1.
What to do
Apply the latest security patches from the vendor. If patching is not immediately possible, review the mitigation steps in this advisory and monitor for exploitation attempts.
- No fixed version listed yet. Restrict exposure and watch the vendor advisory. NVD references
- Remediation in this advisory
Exploitation confirmed - public proof-of-concept - CVE-2026-134814 is a critical code injection vulnerability in binary-parser before 2.3.1 that lets anyone controlling parser definitions execute arbitrary JavaScript inside the Node.js process. Fixed in 2.3.1; applications that compile parser definitions from untrusted sources should upgrade now.
Overview
binary-parser is a popular Node.js library for declaratively decoding binary data. Parsers are defined as objects that are compiled into JavaScript functions. The compiler’s Context.generateOption() passes string-typed option values such as length, lengthInBytes, key, tag, offset, and namely() aliases directly into generated source code without validation or escaping.
An attacker who can influence a parser definition can therefore break out of the intended string context and inject arbitrary statements. When the parser is compiled, that code runs with the full privileges of the Node.js process.
Impact
The consequences depend entirely on what the injected code does, but the ceiling is full remote code execution. A malicious parser definition could read environment variables and secrets, exfiltrate files, establish outbound connections, or drop a reverse shell. In a service that builds parsers from user-supplied schemas, configuration files, or plugin manifests, this is an unauthenticated path from input to code execution. The CVSS score of 9.2 reflects network reachability and no privileges required, offset by the high attack complexity of crafting a working injection.
Note that CISA KEV does not list this CVE, and EPSS estimates only a 0.6% chance of exploitation in the next 30 days. This is a real but currently unweaponized risk: treat it as something to fix in your normal release cycle, not an out-of-band emergency, unless your application compiles untrusted parser definitions.
Remediation
Upgrade binary-parser to 2.3.1 or later. This is a drop-in dependency bump for most projects; check your lockfile to confirm the resolved version, since transitive dependencies may pin an older release.
If you cannot upgrade immediately, reduce exposure by never compiling parser definitions from untrusted input. Treat parser schemas like code: load them only from reviewed, version-controlled configuration, and validate any string-typed options against a strict allowlist before they reach namely(), length, or similar fields.
Audit your dependency tree for this package with npm ls binary-parser or your SCA tooling. Review application logs for anything suspicious around parser compilation if your service accepts schemas from external users. For broader context on supply-chain and dependency risk, see our security news coverage and breach reports.
Security Insight
The defining trait of this bug is that it lives in the compiler, not the parser: a library whose whole job is transforming declarative input into executable code had no escaping boundary between data and source. That is the same class of mistake behind template-injection flaws in countless other projects, and it shows how easily “data” becomes “code” in any metaprogramming layer. For a widely used parsing utility, the lesson is that input validation must be enforced at generation time, not left to callers who reasonably assume a decoding library only decodes.
Further Reading
Exploit references 1 PoC Show
Public PoC References
Unverified third-party code
These repositories are publicly listed on GitHub and have not been audited by Yazoul Security. They may contain malware, backdoors, destructive payloads, or operational security risks (telemetry, exfiltration). Treat them as hostile binaries. Inspect source before execution. Run only in isolated, disposable lab environments (offline VM, no credentials, no production data).
Authorized use only. This information is provided for defensive research, detection engineering, and patch validation. Using exploit code against systems you do not own or do not have explicit written permission to test is illegal in most jurisdictions and violates Yazoul's terms of use.
| Repository | Stars |
|---|---|
| googlesky/CVE-2026-134814 binary-parser <2.3.1: string options interpolated verbatim into generated parser JS — 'x+(globalThis.INJECTED=1,0)' as a length option executes attacker code. Real npm 2.3.0 vs 2.3.1 (110206b): global | ★ 0 |
Showing 1 of 1 known references. Source: nomi-sec/PoC-in-GitHub.
Related
- CVE-2026-93674 · Langflow unauthenticated RCEOct 7, 2026
- CVE-2026-25366 · PHP Code InjectionMar 25, 2026
- CVE-2026-26830 · pdf-image npm package allows OS command injectionMar 25, 2026
- CVE-2025-67038 · Lantronix EDS5000 RCE exploited in wildMar 11, 2026
- Weekly Threat Roundup: VMware vCenter Zero-Day Exploited (Nov 16–22)Nov 22, 2026