Uncontrolled recursion in elixir-protobuf JSON decoding of self-referential messages

CVE-2026-104635 affects the Elixir protobuf package's JSON decoder when applications process attacker-controlled JSON into user-defined protobuf messages that can contain self-referential or cyclic embedded message types. A deeply nested document can bypass the configured recursion limit, consume stack and heap memory, and crash the decoding process or the surrounding BEAM node. The issue is classified as CWE-674, with a CVSS 4.0 base score of 8.2 High. The primary security impact is availability; confidentiality and integrity are not affected. [1] [2] [4]
Quick facts
- Affected product
- The affected package is protobuf from elixir-protobuf, distributed through Hex and GitHub. [1] [2]
- Affected versions
- Package versions from 0.8.0 through 0.17.0 are affected. The CVE record expresses this as 0.8.0 inclusive and less than 0.17.1. [1] [2]
- Fixed version
- The vendor advisory lists version 0.17.1 and later as patched. The associated fix commit is e9432ad1c4099511905353cebcececa3a1f7c3ff. [2] [3]
- Vulnerable entry points
- The affected decoding paths are Protobuf.JSON.decode/3, Protobuf.JSON.decode!/3, and Protobuf.JSON.from_decoded/3. [1] [2]
- Attack prerequisites
- An attacker must be able to reach an application endpoint or processing path that accepts attacker-controlled JSON or parsed data, and the target schema must include a self-referential or cyclic embedded message. No authentication or user interaction is required once that reachable path exists. [1] [2]
- Severity
- The CVE record assigns CVSS 4.0 8.2 High with network attack vector, low attack complexity, no privileges required, and high vulnerable-system availability impact. [1]
- Research status
- The record credits Daniel Coles as reporter and finder, Andrea Leopardi as remediation developer, and Jonatan Männchen / EEF as coordinators. No independently retrieved social-media post about this CVE was found. [1]
What happened
The JSON decoder carried a depth counter and recursion_limit option, but the guard was applied only to Google.Protobuf.ListValue and Google.Protobuf.Struct handling. The generic path for user-defined embedded messages passed the state unchanged into the next recursive call, leaving the depth counter at zero. Consequently, a schema such as a message containing a field of its own type could be traversed indefinitely as the JSON nesting increased. [2] [1]
Impact and attack prerequisites
A sufficiently deep input can exhaust stack and heap resources and crash the decoding process. Repeated or concurrent requests may affect the broader BEAM node or co-located workloads. This is a denial-of-service condition, not a data-disclosure or data-modification issue. The attacker still needs a reachable application path that invokes one of the affected APIs and decodes into a recursive or cyclic user-defined schema. [2] [4]
Affected and fixed versions
The affected release range is protobuf 0.8.0 through 0.17.0. The maintainer's advisory identifies 0.17.1 and later as patched, and the referenced fix changes the decoder so ordinary messages, including nested user-defined messages, contribute to the recursion-depth check. Applications using Git revisions should ensure they are at or beyond commit e9432ad1c4099511905353cebcececa3a1f7c3ff or use the released fixed version. [2] [3] [1]
Defensive next steps
Upgrade protobuf to 0.17.1 or later and review dependency locks, deployed artifacts, and vendored copies. Until upgraded, follow the vendor's workaround by rejecting JSON documents whose nesting depth exceeds a fixed bound before invoking the decoder. General operational considerations, not a vendor-tested fix, include applying request-size limits, isolating decoder workloads, and monitoring for abnormal memory growth or repeated process crashes. The recursion_limit option alone should not be treated as a workaround on affected versions. [2] [1]
Disclosure and research context
The CVE was published on October 9, 2026 by EEF, following external discovery. The vendor advisory was published the same day and documents the affected range, root cause, impact, and remediation. The retrieved primary sources do not establish exploitation in the wild. That absence should be read as an information gap, not as proof that exploitation has not occurred. [1] [2] [4]
Public discussion
No relevant X post with retrievable content was found in this research pass. This does not establish that no discussion exists.
Questions and answers
Am I affected?
You may be affected if your application uses protobuf 0.8.0 through 0.17.0 and passes attacker-controlled JSON or parsed data to the affected JSON APIs for a schema containing a self-referential or cyclic embedded message. Applications that do not use these APIs or do not process untrusted input through recursive schemas do not match the stated prerequisites. [2] [1]
What should I do now?
Upgrade to protobuf 0.17.1 or later, verify the deployed dependency version, and inspect application routes or jobs that decode untrusted JSON. Before upgrading, apply the vendor's stated pre-decoder nesting-depth rejection workaround. [2] [1]
Is a fix available?
Yes. The maintainer advisory lists 0.17.1 and later as patched, and the referenced commit adds depth accounting for ordinary message decoding and tests for recursion-limit behavior. [2] [3]
Does setting recursion_limit protect affected versions?
Not reliably. The CVE and vendor advisory state that the existing option does not constrain recursion through user-defined embedded message types on affected versions. Input must be bounded before decoding, or the package must be upgraded. [1] [2]
What remains uncertain
- Research was performed as of 2026-10-09T22:31:29+00:00.
- No retrievable, relevant X or Twitter post with a visible author and exact status permalink was found.
- The reviewed primary materials do not establish exploitation in the wild or provide a complete inventory of downstream applications using the affected package.
- The CVE record and vendor advisory differ in some descriptive detail about implementation paths; this article follows their shared conclusion that user-defined recursive message decoding bypassed the intended depth guard.
Research sources
Description
Uncontrolled Recursion vulnerability in Protobuf.JSON.Decode in elixir-protobuf protobuf allows an unauthenticated remote attacker to crash the decoding process via a deeply nested JSON document. Any application that decodes attacker-supplied JSON with Protobuf.JSON.decode/3, Protobuf.JSON.decode!/3, or Protobuf.JSON.from_decoded/3 into a schema that contains a self-referential or cyclic message type is affected. In lib/protobuf/json/decode.ex, the embedded-message clause of decode_singular/3 recurses into internal_from_json_data/3 once per nesting level without incrementing or checking the decoder's depth counter. The depth guard increase_depth_and_maybe_throw/1 covers only the Google.Protobuf.ListValue and Google.Protobuf.Struct clauses, so the recursion_limit option has no effect on user-defined message types. Each nesting level allocates a stack frame and heap objects, and a sufficiently deep document exhausts the memory of the decoding process. Confidentiality and integrity are not affected. This issue affects protobuf: from 0.8.0 before 0.17.1.
Severity (CVSS)
| Base score | 8.2 |
|---|---|
| Severity | High |
| Version | CVSS 4.0 |
| Vector | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| Provided by | CNA |
Weaknesses
- CWE-674 — CWE-674 Uncontrolled Recursion
Affected products
| Vendor | Product | Versions |
|---|---|---|
| elixir-protobuf | protobuf | 0.8.0 to <0.17.1 [affected] |
| elixir-protobuf | protobuf | b0a1d4eaffaf50012fa71a8e931a47cf252d0370 to <e9432ad1c4099511905353cebcececa3a1f7c3ff [affected] |
References
- https://github.com/elixir-protobuf/protobuf/security/advisories/GHSA-m497-c2h9-rvw6 (related vendor-advisory)
- https://cna.erlef.org/cves/CVE-2026-104635.html (related)
- https://osv.dev/vulnerability/EEF-CVE-2026-104635 (related)
- https://github.com/elixir-protobuf/protobuf/commit/b0a1d4eaffaf50012fa71a8e931a47cf252d0370 (related)
- https://github.com/elixir-protobuf/protobuf/commit/e9432ad1c4099511905353cebcececa3a1f7c3ff (patch)
Assess this vulnerability
Compare your deployed product and version with the source record. Review vendor references for fixes and workarounds. A CVSS score describes technical severity; it does not establish that your systems are affected or that exploitation has occurred.
Browse all CVE security advisories · Symaro cybersecurity services
Generated from the official CVE List on 10 Oct 2026 19:47 UTC.