binary-parser (CVE-2026-134814): Node.js Code Injection via String-Typed Parser Options

Phoenix Intel cover: The fix that missed six options in binary-parser. CVE-2026-134814, Node.js code injection, fixed in 2.3.1.

Executive Summary

CVE-2026-134814 is a code injection bug (CWE-94) in binary-parser. It’s an npm library that builds fast parsers for binary data from a declarative definition.

Every version up to and including 2.3.0 turns that definition into JavaScript and runs it with the Function constructor. Several string options go into that code without any check. If someone controls one of those values, they control code inside your Node.js process. That code gets the process’s credentials, file access and network reach.

This is part two of an older story. Version 2.3.0 was published to npm on November 26, 2025. CERT/CC disclosed it as CVE-2026-1245 on January 20, 2026. That release checked field names and encodings. It did not check length, lengthInBytes, key, tag, offset or the namely() alias. Teams that moved to 2.3.0 and closed the January ticket stayed exposed.

The maintainer shipped 2.3.1 and advisory GHSA-xmxc-6c22-m377 on November 11, 2026. VulnCheck assigned the CVE on November 22.

Triage comes down to one question. Who writes your parser definitions?

The maintainer says parsing hostile bytes with a trusted definition is safe. The real risk sits in platforms that build parsers from tenant-editable schemas, device profiles, protocol mappings or JSON configs. There, a low-privileged user who can edit a format profile can get code execution on a backend worker. Everywhere else, this is a routine dependency bump with one breaking change to plan for.

TL;DR for Engineering Teams

QuestionAnswer
What it isCVE-2026-134814, code injection in binary-parser through string-typed parser options. CVSS 4.0 9.2 (Critical), CVSS 3.1 8.1 (High), both scored by VulnCheck as CNA.
Where it bitesbinary-parser 2.3.0 and earlier, in any Node.js service that builds a Parser from data outside the app’s trust boundary: tenant schemas, uploaded protocol definitions, configs stored in a database, plugin manifests.
Why it mattersIt’s an incomplete fix for CVE-2026-1245, so “we patched in January” doesn’t cover you. 31,002 npm downloads in the week of November 16 to 22, 2026. No confirmed exploitation as of November 23, 2026.
PatchFixed in 2.3.1 (npm, November 11, 2026). Also fixed in 3.0.0 (November 22, 2026), which needs Node.js 22.12 or later and is ESM-only.
Do nowPin binary-parser@2.3.1 (or 3.0.0 if you already run Node.js 22.12+). Force it through transitive trees with overrides or resolutions. Audit stored parser definitions for option strings that aren’t plain field paths.

Vulnerability Overview

FieldValue
VendorKeichi Takahashi (keichi/binary-parser, open-source maintainer)
Productbinary-parser (npm)
Vulnerability typeCode injection via unsanitized interpolation into generated JavaScript
CWECWE-94: Improper Control of Generation of Code
CVSS9.2 Critical (CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N); 8.1 High (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H)
CVECVE-2026-134814 (NVD); advisories GHSA-xmxc-6c22-m377 and GHSA-hhq6-2gpv-hrf4; EUVD-2026-132849
Related CVECVE-2026-1245, field name and encoding injection, fixed in 2.3.0 (OSV entry)
Patch availableYes: 2.3.1, 3.0.0
Active exploitationNot confirmed
EPSS (Nov 23, 2026)0.608%, 50th percentile (FIRST EPSS)

Expect different severity labels for the same bug. The maintainer’s repository advisory says High. The GitHub Advisory Database entry tied to the CVE says Critical. Your scanner will show 9.2 or 8.1, depending on which CVSS version it reads.

Both vectors have high attack complexity, and the v4 vector adds an attack requirement. AV:N describes the worst-case setup. It doesn’t mean every service that imports the package has a network path to the bug.

Technical Anatomy

Root Cause

binary-parser is fast because it generates code. A Context object walks each Parser chain and appends JavaScript statements to a string. Then compile() turns that string into a function:

javascript

