Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. hashbrown
  4. ›
  5. GHSA-wwq9-3cpr-mm53

GHSA-wwq9-3cpr-mm53: Borsh serialization of HashMap is non-canonical

December 4, 2024

The borsh serialization of the HashMap did not follow the borsh specification. It potentially produced non-canonical encodings dependent on insertion order. It also did not perform canonicty checks on decoding.

This can result in consensus splits and cause equivalent objects to be considered distinct.

This was patched in 0.15.1.

References

  • github.com/advisories/GHSA-wwq9-3cpr-mm53
  • github.com/kayabaNerve/hashbrown-borsh-poc
  • github.com/rust-lang/hashbrown
  • github.com/rust-lang/hashbrown/issues/576
  • rustsec.org/advisories/RUSTSEC-2024-0402.html

Code Behaviors & Features

Detect and mitigate GHSA-wwq9-3cpr-mm53 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 0.15.0 before 0.15.1

Fixed versions

  • 0.15.1

Solution

Upgrade to version 0.15.1 or above.

Weakness

  • CWE-502: Deserialization of Untrusted Data

Source file

cargo/hashbrown/GHSA-wwq9-3cpr-mm53.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Mon, 12 May 2025 12:14:53 +0000.