Arbitrary Code Injection Affecting binary-parser package, versions <2.3.1


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.61% (51st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-BINARYPARSER-22744154
  • published23 Nov 2026
  • disclosed22 Nov 2026
  • creditZachariah Mithani

Introduced: 22 Nov 2026

NewCVE-2026-134814  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade binary-parser to version 2.3.1 or higher.

Overview

binary-parser is a Blazing-fast binary parser builder

Affected versions of this package are vulnerable to Arbitrary Code Injection via Context.generateOption(), which interpolates string-typed parser options verbatim into generated JavaScript source without validation. An attacker who controls a parser definition can supply malicious values for length, lengthInBytes, key, tag, offset, or the alias passed to namely() to execute arbitrary JavaScript in the Node.js process when the parser is compiled.

Note: This is only exploitable when an attacker controls the parser definition (e.g. schema- or JSON-driven parsers); parsing untrusted binary data with a trusted parser definition is not affected.

CVSS Base Scores

version 4.0
version 3.1