Borsh serialization of HashMap is non-canonicalGHSA-wwq9-3cpr-mm53
GHSA-wwq9-3cpr-mm53 is a security vulnerability in hashbrown. A fix is available for hashbrown — see the affected versions and patch details below.
Real-World Exposure
hashbrownReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io packages — download data is not available via public APIs for these ecosystems.
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🦀crates.io | hashbrown | ≥ 0.15.0&&< 0.15.1 | 0.15.1cargo update -p hashbrown --precise 0.15.1 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for hashbrown, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update hashbrown to 0.15.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-wwq9-3cpr-mm53 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is GHSA-wwq9-3cpr-mm53 in your dependencies?
Find it across crates.io, including transitive dependencies.