binary-parser: JavaScript injection via malicious parser definitions enables arbitrary code execution (CVE-2026-134814)
Severity: critical · Patch status: patched · Since 2026-11-23 · CVE-2026-114938, CVE-2026-1245, CVE-2026-134814, CVE-2026-99312
A critical code injection vulnerability in the npm binary-parser library, tracked as CVE-2026-134814, allows an attacker who controls parser definitions to inject JavaScript through unvalidated string options such as length, lengthInBytes, key, tag, offset, and namely() aliases. When the parser is compiled in a Node.js process, crafted values can execute arbitrary JavaScript. The flaw affects binary-parser versions prior to 2.3.1 and is an incomplete fix for CVE-2026-1245. Maintainer Keichi Takahashi said parsing untrusted binary data with a trusted parser definition is not affected; the options are now validated as identifier paths, rejecting expressions like 'len - 1'. Users should upgrade to 2.3.1. No in-the-wild exploitation has been reported.
What to do
- Upgrade binary-parser to 2.3.1 or later immediately.
- Audit parser definitions and treat them as trusted code; do not compile definitions from untrusted sources.
- If upgrade is not possible, avoid passing untrusted values into length, lengthInBytes, key, tag, offset, or namely() aliases; use functions where expressions are needed.
- Review Node.js services that compile parser definitions for signs of malicious definitions.
Fixed versions
Sources
All live incidents on Threat Watch