Vulnerability DatabaseGHSA-4jh8-33j3-h73j

GHSA-4jh8-33j3-h73j: 
Rust vulnerability analysis and mitigation

Summary

decode_lookup_raw_reply (peeroxide-dht/src/hyperdht_messages.rs ~L256) reads the peer count with decode_uint (up to u64) and calls Vec::with_capacity(count) with no bound, before checking that the buffer holds that many entries. Unlike the other array decoders, it has no ArrayTooLarge check.

Impact

HyperDhtHandle::lookup (hyperdht.rs ~L600) decodes the reply value from every DHT node it queries. Any node on the DHT that is reached during a lookup can send a few bytes claiming e.g. 2^40 peers: the allocation fails and the process aborts (or panics with capacity overflow for larger counts). This affects every swarm client and the CLI lookup.

Suggested fix

  • Reject counts above a cap, and above what the remaining bytes could hold (each HyperPeer is at least 33 bytes).
  • Hardening: the other decoders cap at 1,048,576 entries but still preallocate that many up front; bounding capacity by remaining bytes would close that small amplification too (decode_ipv4_peer_array, decode_relay_info_array, compact_encoding::decode_*_array, messages.rs::decode_ipv4_array).
  • Add a test that a reply with a huge count returns an error.

Fix

  • The LOOKUP reply decoder now reads its peer count with decode_array_len, like every other array decoder that preallocates.
  • decode_array_len rejects:
    • a count above the existing cap of 1,048,576;
    • a count whose items could not fit in the bytes left. Each item has a minimum size, 33 bytes for a peer.
  • An allocation can therefore never be larger than the message the peer actually sent.
  • The other array decoders that preallocated, and were bounded only by the 1,048,576 cap, now get the same check.
  • Covered by tests with oversized and inconsistent counts. Fixed in commit 6e2e0cd.

Reported by

Joachim Schiele (@qknight), #49 / https://github.com/nixcloud/sshcrab#7-changes-to-the-peeroxide-code


Source: NVD

Related Rust vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-78jj-xfpm-g6pxHIGH7.8
  • JavaScript logoJavaScript
  • alint-dsl
NoYesNov 22, 2026
GHSA-pchg-rmv6-56f4MEDIUMN/A
  • Rust logoRust
  • peeroxide-dht
NoYesNov 22, 2026
GHSA-m2w2-wg2f-5p57HIGHN/A
  • Rust logoRust
  • peeroxide-dht
NoYesNov 22, 2026
GHSA-4jh8-33j3-h73jHIGHN/A
  • Rust logoRust
  • peeroxide-dht
NoYesNov 22, 2026
GHSA-48wj-x5q3-ggfqMEDIUMN/A
  • Rust logoRust
  • peeroxide
NoYesNov 22, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management