protobufjs: Denial of Service via unbounded recursive JSON descriptor expansion
Moderate severity
GitHub Reviewed
Published
May 13, 2026
in
protobufjs/protobuf.js
•
Updated May 19, 2026
Description
Published by the National Vulnerability Database
May 13, 2026
Published to the GitHub Advisory Database
May 19, 2026
Reviewed
May 19, 2026
Last updated
May 19, 2026
Summary
protobufjs could recurse without a depth limit while expanding nested JSON descriptors through
Root.fromJSON()andNamespace.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
nestednamespace objects.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.
References