// binary-parser 2.3.0, dist/binary_parser.js (published package)
this.compiled = new Function(importPath, "TextDecoder",
  `return function (buffer, constructorFn) { ${ctx.code} };`)(ctx.imports, TextDecoder);

Many options take a number, a function or a string that names another field. For example, length: “count” or length: “$parent.len”. Context.generateOption() handles the string case:

javascript

// binary-parser 2.3.0
generateOption(val) {
  switch (typeof val) {
    case "number": return val.toString();
    case "string": return this.generateVariable(val); // no validation
    case "function": return `${this.addImport(val)}.call(${this.generateVariable()}, vars)`;
  }
}

generateVariable() joins the current scope path with the string and returns it as is. Whatever the string contains ends up inside the generated function body. You can see it in the v2.3.0 source.

The CVE-2026-1245 fix added an identifier check to sanitizeFieldName(). That covers field names and encodings. It never touched generateOption().

And generateOption() is the path for a lot of options. length on string, buffer, array and seek. lengthInBytes and key on array. tag on choice. offset on pointer.

Two more sinks sat outside generateOption() completely. wrapped() read its length straight from this.options.length. The alias passed to namely() was never sanitized.

We didn’t rely on release notes for the fix. We diffed the published 2.3.0 and 2.3.1 tarballs from the npm registry.

Version 2.3.1 adds a sanitizeReference() helper. It splits the string on dots and requires every segment to match ^[a-zA-Z_$][a-zA-Z0-9_$]*$. Anything else throws Invalid reference: <value>.

generateOption() now sends strings through that helper. wrapped() now calls generateOption(). Array key is checked. namely() aliases go through sanitizeFieldName(). Version 3.0.0 has the same checks. The changes are in commits 110206b and 4b26e04.

Exploit Path

  1. Entry point. The attacker supplies or edits a parser definition that the app later turns into new Parser() calls. Usual carriers are JSON or YAML schemas stored per tenant, device or sensor profiles in IoT platforms, protocol mappings uploaded through an admin UI, or a plugin manifest. The attacker doesn’t need to control the binary data being parsed.
  2. Trigger. One of the affected string options contains characters that aren’t part of a field path. generateOption() pastes the value into the code string. The attacker’s text becomes JavaScript inside the generated parser function.
  3. Impact. The injected code runs when the parser is compiled and called in the host Node.js process. It gets everything that process has: environment variables and cloud credentials, the filesystem, any module it can require, outbound network, and any tenant data the worker touches.

We’re not publishing a payload. Test strings already circulate in third-party writeups. You don’t need one to check your exposure. The definition audit in Detection Guidance answers the question without running anything.

What’s Confirmed and What Isn’t

ClaimStatusSource
Affected options, affected range 2.3.0 and earlier, fix in 2.3.1, trusted definitions not affectedConfirmed by vendorGHSA-xmxc-6c22-m377, v2.3.1 release notes
Fix mechanism (sanitizeReference(), field-path regex)Confirmed in codePhoenix diff of npm tarballs 2.3.0 vs 2.3.1
CVSS 9.2 / 8.1 vectors, published November 22, 2026ConfirmedCVE record via NVD, VulnCheck as CNA
Incomplete fix of CVE-2026-1245ConfirmedVendor advisory; The Hacker News
Finder creditPending verificationCVE record, single source
Not listed in CISA KEVChecked November 23, 2026CISA catalog

Two wrong claims are going around, so watch for them if you write tickets about this bug.

One auto-generated CVE site quotes “release notes” for 2.3.1 that say options are escaped against a whitelist. The real release notes say options are validated as identifier paths and expressions are rejected. The same site calls the flaw remote and unauthenticated. The vendor advisory doesn’t support that.

The Hacker News coverage from November 23 says CVE-2026-1245 was fixed in January 2026. The 2.3.0 fix was on npm on November 26, 2025. January 20, 2026 was the disclosure date (original coverage).

Also watch for CVE-2026-1245 and CVE-2026-134814 getting swapped in tickets and scanner exceptions. It happens easily.

Timeline

Publish dates below come from the npm registry metadata.

DateEvent
Sep 20, 20222.2.1 published. Many projects stayed on it for years
Nov 26, 20252.3.0 published with field name and encoding validation
Jan 20, 2026CVE-2026-1245 disclosed by CERT/CC (CVSS 3.1 6.5)
Nov 11, 20262.3.1 and GHSA-xmxc-6c22-m377 published by the maintainer
Nov 21, 2026Dependabot PRs bumping 2.3.0 to 2.3.1 seen in downstream repos
Nov 22, 2026CVE-2026-134814 published by VulnCheck; 3.0.0 published
Nov 23, 2026EPSS 0.608%; first press coverage

The 11 days between the GitHub advisory and the CVE matter. Scanners and SLA clocks that only key on CVE IDs saw nothing for this bug until November 22.

Affected Versions

PackageVulnerable versionsFixed versionNotes
binary-parser2.3.0 and earlier (all 0.x, 1.x, 2.x through 2.3.0)2.3.1Drop-in for 2.x users on Node.js 14+. Breaking change: string options accept identifier paths only
binary-parserBelow 2.3.02.3.1Also vulnerable to CVE-2026-1245. Skip 2.3.0
binary-parsern/a3.0.0Contains the fix. Needs Node.js 22.12+, ESM-only (“type”: “module”, no separate CommonJS build)
Forks and vendored copiesAny copy of lib/binary_parser.ts older than commits 110206b and 4b26e04Backport both commitsVersion labels on forks aren’t reliable. Check the code

Exposure Analysis

EnvironmentRisk levelWhy
Multi-tenant SaaS and IoT platforms that compile tenant-editable parser definitionsCriticalLow-privileged users get code execution on shared backend workers that hold cross-tenant data and cloud credentials
Internal tools where operators upload protocol or format definitionsHighAn insider or a compromised operator account reaches the worker’s service identity
CI/CD jobs that generate parsers from specs in the repoHighAnyone with PR access to the spec can run code in the runner and reach pipeline secrets, especially in pull_request_target style workflows
Cloud workloads parsing untrusted bytes with hard-coded definitionsLowNot affected per the maintainer. Upgrade on your normal schedule
Developer machinesLow to MediumExposed only when developers load third-party definitions locally. Secrets on the laptop raise the stakes

There’s no Shodan fingerprint for this bug. binary-parser is an in-process library with no listener and no banner.

External attack surface scanning can find the services that accept definition uploads. It can’t tell you which library those definitions go to. For that you need SCA plus a look at the code.

Real-World Impact

npm recorded 31,002 downloads of binary-parser between November 16 and 22, 2026. That’s all versions, including CI re-installs and mirrors. It’s not a count of vulnerable deployments.

Typical users are protocol and file-format decoders. Home automation adapters, for example. Dependabot opened a 2.3.0 to 2.3.1 bump in the ioBroker Roborock adapter on November 21. Also telemetry and sensor ingestion, network capture tools, and game or device protocol libraries.

As of November 23, 2026 we found no confirmed report of exploitation in the wild and no CISA KEV listing. EPSS is at 0.608%. That’s a forecast across everyone who uses the package. It says nothing about the one service in your estate where customers edit schemas that a privileged worker compiles.

The realistic attacks follow the trust boundary.

A tenant on an IoT ingestion platform edits a device profile. They get code execution on the shared decoder fleet, take the worker’s cloud role credentials, and read other tenants’ telemetry.

A contributor submits a protocol spec change to a repo whose CI generates and runs parsers. They take the runner’s tokens.

A compromised partner account in a data-exchange integration changes a format mapping. It plants persistence in a long-running worker.

Detection Guidance

Log and Runtime Indicators

Stored parser definitions are your main evidence. Look at every value for length, lengthInBytes, key, tag, offset and every namely() alias. If it’s a string and doesn’t match this pattern, it needs a human look:

^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$

A string that fails the pattern is either a legitimate expression that will break on 2.3.1, or an injection attempt. You need to know which one.

