Skip to main content

Share story

Security

Critical remote code execution flaw discovered in widely used protobuf.js library

Critical remote code execution flaw discovered in widely used protobuf.js library Image: Primary
A critical remote code execution vulnerability has been discovered in protobuf.js, a widely used JavaScript implementation of Google's Protocol Buffers that averages nearly 50 million weekly downloads through npm. The flaw allows attackers to execute arbitrary JavaScript code by injecting malicious code through specially crafted protobuf schemas. Application security firm Endor Labs reported the vulnerability, which stems from the library's unsafe dynamic code generation when building JavaScript functions from schemas. Protobuf.js constructs functions by concatenating strings and executing them via the Function() constructor, but fails to properly validate schema-derived identifiers like message names. This oversight enables attackers to supply malicious schemas that inject code into generated functions, which then executes when applications process messages using those schemas. Successful exploitation grants attackers access to environment variables, credentials, databases, and internal systems, with potential for lateral movement within infrastructure. The vulnerability also affects developer machines that load and decode untrusted schemas locally. The security issue, tracked as GHSA-xq3m-2v4x-88gg on GitHub, affects protobuf.js versions 8.0.0/7.5.4 and earlier. Patched versions 8.0.1 and 7.5.5 address the vulnerability by sanitizing type names to strip non-alphanumeric characters, preventing attackers from closing synthetic functions. Endor Labs researcher Cristian Staicu reported the vulnerability on March 2, with maintainers releasing GitHub patches on March 11. Fixed npm packages became available on April 4 for the 8.x branch and April 15 for the 7.x branch. While exploitation is described as straightforward and proof-of-concept code has been published, no active exploitation in the wild has been observed to date. Beyond upgrading to patched versions, Endor Labs recommends administrators audit transitive dependencies, treat schema-loading as untrusted input, and prefer precompiled or static schemas in production environments.
Sources
In this story
Published by Tech & Business, a media brand covering technology and business. This story was sourced from BleepingComputer and reviewed by the T&B editorial agent team.
Back to Newswire
Keep reading
Full wire
Capital AI
Capital AI

Nevis raises $70M with Schwab joining wealth software investors

Nevis raised $70M in a Series B led by EQT Ventures, bringing its total funding to $110M, the New York wealth management software company announced Monday. Charles Schwab and QuantumLight joined existing investors Sequoia Capital,...

Robotics Capital
Robotics Capital

Bedrock Robotics raises $600M at a $4.1B valuation

Bedrock Robotics raised a $600M Series C at a $4.1B valuation, Bloomberg reported. The startup makes driverless excavators and other autonomous construction machines. The financing adds capital to a company developing autonomous ...

Capital
Capital

Matiks raises $10 million to expand puzzle games and game creation

India-based Matiks said Monday it raised $10 million in pre-Series A funding led by General Catalyst, bringing its total funding to over $13.5 million. The startup plans to expand into new markets and scale Jelo, its experimental ...

AI Products
AI Products

AWS makes GPT-6.1 Terra generally available on Bedrock

AWS announced general availability of OpenAI's GPT-6.1 Terra on Amazon Bedrock, giving customers access through Bedrock APIs and configurations for ChatGPT Work and Codex. The model accepts text and images and supports up to 1 mil...

AI
AI

OpenAI releases GPT-6.1 Terra at $1 per million input tokens

OpenAI has released GPT-6.1 Terra, priced at $1 per million input tokens and $5 per million output tokens. The company describes the model as supporting computer use at scale and detailed visual reasoning, and claims clearer, more...