GHSA-wwq9-3cpr-mm53 Borsh serialization of HashMap is non-canonical
Non-canonical HashMap serialization in Borsh can cause consensus splits and treat equivalent objects as distinct, impacting blockchain or distributed systems.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is GHSA-wwq9-3cpr-mm53?
GHSA-wwq9-3cpr-mm53 is a vulnerability in hashbrown, published on 11 Oct 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Which versions are affected by GHSA-wwq9-3cpr-mm53?
3 open source packages ship an affected version, including hashbrown.
| Package | Affected | Fixed in |
|---|---|---|
hashbrown crates.io | From 0.15.0 | 0.15.1 |
hashbrown crates.io | From 0.15.0 | 0.15.1 |
hashbrown crates.io | From 0.15.0 | 0.15.1 |
How do I fix GHSA-wwq9-3cpr-mm53?
Upgrade hashbrown to 0.15.1 or later.
Is GHSA-wwq9-3cpr-mm53 being exploited?
There is no known exploitation of GHSA-wwq9-3cpr-mm53 in the wild and no public exploit code.
Sources
Also known as RUSTSEC-2024-0402.