CVE-2026-1245: Binary parser Binary-parser Library Has A Code Vulnerability
MODERATECVE-2026-1245 is a MODERATE (CVSS 6.5) binary-parser library has a code vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Binary parser libraries in the npm ecosystem. The issue involves binary-parser library has a code injection vulnerability. Remediation is available by upgrading affected packages to version 2.3.0.
CVE-2026-1245 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N).
How to Fix CVE-2026-1245
To remediate this vulnerability, upgrade all affected Binary parser dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install binary-parser@2.3.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls binary-parser
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-1245, inspect your project dependencies using npm:
npm ls binary-parser
Analyze the terminal output to locate any version of Binary parser in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.0), your application is affected.
Note: The npm ls binary-parser command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Binary parser, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-1245 Affected Binary parser Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
binary-parser
|
npm |
< 2.3.0
|
2.3.0
|
References
Frequently Asked Questions
What is CVE-2026-1245?
Which Binary parser versions are affected?
What version fixes CVE-2026-1245?
Is binary-parser affected?
What is the CVSS score of CVE-2026-1245?
What CWE is associated with CVE-2026-1245?
How can I check npm dependencies for CVE-2026-1245?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-m39p-34qh-rh3w",
"modified" : "2026-01-21T22:57:47Z",
"published" : "2026-01-20T21:31:34Z",
"aliases" : [ "CVE-2026-1245" ],
"summary" : "binary-parser library has a code injection vulnerability",
"details" : "A code injection vulnerability in the binary-parser library prior to version 2.3.0 allows arbitrary JavaScript code execution when untrusted values are used in parser field names or encoding parameters. The library directly interpolates these values into dynamically generated code without sanitization, enabling attackers to execute arbitrary code in the context of the Node.js process.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "binary-parser"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.3.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-1245"
}, {
"type" : "WEB",
"url" : "https://github.com/keichi/binary-parser/pull/283"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/keichi/binary-parser"
}, {
"type" : "WEB",
"url" : "https://kb.cert.org/vuls/id/102648"
}, {
"type" : "WEB",
"url" : "https://www.cve.org/CVERecord?id=CVE-2026-1245"
}, {
"type" : "WEB",
"url" : "https://www.kb.cert.org/vuls/id/102648"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/package/binary-parser"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-01-21T22:57:47Z",
"nvd_published_at" : "2026-01-20T19:15:50Z"
}
}