CERT/CC Warns binary-parser Bug Allows Node.js Privilege-Level Code Execution
好的,我现在需要帮用户总结一篇文章的内容,控制在100字以内。首先,我得仔细阅读文章,抓住关键点。 文章讲的是一个npm库binary-parser的安全漏洞,编号是CVE-2026-1245。这个漏洞影响了所有2.3.0之前的版本,已经在2025年11月26日发布了补丁。binary-parser是一个流行的解析二进制数据的库,每周下载量大约13000次。 漏洞的原因是没有对用户提供的值进行足够的清理,比如解析器字段名称和编码参数。攻击者可能通过这些输入注入任意JavaScript代码,导致代码执行、数据泄露或系统命令执行。 安全研究员Maor Caplan发现了这个漏洞,并建议用户升级到最新版本,并避免将用户控制的值传递给解析器参数。 总结的时候,我需要涵盖漏洞名称、影响范围、原因、潜在风险以及建议措施。同时要控制在100字以内,语言简洁明了。 </think> popular npm library binary-parser has a security vulnerability (CVE-2026-1245) allowing arbitrary JavaScript execution due to unsanitized user inputs in dynamically generated parser code. All versions before 2.3.0 are affected; patches released on November 26, 2025. Users should upgrade and avoid untrusted input in parser definitions. 2026-1-21 06:4:0 Author: thehackernews.com(查看原文) 阅读量:0 收藏

Open Source / Vulnerability

A security vulnerability has been disclosed in the popular binary-parser npm library that, if successfully exploited, could result in the execution of arbitrary JavaScript.

The vulnerability, tracked as CVE-2026-1245 (CVSS score: N/A), affects all versions of the module prior to version 2.3.0, which addresses the issue. Patches for the flaw were released on November 26, 2025.

Binary-parser is a widely used parser builder for JavaScript that allows developers to parse binary data. It supports a wide range of common data types, including integers, floating-point values, strings, and arrays. The package attracts approximately 13,000 downloads on a weekly basis.

According to an advisory released by the CERT Coordination Center (CERT/CC), the vulnerability has to do with a lack of sanitization of user-supplied values, such as parser field names and encoding parameters, when the JavaScript parser code is dynamically generated at runtime using the "Function" constructor.

Cybersecurity

It's worth noting that the npm library builds JavaScript source code as a string that represents the parsing logic and compiles it using the Function constructor and caches it as an executable function to parse buffers efficiently.

However, as a result of CVE-2026-1245, an attacker-controlled input could make its way to the generated code without adequate validation, causing the application to parse untrusted data, resulting in the execution of arbitrary code. Applications that use only static, hard-coded parser definitions are not affected by the flaw.

"In affected applications that construct parser definitions using untrusted input, an attacker may be able to execute arbitrary JavaScript code with the privileges of the Node.js process," CERT/CC said. "This could allow access to local data, manipulation of application logic, or execution of system commands depending on the deployment environment."

Security researcher Maor Caplan has been credited with discovering and reporting the vulnerability. Users of binary-parser are advised to upgrade to version 2.3.0 and avoid passing user-controlled values into parser field names or encoding parameters.

Found this article interesting? Follow us on Google News, Twitter and LinkedIn to read more exclusive content we post.


文章来源: https://thehackernews.com/2026/01/certcc-warns-binary-parser-bug-allows.html
如有侵权请联系:admin#unsafe.sh