RUSTSEC-2024-0402

Source
https://rustsec.org/advisories/RUSTSEC-2024-0402
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2024-0402.json
JSON Data
https://api.test.osv.dev/v1/vulns/RUSTSEC-2024-0402
Aliases
Published
2024-10-11T12:00:00Z
Modified
2025-10-28T06:29:53.834037Z
Summary
Borsh serialization of HashMap is non-canonical
Details

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.

Database specific
{
    "license": "CC0-1.0"
}
References

Affected packages

crates.io / hashbrown

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.15.0
Fixed
0.15.1

Ecosystem specific

{
    "affected_functions": null,
    "affects": {
        "arch": [],
        "os": [],
        "functions": [
            "hashbrown::HashMap::borsh_serialize"
        ]
    }
}

Database specific

cvss

null

informational

null

categories

[]