---
title: "CVE-2026-134814: binary-parser JavaScript Injection RCE Teardown"
slug: "cve-2026-134814-binary-parser-rce-teardown"
description: "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."
author: "Hamdi Soudani"
category: "dev-tooling-benchmarks"
archetype: "advisory-teardown"
published_at: "2026-11-24T02:04:09.317+00:00"
updated_at: "2026-11-24T02:04:09.516533+00:00"
canonical_url: "https://pyvren.com/blog/cve-2026-134814-binary-parser-rce-teardown"
reading_time_minutes: 3
word_count: 570
quality_score: 93
tags: ["cve-2026-134814","binary-parser","rce","devsecops","nodejs"]
keywords: ["cve-2026-134814 binary-parser patch","binary-parser javascript injection rce","context generateoption vulnerability fix","binary-parser 2.3.1 upgrade command","nodejs binary-parser code injection detection"]
sources: ["https://github.com/advisories/GHSA-hhq6-2gpv-hrf4","https://nvd.nist.gov/vuln/detail/cve-2026-134814","https://thehackernews.com/2026/11/critical-binary-parser-flaw-enables.html?m=1","https://github.com/keichi/binary-parser/commit/110206bb126a80071158fb0e2e3d7cc658f2bfe4"]
---

# CVE-2026-134814: binary-parser JavaScript Injection RCE Teardown

> **TL;DR:** 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 Facts

- **CVE ID:** CVE-2026-134814 ([source](https://github.com/advisories/GHSA-hhq6-2gpv-hrf4))
- **CVSS v4 Score:** 9.2 Critical ([source](https://github.com/advisories/GHSA-hhq6-2gpv-hrf4))
- **Affected Versions:** binary-parser before 2.3.1 ([source](https://github.com/advisories/GHSA-hhq6-2gpv-hrf4))
- **Patched Version:** binary-parser 2.3.1 or later ([source](https://github.com/keichi/binary-parser/commit/110206bb126a80071158fb0e2e3d7cc658f2bfe4))
- **Vulnerable Function:** Context.generateOption() ([source](https://github.com/keichi/binary-parser/blob/v2.3.0/lib/binary_parser.ts#L26-L35))
- **Attack Vector:** Network, Attack Complexity High, Privileges Required None ([source](https://github.com/advisories/GHSA-hhq6-2gpv-hrf4))
- **CISA KEV Status:** Not listed as of publication ([source](https://www.cisa.gov/known-exploited-vulnerabilities-catalog))

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](https://github.com/advisories/GHSA-hhq6-2gpv-hrf4) |
| CVSS v4 Base Score | 9.2 Critical | [GitHub Advisory Database](https://github.com/advisories/GHSA-hhq6-2gpv-hrf4) |
| Affected Versions | binary-parser < 2.3.1 | [GitHub Advisory Database](https://github.com/advisories/GHSA-hhq6-2gpv-hrf4) |
| Patched Version | binary-parser >= 2.3.1 | [Patch Commit 110206b](https://github.com/keichi/binary-parser/commit/110206bb126a80071158fb0e2e3d7cc658f2bfe4) |
| Vulnerable Function | Context.generateOption() | [binary_parser.ts v2.3.0 lines 26-35](https://github.com/keichi/binary-parser/blob/v2.3.0/lib/binary_parser.ts#L26-L35) |
| Attack Vector | Network, High Complexity, None Required | [GitHub Advisory Database](https://github.com/advisories/GHSA-hhq6-2gpv-hrf4) |
| CISA KEV Listed | No | [CISA KEV Catalog](https://www.cisa.gov/known-exploited-vulnerabilities-catalog) |
| Published | Nov 22, 2026 (NVD), Nov 23, 2026 (GitHub) | [GitHub Advisory Database](https://github.com/advisories/GHSA-hhq6-2gpv-hrf4) |

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.

![Critical binary-parser Flaw Enables JavaScript Injection via Malicious Parser Definitions](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ_LYD1NyoPDf8MFXggODpgd2hvazxjShSZltgrLUVic7V-ZIQSjXIzFrkUx0FNoUjlxlIYocEd1AZwGx66uqGWEUyd1TMSlDmxUu8M_r6jdYkmWDZjbszL2WsK7LJzrwI-NgsI7EaLe9WkLwNLGKj8ww3tTOY4X4JPug3RWQqoypUiEpZjVXgBhhcLuZG/s1700-nu-rw-lo-l85-e365/js-cve.jpg)

## Exact Patch, Upgrade & Verification Commands

Upgrade binary-parser immediately. The fix landed in version 2.3.1.

```bash
# 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-parser
```

If 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](https://github.com/advisories/GHSA-hhq6-2gpv-hrf4), [NVD CVE Detail](https://nvd.nist.gov/vuln/detail/cve-2026-134814), [The Hacker News coverage](https://thehackernews.com/2026/11/critical-binary-parser-flaw-enables.html?m=1).

## Frequently Asked Questions

### Which versions of binary-parser are affected by CVE-2026-134814?

All versions of binary-parser before 2.3.1 are affected. Version 2.3.1 contains the patch. Verify your installed version with npm ls binary-parser or yarn list --pattern binary-parser.

### How does the Context.generateOption() injection work?

Attackers who control parser definitions can pass crafted string-typed options such as length, lengthInBytes, key, tag, offset, or namely() alias values. These values flow unvalidated into generated JavaScript code, achieving arbitrary code execution in the Node.js process when the parser is compiled.

### Is CVE-2026-134814 on the CISA Known Exploited Vulnerabilities catalog?

No. CISA KEV does not currently list CVE-2026-134814. Teams should still treat it as critical due to the CVSS 9.2 score and remote network attack vector.

## Primary Sources

- https://github.com/advisories/GHSA-hhq6-2gpv-hrf4
- https://nvd.nist.gov/vuln/detail/cve-2026-134814
- https://thehackernews.com/2026/11/critical-binary-parser-flaw-enables.html?m=1
- https://github.com/keichi/binary-parser/commit/110206bb126a80071158fb0e2e3d7cc658f2bfe4
