Critical flaw in Protobuf library enables JavaScript code execution
嗯,用户让我帮忙总结一篇文章,控制在100字以内,而且不需要用“文章内容总结”之类的开头。首先,我需要仔细阅读文章内容,理解主要信息。 文章讲的是protobuf.js这个库有一个严重的远程代码执行漏洞,影响很大,因为这个库在npm上下载量很高,每周近5000万次。漏洞是由于动态代码生成不安全导致的,攻击者可以利用恶意schema注入代码。影响的版本是8.0.0/7.5.4及以下,已经发布了补丁版本8.0.1和7.5.5。建议升级并审计依赖。 接下来,我需要把这些关键点浓缩到100字以内。要包括漏洞名称、影响范围、原因、攻击后果、修复版本以及建议措施。同时保持语言简洁明了。 可能的结构:protobuf.js存在远程代码执行漏洞,因动态代码生成不安全。攻击者可注入代码,影响服务器和应用。建议升级到8.0.1或7.5.5,并审计依赖。 检查字数是否符合要求,并确保没有使用任何禁止的开头语句。 </think> protobuf.js 存在远程代码执行漏洞,因动态代码生成不安全导致。攻击者可利用恶意 schema 注入代码,影响服务器和应用。建议升级至 8.0.1 或 7.5.5,并审计依赖以防止风险。 2026-4-18 15:16:53 Author: www.bleepingcomputer.com(查看原文) 阅读量:11 收藏

Critical flaw in Protobuf library enables JavaScript code execution

Proof-of-concept exploit code has been published for a critical remote code execution flaw in protobuf.js, a widely used JavaScript implementation of Google's Protocol Buffers.

The tool is highly popular in the Node Package Manager (npm) registry, with an average of nearly 50 million weekly downloads. It is used for inter-service communication, in real-time applications, and for efficient storage of structured data in databases and cloud environments.

In a report on Friday, application security company Endor Labs says that the remote code execution vulnerability (RCE) in protobuf.js is caused by unsafe dynamic code generation.

Wiz

The security issue has not received an official CVE number and is currently being tracked as GHSA-xq3m-2v4x-88gg, the identifier assigned by GitHub.

Endor Labs explains that the library builds JavaScript functions from protobuf schemas by concatenating strings and executing them via the Function() constructor, but it fails to validate schema-derived identifiers, such as message names.

This lets an attacker supply a malicious schema that injects arbitrary code into the generated function, which is then executed when the application processes a message using that schema.

This opens the path to RCE on servers or applications that load attacker-influenced schemas, granting access to environment variables, credentials, databases, and internal systems, and even allowing lateral movement within the infrastructure.

The attack could also affect developer machines if those load and decode untrusted schemas locally.

The flaw impacts protobuf.js versions 8.0.0/7.5.4 and lower. Endor Labs recommends upgrading to 8.0.1 and 7.5.5, which address the issue.

The patch sanitizes type names by stripping non-alphanumeric characters, preventing the attacker from closing the synthetic function. However, Endor comments that a longer-term fix would be to stop round-tripping attacker-reachable identifiers through Function at all.

Endor Labs is warning that “exploitation is straightforward,” and that the minimal proof-of-concept (PoC) included in the security advisory reflects this. However, no active exploitation in the wild has been observed to date.

The vulnerability was reported by Endor Labs researcher and security bug bounty hunter Cristian Staicu on March 2, and the protobuf.js maintainers released a patch on  GitHub on March 11. Fixes to the npm packages were made available on April 4 for the 8.x branch and on April 15 for the 7.x branch.

Apart from upgrading to patched versions, Endor Labs also recommends that system administrators audit transitive dependencies, treat schema-loading as untrusted input, and prefer precompiled/static schemas in production.

tines

99% of What Mythos Found Is Still Unpatched.

AI chained four zero-days into one exploit that bypassed both renderer and OS sandboxes. A wave of new exploits is coming.

At the Autonomous Validation Summit (May 12 & 14), see how autonomous, context-rich validation finds what's exploitable, proves controls hold, and closes the remediation loop.


文章来源: https://www.bleepingcomputer.com/news/security/critical-flaw-in-protobuf-library-enables-javascript-code-execution/
如有侵权请联系:admin#unsafe.sh