CVE-2026-104635: Uncontrolled Recursion in elixir-protobuf Package JSON Decoding

protobuf Updated 09 Oct 2026

Summary

09/10/2026
Yes i
High
8.2

CVE-2026-104635: Uncontrolled recursion in elixir-protobuf/protobuf JSON decoding of self-referential messages. Affects protobuf across 2 version ranges.

>= 0.8.0, < 0.17.1 >= b0a1d4eaffaf50012fa71a8e931a47cf252d0370, < e9432ad1c4099511905353cebcececa3a1f7c3ff

Fixed in 0.17.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The elixir-protobuf package is a library for encoding and decoding Protocol Buffers (protobuf) in Elixir applications. It allows developers to serialize structured data efficiently. However, this package is vulnerable to an uncontrolled recursion issue during JSON decoding, particularly when handling self-referential message types, which can lead to significant memory exhaustion and application crashes.

Vulnerability Detail

The vulnerability arises from the Protobuf.JSON.Decode module, which fails to guard against uncontrolled recursion when decoding deeply nested JSON documents. Specifically, the decoding process does not properly track the depth of recursion for user-defined message types, allowing an attacker to craft a JSON document that can recursively reference itself. This can lead to stack and heap exhaustion, causing the decoding process to crash. The vulnerability affects versions of the protobuf package from 0.8.0 to below 0.17.1, and it can be exploited by unauthenticated remote attackers.

How To Fix

Minimum fixed version

0.17.1

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, reject JSON documents with a nesting depth that exceeds a predefined limit at the web or middleware layer before passing them to the decoder. For example, you can implement a check like this in your application:

def validate_json_depth(json, max_depth) do
  depth = calculate_depth(json)
  if depth > max_depth do
    {:error, :depth_exceeded}
  else
    :ok
  end
end

defp calculate_depth(value, depth \ 0) do
  case value do
    %{} ->
      Enum.reduce(value, depth + 1, fn {_key, val}, acc ->
        calculate_depth(val, acc)
      end)
    _ ->
      depth
  end
end

Conclusion

CVE-2026-104635 represents a significant risk for applications using the elixir-protobuf package due to uncontrolled recursion during JSON decoding. It is crucial to update to the patched version or implement workarounds to mitigate the risk of application crashes.

See every vulnerability recorded for protobuf →

Share this vulnerability

FAQ

CVE-2026-104635 is a vulnerability in the elixir-protobuf package that allows for uncontrolled recursion during JSON decoding, potentially leading to application crashes.

You can check if your application is affected by using Vulert, which monitors and alerts for open-source vulnerabilities. You can access the Vulert playground at Vulert Scanner without any signup.

The vulnerability affects elixir-protobuf versions from 0.8.0 to below 0.17.1.

If you cannot update the package right away, implement a workaround by rejecting deeply nested JSON documents at the web or middleware layer.

The CVSS score of this vulnerability is 8.2, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for protobuf.

How To Fix

Minimum fixed version

0.17.1

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback

Follow Vulert in Google

Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.