HudHud Tech — Tech & AI news platform
Monday, 23 November 2026
Breaking
Cybersecurity

Severe Vulnerability in Binary-Parser Library Exposes Users to Code Injection Risks

23 November 2026 2 min read هدهد تك | Hudhud Tech

A critical security flaw has been disclosed in the popular binary-parser library that could allow an attacker controlling parser definitions to execute arbitrary code.

The vulnerability, tracked as CVE-2026-134814 (CVSS score: 9.2 / 8.1), affects binary-parser versions prior to 2.3.1.

According to a description of the flaw in the NIST National Vulnerability Database (NVD), “Binary-parser before 2.3.1 contains a code injection vulnerability that allows attackers controlling parser definitions to inject JavaScript through string-typed options passed unvalidated by Context.generateOption().”

Attackers can exploit this vulnerability by supplying crafted values for length, lengthInBytes, key, tag, offset, or namely() alias, enabling them to execute arbitrary JavaScript in the Node.js process during parser compilation.

The issue arose because some user-controlled string options were inserted directly into the generated JavaScript code without adequate validation, as noted in an advisory released by the project maintainer on November 11, 2026.

The parser options that are vulnerable include:

  • length
  • lengthInBytes
  • key
  • tag
  • offset
  • the alias passed to namely()

Keichi Takahashi, the library maintainer, stated, “Parsing untrusted binary data with a trusted parser definition is not affected. These options are now validated as identifier paths (e.g., foo, $parent.len). Expressions such as ‘len – 1’ are rejected; use a function instead.”

CVE-2026-134814 can also be viewed as an incomplete fix for CVE-2026-1245 (CVSS score: 6.5), another code injection vulnerability fixed in January 2026, which resulted from insufficient validation of field names and encoding parameters.

Upwind Security noted that the flaw allows attackers controlling parser definitions to inject and execute arbitrary JavaScript within the host Node.js process upon parser compilation. Users are advised to update to the latest version of the library for optimal protection.

 

Source: The Hacker News

What do you think of this story?

Share this story: