5.3medium
protobufjs: Denial of Service via unbounded recursive JSON descriptor expansion
- Severity
- 5.3medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.26% (higher than 19% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-jggg-4jg4-v7c6
Description
protobufjs compiles protobuf definitions into JavaScript (JS) functions. Prior to 7.5.8 and 8.2.0, protobufjs could recurse without a depth limit while expanding nested JSON descriptors through Root.fromJSON() and Namespace.addJSON(). A crafted JSON descriptor with deeply nested namespace definitions could cause the JavaScript call stack to be exhausted during descriptor loading. This vulnerability is fixed in 7.5.8 and 8.2.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| protobufjs protobuf.js | < 7.5.8, >= 8.0.0, < 8.2.0 | CVE List |
| protobufjs (npm) | before 7.5.8, from 8.0.0 before 8.2.0 | GitHub Advisory Database |
| protobufjs_project protobufjs | before 7.5.8, from 8.0.0 before 8.2.0 | NVD |
All scores
| GitHub_M | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| GitHub | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
protobufjs compiles protobuf definitions into JavaScript (JS) functions. Prior to 7.5.8 and 8.2.0, protobufjs could recurse without a depth limit while expanding nested JSON descriptors through Root.fromJSON() and Namespace.addJSON(). A crafted JSON descriptor with deeply nested namespace definitions could cause the JavaScript call stack to be exhausted during descriptor loading. This vulnerability is fixed in 7.5.8 and 8.2.0.
GitHub Advisory Database
Summary
protobufjs could recurse without a depth limit while expanding nested JSON descriptors through Root.fromJSON() and Namespace.addJSON().
A crafted JSON descriptor with deeply nested namespace definitions could cause the JavaScript call stack to be exhausted during descriptor loading.
Impact
An attacker who can provide JSON descriptors loaded by an application may be able to crash the process or otherwise cause schema loading to fail with a stack overflow.
This affects applications that load JSON descriptors from untrusted sources with affected versions.
Preconditions
- The application must load JSON descriptor data influenced by an attacker.
- The crafted descriptor must contain deeply nested
nestednamespace objects. - The affected
Root.fromJSON()/Namespace.addJSON()descriptor expansion path must process the crafted input.
Workarounds
Avoid loading untrusted protobuf JSON descriptors with affected versions. If immediate upgrade is not possible, reject excessively nested descriptor structures at an outer validation boundary where feasible, or isolate descriptor loading in a process that can be safely restarted.
NVD (es)
protobufjs compila definiciones de protobuf en funciones de JavaScript (JS). Antes de 7.5.8 y 8.2.0, protobufjs podía recursar sin un límite de profundidad mientras expandía descriptores JSON anidados a través de Root.fromJSON() y Namespace.addJSON(). Un descriptor JSON manipulado con definiciones de espacio de nombres profundamente anidadas podría causar el agotamiento de la pila de llamadas de JavaScript durante la carga del descriptor. Esta vulnerabilidad está corregida en 7.5.8 y 8.2.0.
References
| https://github.com/protobufjs/protobuf.js/security/advisories/GHSA-jggg-4jg4-v7c6 | mitigation, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-45740 | advisory | |
| https://github.com/protobufjs/protobuf.js | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-45740 changed 2026-05-13 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-jggg-4jg4-v7c6 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-45740 changed 2026-11-11 | Public domain |