Elixir-protobuf protobuf
Elixir protobuf: Unbounded recursion depth in embedded-message decoding
Elixir protobuf is a pure Elixir implementation of Google Protobuf. From 0.8.0 until 0.16.1, services that decode attacker-controlled protobuf bytes with Protobuf.Decoder can be taken offline when the schema contains a self-referential or cyclic message type. In lib/protobuf/decoder.ex, Protobuf.Decoder.value_for_field/3 handles an embedded?: true field by recursively entering the decode / build_message / handle_value / value_for_field call chain without enforcing a nesting-depth limit. Deeply nested embedded fields retain non-tail recursive frames, allowing a comparatively small request to consume substantial CPU and memory, pin a BEAM scheduler, and exhaust the node. This issue is fixed in version 0.16.1.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 0.8.0, < 0.16.1
Fixed in 0.16.1
Mitigation
Upgrade protobuf to 0.16.1 or later.
References
- Vendor advisory github.com/elixir-protobuf/protobuf/security/a…
- Patch github.com/elixir-protobuf/protobuf/commit/352…
- Patch github.com/elixir-protobuf/protobuf/commit/b8e…
1 more
- Release notes github.com/elixir-protobuf/protobuf/releases/t…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.