CVE-2025-31130
gitoxide does not detect SHA-1 collision attacks
Also known as GHSA-2frx-2596-x5r6, RUSTSEC-2025-0021
Mitigation
- Upgrade gix-features to 0.41.0 or later.
- Upgrade gix-commitgraph to 0.27.0 or later.
- Upgrade gix-index to 0.39.0 or later.
- Upgrade gix-object to 0.48.0 or later.
- Upgrade gix-odb to 0.68.0 or later.
- Upgrade gix-pack to 0.58.0 or later.
- Upgrade gitoxide to 0.42.0 or later.
- Upgrade gitoxide-core to 0.46.0 or later.
Who should check
- Projects that depend on crates.io package gix-features (< 0.41.0)
- Projects that depend on crates.io package gix-commitgraph (< 0.27.0)
- Projects that depend on crates.io package gix-index (< 0.39.0)
- Projects that depend on crates.io package gix-object (< 0.48.0)
- Projects that depend on crates.io package gix-odb (< 0.68.0)
- Projects that depend on crates.io package gix-pack (< 0.58.0)
- Projects that depend on crates.io package gitoxide (< 0.42.0)
- Projects that depend on crates.io package gitoxide-core (< 0.46.0)
Vulnerability facts
- Affected
- gix-features < 0.41.0; gix-commitgraph < 0.27.0; gix-index < 0.39.0; gix-object < 0.48.0; gix-odb < 0.68.0; gix-pack < 0.58.0; gitoxide < 0.42.0; gitoxide-core < 0.46.0; gix < 0.71.0; gix-archive < 0.20.0; gix-blame < 0.1.0; gix-config < 0.44.0; gix-diff < 0.51.0; gix-dir < 0.13.0; gix-discover < 0.39.0; gix-filter < 0.18.0; gix-fsck < 0.10.0; gix-merge < 0.4.0; gix-negotiate < 0.19.0; gix-protocol < 0.49.0; gix-ref < 0.51.0; gix-revision < 0.33.0; gix-revwalk < 0.19.0; gix-status < 0.18.0; gix-traverse < 0.45.0; gix-worktree < 0.40.0; gix-worktree-state < 0.18.0
- Fixed in
- 0.41.0, 0.27.0, 0.39.0, 0.48.0, 0.68.0, 0.58.0, 0.42.0, 0.46.0, 0.71.0, 0.20.0, 0.1.0, 0.44.0, 0.51.0, 0.13.0, 0.18.0, 0.10.0, 0.4.0, 0.19.0, 0.49.0, 0.33.0, 0.45.0, 0.40.0
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 6.8 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: High
- Privileges required: None
- User interaction: None
- Scope: Changed (impact reaches other components)
- Confidentiality impact: None
- Integrity impact: High
- Availability impact: None
- EPSS
- 0.35% chance of exploitation in 30 days (percentile 21, 2026-11-26)
- CWE
- CWE-328
- Modified
Description
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| crates.io gix-features | < 0.41.0 | 0.41.0 | osv |
| crates.io gix-commitgraph | < 0.27.0 | 0.27.0 | osv |
| crates.io gix-index | < 0.39.0 | 0.39.0 | osv |
| crates.io gix-object | < 0.48.0 | 0.48.0 | osv |
| crates.io gix-odb | < 0.68.0 | 0.68.0 | osv |
| crates.io gix-pack | < 0.58.0 | 0.58.0 | osv |
| crates.io gitoxide | < 0.42.0 | 0.42.0 | osv |
| crates.io gitoxide-core | < 0.46.0 | 0.46.0 | osv |
| crates.io gix | < 0.71.0 | 0.71.0 | osv |
| crates.io gix-archive | < 0.20.0 | 0.20.0 | osv |
| crates.io gix-blame | < 0.1.0 | 0.1.0 | osv |
| crates.io gix-config | < 0.44.0 | 0.44.0 | osv |
| crates.io gix-diff | < 0.51.0 | 0.51.0 | osv |
| crates.io gix-dir | < 0.13.0 | 0.13.0 | osv |
| crates.io gix-discover | < 0.39.0 | 0.39.0 | osv |
| crates.io gix-filter | < 0.18.0 | 0.18.0 | osv |
| crates.io gix-fsck | < 0.10.0 | 0.10.0 | osv |
| crates.io gix-merge | < 0.4.0 | 0.4.0 | osv |
| crates.io gix-negotiate | < 0.19.0 | 0.19.0 | osv |
| crates.io gix-protocol | < 0.49.0 | 0.49.0 | osv |
| crates.io gix-ref | < 0.51.0 | 0.51.0 | osv |
| crates.io gix-revision | < 0.33.0 | 0.33.0 | osv |
| crates.io gix-revwalk | < 0.19.0 | 0.19.0 | osv |
| crates.io gix-status | < 0.18.0 | 0.18.0 | osv |
| crates.io gix-traverse | < 0.45.0 | 0.45.0 | osv |
| crates.io gix-worktree | < 0.40.0 | 0.40.0 | osv |
| crates.io gix-worktree-state | < 0.18.0 | 0.18.0 | osv |
| GitoxideLabs gitoxide | < 0.42.0 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-31130. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-31130.md Affected: gix-features < 0.41.0; gix-commitgraph < 0.27.0; gix-index < 0.39.0; gix-object < 0.48.0; gix-odb < 0.68.0; gix-pack < 0.58.0; gitoxide < 0.42.0; gitoxide-core < 0.46.0; gix < 0.71.0; gix-archive < 0.20.0; gix-blame < 0.1.0; gix-config < 0.44.0; gix-diff < 0.51.0; gix-dir < 0.13.0; gix-discover < 0… Fixed in: 0.41.0, 0.27.0, 0.39.0, 0.48.0, 0.68.0, 0.58.0, 0.42.0, 0.46.0, 0.71.0, 0.20.0, 0.1.0, 0.44.0, 0.51.0, 0.13.0, 0.18.0, 0.10.0, 0.4.0, 0.19.0, 0.49.0, 0.33.0, 0.45.0, 0.40.0 Steps: 1. Search this machine and project for gix-features (crates.io), gix-commitgraph (crates.io), gix-index (crates.io), gix-object (crates.io), gix-odb (crates.io), gix-pack (crates.io): dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2025-31130 being exploited?
There is no confirmed exploitation: CVE-2025-31130 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.35% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-31130?
Medium: CVSS 6.8 (v3.1, scored by CNA). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2025-31130?
gix-features < 0.41.0; gix-commitgraph < 0.27.0; gix-index < 0.39.0; gix-object < 0.48.0; gix-odb < 0.68.0; gix-pack < 0.58.0; gitoxide < 0.42.0; gitoxide-core < 0.46.0; gix < 0.71.0; gix-archive < 0.20.0; gix-blame < 0.1.0; gix-config < 0.44.0; gix-diff < 0.51.0; gix-dir < 0.13.0; gix-discover < 0.39.0; gix-filter < 0.18.0; gix-fsck < 0.10.0; gix-merge < 0.4.0; gix-negotiate < 0.19.0; gix-protocol < 0.49.0; gix-ref < 0.51.0; gix-revision < 0.33.0; gix-revwalk < 0.19.0; gix-status < 0.18.0; gix-traverse < 0.45.0; gix-worktree < 0.40.0; gix-worktree-state < 0.18.0.
Is there a fix for CVE-2025-31130?
Yes. Fixed in 0.41.0, 0.27.0, 0.39.0, 0.48.0, 0.68.0, 0.58.0, 0.42.0, 0.46.0, 0.71.0, 0.20.0, 0.1.0, 0.44.0, 0.51.0, 0.13.0, 0.18.0, 0.10.0, 0.4.0, 0.19.0, 0.49.0, 0.33.0, 0.45.0, 0.40.0. Upgrade gix-features to 0.41.0 or later. Upgrade gix-commitgraph to 0.27.0 or later. Upgrade gix-index to 0.39.0 or later. Upgrade gix-object to 0.48.0 or later. Upgrade gix-odb to 0.68.0 or later. Upgrade gix-pack to 0.58.0 or later. Upgrade gitoxide to 0.42.0 or later. Upgrade gitoxide-core to 0.46.0 or later.
How do I check if I'm affected by CVE-2025-31130?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.