GHSA-wwq9-3cpr-mm53: Hashbrown Borsh Serialization Of HashMap Is Vulnerability
HIGHGHSA-wwq9-3cpr-mm53 is a HIGH borsh serialization of hashmap is vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Hashbrown libraries in the crates.io ecosystem. The issue involves borsh serialization of hashmap is non-canonical. Remediation is available by upgrading affected packages to version 0.15.1.
GHSA-wwq9-3cpr-mm53 at a Glance
How to Fix GHSA-wwq9-3cpr-mm53
To remediate this vulnerability, upgrade all affected Hashbrown dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade hashbrown to 0.15.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for hashbrown
How to Check if You Are Affected
To determine whether your application is affected by GHSA-wwq9-3cpr-mm53, inspect your project dependencies for Hashbrown:
inspect dependencies for hashbrown
Analyze the terminal output to locate any version of Hashbrown in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.15.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Hashbrown, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-wwq9-3cpr-mm53 Affected Hashbrown Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
hashbrown
|
crates.io |
≥ 0.15.0
< 0.15.1
|
0.15.1
|
References
Frequently Asked Questions
What is GHSA-wwq9-3cpr-mm53?
Which Hashbrown versions are affected?
What version fixes GHSA-wwq9-3cpr-mm53?
Is hashbrown affected?
What CWE is associated with GHSA-wwq9-3cpr-mm53?
How can I check crates.io dependencies for GHSA-wwq9-3cpr-mm53?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wwq9-3cpr-mm53",
"modified" : "2024-12-04T18:29:15Z",
"published" : "2024-12-04T18:29:15Z",
"aliases" : [ ],
"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.\n\nThis can result in consensus splits and cause equivalent objects to be considered distinct.\n\nThis was patched in 0.15.1.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "hashbrown"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.15.0"
}, {
"fixed" : "0.15.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/rust-lang/hashbrown/issues/576"
}, {
"type" : "WEB",
"url" : "https://github.com/kayabaNerve/hashbrown-borsh-poc"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rust-lang/hashbrown"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2024-0402.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-502" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-12-04T18:29:15Z",
"nvd_published_at" : null
}
}