cargo package report

Is negentropy safe?

1 known vulnerability, worst severity HIGH.

// reach

0 direct dependencies

none carry a known advisory

    0 packages depend on it

    an advisory here reaches each of them

      Create a free accountfor every dependency path, dependent and what to upgrade
      // ai model usage

      Tracked for PyPI packages. HuggingFace models declare Python dependencies, so cargo packages are not covered.


      cvss
      0.0
      high

      severity band, no base score published

      epss
      not scored

      chance of exploitation in 30 days

      xyz score
      0.0
      low

      CyberXYZ composite out of 10

      fig. 01 — RUSTSEC-2026-0365, the advisory selected below

      // 1 advisories

      RUSTSEC-2026-0365

      HIGH
      // summary

      The negentropy crate is vulnerable to denial-of-service through an unchecked, peer-controlled ID count in reconciliation messages.

      With the std feature enabled, which is the default configuration, a small malformed message can trigger an enormous memory allocation and terminate the application.

      // details

      When processing an IdList range, the reconciliation parser uses the peer-provided ID count to reserve memory before checking whether the message contains the corresponding IDs:

      let mut their_elems: HashSet =
          HashSet::with_capacity(num_ids as usize);

      An attacker can declare an arbitrarily large count without supplying any IDs. The allocation occurs before the parser reaches the ID-reading loop, which would otherwise reject the truncated message.

      With Rust's default allocation-error behavior, a failed allocation aborts the process rather than unwinding. Consequently, catchunwind cannot contain the failure.

      Both reconcile and reconcilewithids reach the vulnerable parser.

      The patched versions validate the count against the remaining message length before allocating:

      if num_ids > (query.len() / ID_SIZE) as u64 {
          return Err(Error::ParseEndsPrematurely);
      }
      // impact

      An unauthenticated remote attacker can terminate an application that exposes reconciliation to untrusted peers without additional validation.

      For example, a Nostr relay that forwards NEG-OPEN or NEG-MSG reconciliation payloads to the vulnerable parser can be taken down by a single client message. Clients processing messages from malicious relays are also exposed.

      This specific vulnerability affects builds with the default std feature enabled. Builds without std use a BTreeSet and do not perform the vulnerable preallocation.

      A message-size limit alone does not prevent exploitation because the malicious payload can be only a few bytes long.

      // credit

      Discovered and fixed by Alex Gleason ().


      Checked 2026-10-17 at 08:06 UTC. The most recent advisory here was published 2026-10-14. Updated continuously from NVD, GHSA, OSV and CNA feeds.

      Think a verdict here is wrong? Tell us — we respond within 2 business days.