After the upgrade, compile-time errors with Invalid reference: or Invalid field name: are a strong signal. Send them to security, not only to the owning team’s error budget. Check who last edited that definition.

On the worker side, look for Node.js parser or decoder processes that spawn shells or child processes. Also unexpected outbound connections from decoder services, and reads of credential paths or instance metadata endpoints soon after a definition was created or changed.

Scanner References

Phoenix Security SCA ingestion and reachability analysis flag binary-parser 2.3.0 and earlier across repositories, container images and SBOMs, mapped to the owning teams.

GitHub Dependabot and the GitHub Advisory Database carry both GHSA-xmxc-6c22-m377 and GHSA-hhq6-2gpv-hrf4. Any SCA or SBOM tool keyed to CVE-2026-134814 will match. Check if your tool reports by GHSA, CVE or both. If you don’t, you’ll double-count, or miss the 11 days before the CVE existed.

A SAST rule that tracks data from request bodies, database reads or file loads into new Parser() option arguments shows you the code paths that matter.

Verification Steps for Teams

  1. Find installs: npm ls binary-parser --all (or pnpm why binary-parser, yarn why binary-parser) in every repo and in built images, not only in source lockfiles.
  2. For each hit, run npm explain binary-parser to find the parent package. Then confirm the version in the deployed artifact.
  3. Find every place a parser gets built: search for new Parser( and binary-parser imports. Mark whether the options come from code literals or from data (JSON, database rows, API input, uploaded files).
  4. For data-driven places, find out who can write that data and which service identity compiles it.
  5. Audit stored definitions against the pattern above. Review every value that doesn’t match.
  6. Check your external attack surface for endpoints that accept definition or schema uploads. Tie them back to the services from step 3.

Remediation Guidance

Immediate Actions

  1. Upgrade direct dependencies: npm install binary-parser@2.3.1 --save-exact. Use binary-parser@3.0.0 only if the service already runs Node.js 22.12 or later and can take an ESM-only package.
  2. Force transitive copies to the fixed version, then regenerate the lockfile and rebuild images:

json

// npm
"overrides": { "binary-parser": "2.3.1" }
// Yarn
"resolutions": { "binary-parser": "2.3.1" }
// pnpm
"pnpm": { "overrides": { "binary-parser": "2.3.1" } }
  1. Run your tests against existing definitions. Expressions like “len – 1” now throw at compile time. Replace them with functions your app owns:

javascript

length: function () { return this.len - 1; }

Don’t bring back eval of config strings to keep the old behavior.

  1. Redeploy and restart long-running workers. Compiled parsers stay cached in memory. A new lockfile does nothing until the process restarts.
  2. If you confirm a reachable data-driven path, treat the compiling service’s credentials as exposed. Rotate cloud role credentials, API keys and database secrets for that identity. Review the definition change history back to the first vulnerable deploy.

Temporary Mitigations

  1. Validate definitions when they’re written, with the same field-path rule the fix uses. Reject anything else before it reaches storage.
  2. Limit who can create or edit parser definitions. Remove that permission from tenant and partner roles where the business doesn’t need it.
  3. Move parser compilation into an isolated worker with a minimal identity. No cloud admin roles, no shared database credentials, egress limited to what decoding needs. Use the Node.js permission model (--permission) where your runtime supports it.
  4. Pin the dependency and block latest resolution in scaffold or E2E jobs that install fresh.

A WAF won’t help here. The payload travels as stored configuration, often through authenticated admin APIs. A backend worker runs it later. Validate at the schema API and in the persistence layer instead.

How Phoenix Security Handles This

The same bug shows up in three places: a Dependabot alert on GHSA-xmxc-6c22-m377, an SCA finding on CVE-2026-134814, and a container image finding for the package. Phoenix Security’s contextual deduplication folds them into one backlog item per affected asset. One ticket, one SLA, one owner.

Reachability analysis does the triage this bug needs. It separates services where binary-parser is a dormant transitive dependency from services where it’s loaded at runtime in a deployed workload. The first wave of work goes to services that compile definitions in production.

Attack surface management ties internet-facing schema and upload endpoints back to the services running vulnerable versions. That’s where a Critical label is earned.

Track It as a Campaign

Remediation campaigns turn the response into a tracked program. Create a CVE-2026-134814 campaign. Ownership attribution assigns each affected repo and image to its team. You track upgrades to 2.3.1 or 3.0.0 and check closure against runtime inventory, not lockfile diffs.

Here’s the campaign config. Import it into Phoenix to start tracking right away.

json

{
  "name": "BINARY-PARSER-CVE-2026-134814 - campaign",
  "description": "Code injection in binary-parser <= 2.3.0 via string-typed parser options (length, lengthInBytes, key, tag, offset, namely alias). Incomplete fix of CVE-2026-1245. Fixed in 2.3.1 and 3.0.0. Priority: services that compile parser definitions from tenant, partner or stored data.",
  "enabled": true,
  "responsibleUserEmail": "<owner@yourcompany.com>",
  "config": {
    "filters": [
      {
        "organizationId": null,
        "cwes": [94],
        "cvssVector": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
        "exploitabilities": null,
        "severityLevels": ["CRITICAL", "HIGH"],
        "assetKey": null,
        "assetLocality": null,
        "teamIds": null,
        "applicationId": null,
        "scannerIds": null,
        "scannerCategory": "SCA",
        "tagFilter": null,
        "productValue": null,
        "libraries": [
          { "name": "binary-parser", "version": "2.3.0" },
          { "name": "binary-parser", "version": "2.2.1" }
        ],
        "duplicateType": null,
        "openWithinLast": null,
        "search": "CVE-2026-134814",
        "remedy": null,
        "assetFilter": {
          "osNames": null, "hostnames": null, "netbiosNames": null,
          "vpc": null, "subnet": null, "resourceType": null,
          "resourceGroup": null, "repository": null, "fqdn": null, "ipRanges": null
        },
        "negateFilter": null
      }
    ],
    "selectedIds": null,
    "notificationThreshold": null
  },
  "summary": "Affected: binary-parser <= 2.3.0 (all 0.x, 1.x, 2.x). Fixed: 2.3.1 (Node.js 14+), 3.0.0 (Node.js 22.12+, ESM-only). Advisories: GHSA-xmxc-6c22-m377, GHSA-hhq6-2gpv-hrf4. CVSS 4.0 9.2 / CVSS 3.1 8.1. No confirmed exploitation as of 2026-11-23."
}

Phoenix Security links vulnerable components to runtime workloads, finds exposed services through attack surface management, and assigns remediation owners. The result is a smaller blast radius and a backlog your teams own and can track.

Want to see which of your services compile parser definitions from data? Book a demo.

External References

  1. CVE-2026-134814, CVE record
  2. NVD entry for CVE-2026-134814
  3. Vendor advisory GHSA-xmxc-6c22-m377
  4. GitHub Advisory Database GHSA-hhq6-2gpv-hrf4
  5. binary-parser release v2.3.1
  6. binary-parser release v3.0.0
  7. Fix commit 110206b
  8. Fix commit 4b26e04
  9. Vulnerable code in v2.3.0
  10. VulnCheck advisory
  11. FIRST EPSS data, November 23, 2026
  12. npm downloads, November 16 to 22, 2026
  13. npm registry metadata (publish times, engines)
  14. CVE-2026-1245 on OSV (GHSA-m39p-34qh-rh3w)
  15. CERT/CC VU#102648
  16. The Hacker News, CVE-2026-134814 coverage
  17. The Hacker News, CVE-2026-1245 coverage
  18. EUVD-2026-132849
Sarah is a cybersecurity researcher and product security specialist with over a decade of experience helping organisations identify and remediate vulnerabilities at scale. With a background in software engineering and threat intelligence, she has worked with Fortune 500 companies across financial services and healthcare sectors. Sarah is passionate about making security accessible and actionable for development teams.

Discuss this blog with our community on Slack

Join our AppSec Phoenix community on Slack to discuss this blog and other news with our professional security team

From our Blog

AI coding agents read your security rules, then decide whether to follow them. Purple Hooks moves DevSecOps enforcement inside Claude Code, Cursor and Codex. In our test, the agent added eval, was blocked at pull request after 94 seconds, fixed its own code and passed in 91. No human touched it.
Jorge Vico Castillo
NGINX2Root (CVE-2026-123007) lets an unauthenticated attacker run code on NGINX through a crafted HTTP/2 session. Every release from 1.9.5 to 1.31.8 is affected, and about 8.8 million internet services still negotiate HTTP/2. Patching isn’t enough on its own: a config reload leaves the vulnerable binary running.
Marcus Webb
Derek

Derek Fisher

Head of product security at a global fintech

Derek Fisher – Head of product security at a global fintech. Speaker, instructor, and author in application security.

Derek is an award winning author of a children’s book series in cybersecurity as well as the author of “The Application Security Handbook.” He is a university instructor at Temple University where he teaches software development security to undergraduate and graduate students. He is a speaker on topics in the cybersecurity space and has led teams, large and small, at organizations in the healthcare and financial industries. He has built and matured information security teams as well as implemented organizational information security strategies to reduce the organizations risk.

Derek got his start in the hardware engineering space where he learned about designing circuits and building assemblies for commercial and military applications. He later pursued a computer science degree in order to advance a career in software development. This is where Derek was introduced to cybersecurity and soon caught the bug. He found a mentor to help him grow in cybersecurity and then pursued a graduate degree in the subject.

Since then Derek has worked in the product security space as an architect and leader. He has led teams to deliver more secure software in organizations from multiple industries. His focus has been to raise the security awareness of the engineering organization while maintaining a practice of secure code development, delivery, and operations.

In his role, Jeevan handles a range of tasks, from architecting security solutions to collaborating with Engineering Leadership to address security vulnerabilities at scale and embed security into the fabric of the organization.

Jeevan Singh

Jeevan Singh

Founder of Manicode Security

Jeevan Singh is the Director of Security Engineering at Rippling, with a background spanning various Engineering and Security leadership roles over the course of his career. He’s dedicated to the integration of security practices into software development, working to create a security-aware culture within organizations and imparting security best practices to the team.
In his role, Jeevan handles a range of tasks, from architecting security solutions to collaborating with Engineering Leadership to address security vulnerabilities at scale and embed security into the fabric of the organization.

James

James Berthoty

Founder of Latio Tech

James Berthoty has over ten years of experience across product and security domains. He founded Latio Tech to help companies find the right security tools for their needs without vendor bias.

christophe

Christophe Parisel

Senior Cloud Security Architect

Senior Cloud Security Architect

Chris

Chris Romeo

Co-Founder
Security Journey

Chris Romeo is a leading voice and thinker in application security, threat modeling, and security champions and the CEO of Devici and General Partner at Kerr Ventures. Chris hosts the award-winning “Application Security Podcast,” “The Security Table,” and “The Threat Modeling Podcast” and is a highly rated industry speaker and trainer, featured at the RSA Conference, the AppSec Village @ DefCon, OWASP Global AppSec, ISC2 Security Congress, InfoSec World and All Day DevOps. Chris founded Security Journey, a security education company, leading to an exit in 2022. Chris was the Chief Security Advocate at Cisco, spreading security knowledge through education and champion programs. Chris has twenty-six years of security experience, holding positions across the gamut, including application security, security engineering, incident response, and various Executive roles. Chris holds the CISSP and CSSLP certifications.

jim

Jim Manico

Founder of Manicode Security

Jim Manico is the founder of Manicode Security, where he trains software developers on secure coding and security engineering. Jim is also the founder of Brakeman Security, Inc. and an investor/advisor for Signal Sciences. He is the author of Iron-Clad Java: Building Secure Web Applications (McGraw-Hill), a frequent speaker on secure software practices, and a member of the JavaOne Rockstar speaker community. Jim is also a volunteer for and former board member of the OWASP foundation.

Join our Mailing list!

Get all the latest news, exclusive deals, and feature updates.

The IKIGAI concept
Protected By
Shield Security PRO