protobufjs
Affected
- introduced
0, fixed7.5.6(semver)
Fixed versions
7.5.6
Fix
- Fixed version
7.5.6npm install [email protected]
Advisory
Also known as: CVE-2026-44294
protobuf.js: Denial of service from crafted field names in generated code
Summary
protobufjs generated JavaScript property accessors from schema-controlled field and oneof names. Certain control characters in field names were not escaped before being embedded into generated function bodies. A crafted schema or JSON descriptor could therefore cause generated encode, decode, verify, or conversion functions to fail during compilation.
Impact
An attacker who can provide or influence a protobuf schema or JSON descriptor may be able to make affected message types unusable by causing protobufjs runtime code generation to throw a syntax error.
This is a denial of service issue for applications that load untrusted schemas or descriptors. Applications that only use trusted, application-defined schemas are not directly affected by this issue.
The issue is not known to allow code execution by itself.
Preconditions
fromObject, or toObject.Workarounds
Do not load protobuf schemas or JSON descriptors from untrusted sources with affected versions. If untrusted schemas must be accepted, validate field names before loading them and reject names containing control characters.
Medium Basis: The source's own band: MODERATE
0, fixed 7.5.6 (semver)7.5.6
7.5.6npm install [email protected]8.0.0, fixed 8.0.2 (semver)8.0.2
8.0.2npm 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