CVE-2026-45740
JSON

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 packageVersionsReported by
protobufjs protobuf.js< 7.5.8, >= 8.0.0, < 8.2.0CVE List
protobufjs (npm)before 7.5.8, from 8.0.0 before 8.2.0GitHub Advisory Database
protobufjs_project protobufjsbefore 7.5.8, from 8.0.0 before 8.2.0NVD

All scores

GitHub_M5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
GitHub5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-674

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 nested namespace 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

Sources

SourceRecordLicence
CVE ListCVE-2026-45740 changed 2026-05-13CVE Terms of Use
GitHub Advisory DatabaseGHSA-jggg-4jg4-v7c6 changed 2026-09-10CC-BY-4.0
NVDCVE-2026-45740 changed 2026-11-11Public domain