CVE-2025-31130
gitoxide does not detect SHA-1 collision attacks
Reported by github_m · Published April 4, 2025
gix-archive is fixed in 0.20.0 (crates.io)
gitoxide is an implementation of git written in Rust. Before 0.42.0, gitoxide uses SHA-1 hash implementations without any collision detection, leaving it vulnerable to hash collision attacks. gitoxide uses the sha1_smol or sha1 crate, both of which implement standard SHA-1 without any mitigations for collision attacks. This means that two distinct Git objects with colliding SHA-1 hashes would break the Git object model and integrity checks when used with gitoxide. This vulnerability is fixed in 0.42.0.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| gix-archive | crates.io | 0.20.0 |
| gix-blame | crates.io | 0.1.0 |
| gix-protocol | crates.io | 0.49.0 |
| gix-commitgraph | crates.io | 0.27.0 |
| gitoxide-core | crates.io | 0.46.0 |
| gix | crates.io | 0.71.0 |
| gix-merge | crates.io | 0.4.0 |
| gix-fsck | crates.io | 0.10.0 |
| gix-worktree-state | crates.io | 0.18.0 |
| gix-config | crates.io | 0.44.0 |
| gix-diff | crates.io | 0.51.0 |
| gix-status | crates.io | 0.18.0 |
5 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| GitoxideLabs | gitoxide | < 0.42.0 |
| crates.io | gix-protocol | 0 |
| wolfi | cargo-audit | 0 |
| crates.io | gix-status | 0 |
| wolfi | starship | 0 |
| crates.io | gix-revision | 0 |
| crates.io | gix-archive | 0 |
| crates.io | gix-negotiate | 0 |
| chainguard | helix | 0 |
| crates.io | gix-diff | 0 |
| GitoxideLabs | gitoxide | 0 |
| crates.io | gix-worktree-state | 0 |
| crates.io | gix-odb | 0 |
| chainguard | cargo-c | 0, 0 |
| crates.io | gix-fsck | 0 |
| wolfi | helix | 0 |
| crates.io | gix-traverse | 0 |
| crates.io | gix | 0 |
| crates.io | gix-discover | 0 |
| chainguard | starship | 0 |
…and 17 more
Timeline
- Apr 3, 2025 CVE Published
- Apr 3, 2025 PoC Published (3 in total, the first dated here)
- Apr 5, 2025 EPSS Score (30 in total, the first dated here)
- Jan 23, 2026 CVE Updated
- Mar 18, 2026 Security Advisory (2 in total, the first dated here)
- Jun 13, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-31130
vulnetix vdb fixes CVE-2025-31130
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-31130/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- https://github.com/GitoxideLabs/gitoxide/security/advisories/GHSA-2frx-2596-x5r6 x_refsource_CONFIRM
- https://github.com/GitoxideLabs/gitoxide/commit/f253f02a6658b3b7612a50d56c71f5ae4da4ca21 x_refsource_MISC
- https://nvd.nist.gov/vuln/detail/CVE-2025-31130 advisory
- https://github.com/advisories/GHSA-2frx-2596-x5r6 advisory
- https://github.com/GitoxideLabs/gitoxide url
- https://rustsec.org/advisories/RUSTSEC-2025-0021.html url