rust-lang/hashbrown · Security
Borsh serialization of HashMap is non-canonical
- GHSA ID
- GHSA-wwq9-3cpr-mm53
- Severity
- high
- Published
- Updated
- CVSS v4
- 8.9 · 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
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.
CWEs
- CWE-502 · Deserialization of Untrusted Data