Vulnerability in binary-parser allows JS code execution; patch available in 2.3.1

Author: Published 5 min de lectura 26 reading

The images in this article were generated with artificial intelligence. How we publish

A critical vulnerability has been confirmed in the open source binary-parser library that allows the execution of JavaScript code within the Node.js process when an attacker controls the definitions of the parser. The failure, recorded as CVE-2026-134814 and reported with high CVSS scores (sources show 9.2 and 8.1 in different metrics), affects all versions prior to 2.3.1. According to the NIST vulnerability database, the root of the problem is that user-provided chain-type options were directly embedded in the JavaScript code generated by Context.generateOption () without validation, which allows you to inject malicious code into fields such as length, longthInBytes, key, tag, offset and the alias passed to namely (). (confirmed data: NVD entry and project notice).

Technically, binary-parser dynamically builds JavaScript code to represent and compile a binary parser from a definition. When certain options (e.g. the name of a field or an alias) are concentrated without sanitizing in that code template, an attacker who controls the definition of the parser can introduce fragments that end up being executed in compilation time - for example by closing a block and adding calls to system functions - and thus achieve arbitrary execution in the Node.js process that is compiling the parser. The project maintainer, Keichi Takahashi, has indicated that"Parsing untrusted binary data with a trti parser definition is not affected", that is, the risk is expressed when the definitions of the parser come from unreliable sources and not by the mere fact of processing external binary data (a fact confirmed by the maintainer).

Vulnerability in binary-parser allows JS code execution; patch available in 2.3.1
Image generated with IA.

This failure is related to an earlier vulnerability, CVE-2026-1245(reported and corrected in January 2026), which also involved injection by insufficient validation of field names and coding parameters. According to the maintainers and analysts, CVE-2026-134814 can be interpreted as an incomplete correction of that previous incidence: parts of the code-generation mechanism continued to allow dangerous chains in other parameters (data confirmed by the incident history and public descriptions).

Who's affected? Confirmed: projects using binary-parser in versions before 2.3.1. However, the real risk depends on the pattern of use. If your application compiles parsers from user-controlled definitions, third parties or unverified packages - for example, platforms that accept customer-uploaded parsing templates, analysis tools that run community parsers or CI / CD pipelines that integrate external parsers - then the exposure is high. On the other hand, applications that use internal, fixed and developed equipment-controlled definitions are not affected by the threat of remote injection (this is confirmed by the maintainer as an exception).

Actual consequences: in exposed systems the operation allows to run any JavaScript with the same privileges of the Node.js process: scalated for reading / writing files accessible on the account, exfiltration of secrets in memory, execution of commands if there are native bindings that expose that capacity, or pivoting to other parts of the infrastructure. The exact scope depends on the permissions of the committed process; on servers with high privileges the consequences can be serious. These statements are reasoning based on the nature of the failure (remote code execution) and the typical capabilities of the Node.js. environment

Immediate and concrete action to be taken now(confirmed and practical):

1) Update immediately to version 2.3.1 or more: if you use npm, runnpm install binary-parser @ 2.3.1or update your package.json and rebuild. Confirm the installed version withnpm ls binary-parser. (Action recommended and confirmed by project notice).

2) Identify exposure: look in your code where definitions of parser are generated or accepted in execution time. Useful commands:grep-R "new Parser."or audit routes that process external artifacts that may contain definitions of parser. This audit is a practical check; the need to do so depends on your confidence model (use scenario-based estimate).

3) Block unreliable entries: do not allow external users or packages to upload or edit definitions that arrive without revision to the parser's compilation mechanism. In systems where this is essential, apply validation at the application level to accept only identifiers that meet the pattern of permitted routes (e.g. simple names or routes with $parent), rejecting expressions such as' len - 1 '(the maintainer recommends that approach and sunset that expressions should be implemented as safe functions).

4) Temporary mitigation if unable to update: avoid compiling parsers of unverified content; disable any functionality that allows loads of dynamic definitions. As an additional measure, run the Node.js processes in environments with restricted privileges, use containers with isolation policies and limit access to secrets and file system.

5) Tools and monitoring: active unit scan (npm audit, Snyk, GitHub Dependabot) to detect vulnerable versions in your unit tree; look for CVE-2026-134814. Check logs for unexpected parser compilations and add alerts if you detect unusual activity. (Recommendation based on standard safety practices).

Vulnerability in binary-parser allows JS code execution; patch available in 2.3.1
Image generated with IA.

Public sources with technical description of the project failure and notice: NVD entry for vulnerability ( https: / / nvd.nist.gov / vuln / detail / CVE-2026-134814) and the book page in npm where the versions and notes are published ( https: / / www.npmjs.com / package / binary-parser). For Node.js process mitigation and hardening strategies, see also Node.js official security documentation ( https: / / nodejs.org / en / security /).

Still uncertain aspects: there is no public and verified list of holdings in nature (not confirmed). Nor is there a verified public explosion that details the exact technique used against specific applications (uncertain status at the time of notice). If public exploits or attack samples appear, the urgency of forensic responses would rise; for now the priority and confirmed action is to update and audit the exposure.

In short: treat this vulnerability as a high priority if your software allows you to define or import parsers from external sources. Update, audit and restrict the ability to compile dynamically generated code until you have control over the inputs. If your project does not accept external definitions, check and interpret the risk, but updating remains the safest way to close the door to the operation.

Coverage

Related

More news on the same subject.