Skip to main content

protobufjs CVE-2026-45740

| EUVDEUVD-2026-30039 MEDIUM
Uncontrolled Recursion (CWE-674)
2026-05-13 GitHub_M GHSA-jggg-4jg4-v7c6
5.3
CVSS 3.1 · GitHub Advisory
Share

Severity by source

GitHub Advisory PRIMARY
5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Red Hat
7.5 HIGH
qualitative

Primary rating from GitHub Advisory.

CVSS VectorGitHub Advisory

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

Lifecycle Timeline

3
Patch available
May 13, 2026 - 16:33 EUVD
Analysis Generated
May 13, 2026 - 16:01 vuln.today
CVE Published
May 13, 2026 - 14:46 nvd
MEDIUM 5.3

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 1,329 npm packages depend on protobufjs (82 direct, 1,248 indirect)

Ecosystem-wide dependent count for version 8.0.0.

DescriptionGitHub Advisory

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.

AnalysisAI

Uncontrolled recursion in protobufjs versions prior to 7.5.8 and 8.2.0 allows remote attackers to exhaust the JavaScript call stack by providing crafted JSON descriptors with deeply nested namespace definitions to Root.fromJSON() or Namespace.addJSON(), causing a denial of service. The vulnerability requires only network access and no authentication, though exploitation depends on the application parsing untrusted protobuf JSON descriptors.

Technical ContextAI

protobufjs is a JavaScript implementation of Protocol Buffers that dynamically compiles protobuf message definitions from JSON descriptors into executable JavaScript functions. The vulnerability exists in the recursive descriptor expansion logic within Root.fromJSON() and Namespace.addJSON() methods, which traverse and process nested namespace structures without enforcing a recursion depth limit (CWE-674: Uncontrolled Recursion). When processing a maliciously crafted JSON descriptor containing exceptionally deep nesting of namespace definitions, the call stack grows until JavaScript's maximum call stack size is exceeded, triggering a stack overflow that terminates the affected process. This is a classic denial-of-service vector against recursive parsing logic.

RemediationAI

Upgrade protobufjs to version 7.5.8 or 8.2.0 or later. For npm-based projects, run 'npm update protobufjs' to fetch the patched version, or explicitly install 'npm install protobufjs@7.5.8' or 'npm install protobufjs@8.2.0' depending on the major version in use. The fix implements recursion depth limits in Root.fromJSON() and Namespace.addJSON(), preventing stack exhaustion from deeply nested descriptors. No workarounds are available for older versions; patching is the only remediation. If immediate upgrading is impossible, apply defense-in-depth measures including rate-limiting and request size limits on any endpoints that accept protobuf JSON descriptors, though these are not substitutes for patching. Verify patch application by checking package.json lock files and running 'npm list protobufjs' to confirm the installed version meets the minimum fixed versions. The GitHub Security Advisory (https://github.com/protobufjs/protobuf.js/security/advisories/GHSA-jggg-4jg4-v7c6) contains additional guidance.

Vendor StatusVendor

Share

CVE-2026-45740 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy