GHSA-j3f2-48v5-ccww CVE-2026-59877
protobufjs: Denial of Service via infinite loop in .proto option parsing
- Severity
- 5.3 / 10
- High · CVSS 3.1
- Exploit chance (EPSS)
- 0.36%
- Chance of exploitation in the next 30 days. Higher than 30.41% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-835 Loop with Unreachable Exit Condition ('Infinite Loop')
- Fix
7.6.5- Upgrade protobufjs to this version or later
Description
Summary
protobufjs parsed option names by advancing through schema tokens until it reached an = token, without checking for end of input. A crafted .proto schema that opens an option declaration but ends prematurely could cause the option parser to loop without ever terminating.
This affects the reflection parsing path (parse, Root.load, Root.loadSync).
Impact
An attacker who can provide or influence .proto schema text parsed by an application may be able to cause the parsing call to never return. Because Node.js is single-threaded, the blocked event loop prevents all other work in the process, resulting in a denial of service that persists until the process is externally terminated.
Applications that only encode or decode protobuf binary data with trusted schemas are not directly affected.
Preconditions
- The application must parse
.protoschema text influenced by an attacker. - The schema must be parsed through APIs such as
parse,Root.load, orRoot.loadSync. - The crafted input must begin an option declaration that ends before its
=assignment.
Workarounds
Do not parse .proto schemas from untrusted sources with affected versions. If untrusted schema text must be accepted, isolate parsing in a process or worker that can be safely terminated and bound it with a timeout, so a non-returning parse call cannot deny service to the rest of the application.
Affected versions
npm
| Package | Vulnerable | Fixed in |
|---|---|---|
| protobufjs | >= 7.5.0, < 7.6.5 |
7.6.5 |
| protobufjs | >= 8.0.0, < 8.6.6 |
8.6.6 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
protobufjs npm → 7.6.5
- npm
npm install protobufjs@7.6.5- yarn
yarn add protobufjs@7.6.5- pnpm
pnpm add protobufjs@7.6.5
Severity breakdown
CVSS 3.1 5.3
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- Low
Weakness
CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')
The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.
References
Advisories
Packages
Other links
- github.com/protobufjs/protobuf.js/security/advisories/GHSA-j3f2-48v5-ccww
- github.com/protobufjs/protobuf.js/pull/2352
- github.com/protobufjs/protobuf.js/commit/10fba6d54815ceecca8a06b9a6db490c8f5d2217
- github.com/protobufjs/protobuf.js/commit/fa5c73add738ceb471e74da8cc2f3727c3d0a69f
- github.com/protobufjs/protobuf.js/releases/tag/protobufjs-v7.6.5
- github.com/protobufjs/protobuf.js/releases/tag/protobufjs-v8.6.6
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-jfj6-75fj-8934 protobufjs: Text Format string map parsing can mutate returned map object prototype | Medium | Also affects protobufjs |
| GHSA-94rc-8x27-4472 protobufjs: Memory amplification from preserved unknown fields in binary decode | Medium | Also affects protobufjs |
| GHSA-wcpc-wj8m-hjx6 protobufjs: Denial of service through unbounded Any expansion during JSON conversion | High | Also affects protobufjs |
| GHSA-f38q-mgvj-vph7 protobufjs : Schema-derived names can shadow runtime-significant properties | Medium | Also affects protobufjs |
| GHSA-jggg-4jg4-v7c6 protobufjs: Denial of Service via unbounded recursive JSON descriptor expansion | High | Also affects protobufjs |
| GHSA-2pr8-phx7-x9h3 protobuf.js: Denial of service from crafted field names in generated code | Medium | Also affects protobufjs |
| GHSA-66ff-xgx4-vchm protobuf.js: Code injection through bytes field defaults in generated toObject code | High | Also affects protobufjs |
| GHSA-fx83-v9x8-x52w protobuf.js: Prototype injection in generated message constructors | Medium | Also affects protobufjs |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor