protobufjs
Affected
- introduced
8.0.0, fixed8.0.1(semver)
Fixed versions
8.0.1
Fix
- Fixed version
8.0.1npm install [email protected]
Advisory
Also known as: CVE-2026-41242
protobufjs has an arbitrary code execution issue
Summary
protobufjs could execute generated JavaScript code derived from protobuf schema metadata. When loading a crafted JSON descriptor, schema-controlled type names and type references could reach runtime code generation without sufficient validation.
Impact
An attacker who can provide a malicious protobuf definition or JSON descriptor to an application may be able to execute arbitrary JavaScript in the context of the process using protobufjs.
This requires control over the protobuf schema or descriptor being loaded. Applications that only decode messages using trusted, application-defined schemas are not directly affected by this issue.
Preconditions
Workarounds
Do not load protobuf definitions or JSON descriptors from untrusted sources with affected versions. If untrusted schemas must be accepted, validate or restrict them before loading and run schema processing in an isolated environment.
Critical Basis: The source's own band: CRITICAL
8.0.0, fixed 8.0.1 (semver)8.0.1
8.0.1npm install [email protected]7.0.0, fixed 7.5.5 (semver)7.5.5
7.5.5npm install [email protected]0, fixed 6.11.6 (semver)6.11.6
6.11.6npm install [email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0