Skip to content
feed: live
0dayNews
supply chain

binary-parser 2.3.1 fixes JavaScript injection flaw

The Node.js binary-parser library before 2.3.1 can run attacker JavaScript when parser definitions are untrusted. The fix is 2.3.1; it follows an earlier patch.

binary-parser 2.3.1 fixes JavaScript injection flaw
Image: AI-generated — conceptual illustration, not incident evidence / 0dayNews AI Cover · Generated on-site infrastructure — no external license
kilobaudDave "Kilobaud" Ferris·Published ·2 min read

A code injection flaw in binary-parser, a widely used Node.js library for describing and reading binary formats, lets anyone who controls a parser definition run JavaScript inside the host process. It is tracked as CVE-2026-134814 and affects versions before 2.3.1, according to The Hacker News. The fix is to update to 2.3.1 or later.

What the bug is

The library compiles each parser definition into generated JavaScript. Per the NVD description quoted by The Hacker News, several string options (length, lengthInBytes, key, tag, offset, and the alias passed to namely()) were inserted into that generated code without enough validation. A crafted value in one of them runs when the parser is compiled.

The maintainer, Keichi Takahashi, published an advisory on November 11, 2026. He stressed the limit of the problem: “Parsing untrusted binary data with a trusted parser definition is not affected.” In 2.3.1 those options are validated as identifier paths such as foo or $parent.len, and expressions like “len - 1” are rejected. Code that relied on expressions should use a function instead.

Who should care

The risk is for applications that build parser definitions from outside input: user-supplied schemas, configuration fetched from elsewhere, or definitions generated by another tool. If your definitions are fixed in your own source, this flaw does not reach you through the data you parse. Upgrading is still cheap, and the 2.3.1 validation can break code that passed expressions as options, so run your tests.

Unconfirmed

  • Severity. The Hacker News reports the CVSS score as “9.2 / 8.1” without saying which scoring version each number belongs to, so no single score is restated here.
  • Exploitation in the wild. The source does not report any.
  • A public proof of concept. None is reported, and none is described here.

This is also a second pass at the same weakness. The Hacker News notes the flaw can be viewed as an incomplete fix for CVE-2026-1245, a code injection bug fixed in January 2026 that came from insufficient validation of field names and encoding parameters. Analysis: when a library builds code from strings, patching one option at a time tends to leave the next one open, and a rewrite that validates every input to the generator is the sturdier fix. That is a judgment, not something the maintainer has said.

Upwind Security also flagged the issue on X and advised users to move to the latest version.

For more on dependency risk, see the supply chain topic hub.

Found this useful? Share it.