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

- Severity: High (CVSS:4.0, scored by GitHub) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-10-11T12:00:00.000Z
- Modified: 2026-09-10T03:50:21.714Z
- Also known as: RUSTSEC-2024-0402
- Weaknesses: CWE-502

## Description

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.

(As written by GitHub Advisory Database.)

## Affected

- hashbrown (crates.io): from 0.15.0 before 0.15.1

## References

- <https://github.com/kayabaNerve/hashbrown-borsh-poc> (exploit, web)
- <https://github.com/rust-lang/hashbrown/issues/576> (report, web)
- <https://github.com/rust-lang/hashbrown> (package)
- <https://rustsec.org/advisories/RUSTSEC-2024-0402.html> (advisory, web)
- <https://crates.io/crates/hashbrown> (package)

## Sources

- GitHub Advisory Database: [GHSA-wwq9-3cpr-mm53](https://github.com/advisories/GHSA-wwq9-3cpr-mm53), CC-BY-4.0, modified 2026-09-10
- RustSec Advisory Database: [RUSTSEC-2024-0402](https://rustsec.org/advisories/RUSTSEC-2024-0402.html), CC0-1.0, modified 2025-10-28

---

Page: https://cve.day/GHSA-wwq9-3cpr-mm53 · Whole record: https://cve.day/GHSA-wwq9-3cpr-mm53.json · Rebuilt by cve.day 2026-11-25T22:56:43.224Z
