{"id":"CVE-2025-31130","aliases":["DEBIAN-CVE-2025-31130","EUVD-2025-9751","GHSA-2frx-2596-x5r6","RUSTSEC-2025-0021","UBUNTU-CVE-2025-31130","openSUSE-SU-2025:14994-1","openSUSE-SU-2026:21558-1"],"status":"published","title":"gitoxide does not detect SHA-1 collision attacks","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.","severity":{"version":"3.1","score":6.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00261,"percentile":0.18091,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-328"],"published":"2025-04-03T12:00:00Z","modified":"2026-11-09T11:00:02Z","fixes":[{"ecosystem":"crates.io","package":"gix-features","fixed_in":["0.41.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gix-commitgraph","fixed_in":["0.27.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gix-index","fixed_in":["0.39.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gix-object","fixed_in":["0.48.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gix-odb","fixed_in":["0.68.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gix-pack","fixed_in":["0.58.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gitoxide","fixed_in":["0.42.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gitoxide-core","fixed_in":["0.46.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gix","fixed_in":["0.71.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gix-archive","fixed_in":["0.20.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gix-blame","fixed_in":["0.1.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gix-config","fixed_in":["0.44.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gix-diff","fixed_in":["0.51.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gix-dir","fixed_in":["0.13.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gix-discover","fixed_in":["0.39.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gix-filter","fixed_in":["0.18.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gix-fsck","fixed_in":["0.10.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gix-merge","fixed_in":["0.4.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gix-negotiate","fixed_in":["0.19.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gix-protocol","fixed_in":["0.49.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gix-ref","fixed_in":["0.51.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gix-revision","fixed_in":["0.33.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gix-revwalk","fixed_in":["0.19.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gix-status","fixed_in":["0.18.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gix-traverse","fixed_in":["0.45.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gix-worktree","fixed_in":["0.40.0"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"gix-worktree-state","fixed_in":["0.18.0"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:13","package":"rust-gix-features","fixed_in":["0.39.1-2"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"rust-gix-features","fixed_in":["0.39.1-2"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"gix-features","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.41.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gix-commitgraph","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.27.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gix-index","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.39.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gix-object","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.48.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gix-odb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.68.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gix-pack","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.58.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gitoxide","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.42.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gitoxide-core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.46.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gix","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.71.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gix-archive","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.20.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gix-blame","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.1.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gix-config","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.44.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gix-diff","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.51.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gix-dir","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.13.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gix-discover","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.39.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gix-filter","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.18.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gix-fsck","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.10.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gix-merge","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.4.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gix-negotiate","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.19.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gix-protocol","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.49.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gix-ref","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.51.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gix-revision","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.33.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gix-revwalk","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.19.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gix-status","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.18.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gix-traverse","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.45.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gix-worktree","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.40.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"gix-worktree-state","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.18.0"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"rust-gix-features","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.39.1-2"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"rust-gix-features","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.39.1-2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-features","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.41.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-commitgraph","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.27.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-index","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.39.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-object","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.48.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-odb","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.68.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-pack","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.58.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gitoxide","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.42.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gitoxide-core","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.46.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.71.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-archive","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.20.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-blame","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.1.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-config","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.44.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-diff","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.51.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-dir","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.13.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-discover","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.39.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-filter","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.18.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-fsck","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.10.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-merge","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.4.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-negotiate","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.19.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-protocol","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.49.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-ref","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.51.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-revision","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.33.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-revwalk","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.19.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-status","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.18.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-traverse","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.45.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-worktree","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.40.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-worktree-state","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.18.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"gix-features","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.41.0"}]}]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"rust-gix-features","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.36.0-1","0.36.0-2","0.36.1-1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"rust-gix-features","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.39.1-1","0.39.1-2"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"rust-gix-features","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.43.1-1","0.48.0-1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"rust-gix-features","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.39.1-2","0.43.1-1"]},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"gitoxide","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.42.0-1.1"}]}],"bundled":2},{"source":"osv","ecosystem":"openSUSE:Leap 16.0","package":"gitoxide","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.56.0-bp160.1.1"}]}],"bundled":5}],"products":[{"vendor":"gitoxidelabs","product":"gitoxide"}],"references":[{"url":"https://github.com/GitoxideLabs/gitoxide/security/advisories/GHSA-2frx-2596-x5r6","tags":["x_refsource_CONFIRM","exploit","advisory","web","report"]},{"url":"https://github.com/GitoxideLabs/gitoxide/commit/f253f02a6658b3b7612a50d56c71f5ae4da4ca21","tags":["x_refsource_MISC","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-31130","tags":["advisory","web"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2025-0021.html","tags":["web","advisory","report"]},{"url":"https://github.com/advisories/GHSA-2frx-2596-x5r6"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/31xxx/CVE-2025-31130.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2025-31130","tags":["advisory"]},{"url":"https://github.com/GitoxideLabs/gitoxide","tags":["package"]},{"url":"https://crates.io/crates/gix-features","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2025-31130","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2025-31130","tags":["report"]},{"url":"https://github.com/GitoxideLabs/gitoxide/commit/4660f7a6f71873311f68f170b0f1f6659a02829d","tags":["report"]},{"url":"https://lists.opensuse.org/archives/list/security-announce@lists.opensuse.org/thread/UB7J3ICQXX5X3DH3GBAB3YV3PB7REZNJ/","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2025-22620","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2025-31130","tags":["web"]},{"url":"","tags":["advisory"]},{"url":"https://bugzilla.suse.com/1223249","tags":["report"]},{"url":"https://bugzilla.suse.com/1236139","tags":["report"]},{"url":"https://bugzilla.suse.com/1240872","tags":["report"]},{"url":"https://bugzilla.suse.com/1266434","tags":["report"]},{"url":"https://bugzilla.suse.com/1274525","tags":["report"]},{"url":"https://www.suse.com/security/cve/CVE-2024-32650","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-25541","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-40034","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2025-31130","title":"gitoxide does not detect SHA-1 collision attacks","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.","status":"published","published":"2025-04-04T14:41:56.355Z","modified":"2026-01-23T17:08:57.443Z","cvss":[{"version":"3.1","score":6.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-328"],"updated_at":"2026-11-02T14:32:44.424933Z"}],"euvd":[{"id":"EUVD-2025-9751","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.","status":"published","published":"2025-04-04T14:41:56Z","modified":"2026-01-23T17:08:57Z","cvss":[{"version":"3.1","score":6.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N","level":"medium"}],"updated_at":"2026-11-02T19:48:48.084617Z"}],"ghsa":[{"id":"GHSA-2frx-2596-x5r6","title":"gitoxide does not detect SHA-1 collision attacks","description":"### Summary\ngitoxide uses SHA-1 hash implementations without any collision detection, leaving it vulnerable to hash collision attacks.\n\n### Details\ngitoxide 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.\n\nThe SHA-1 function is considered cryptographically insecure. However, in the wake of the SHAttered attacks, this issue was mitigated in Git 2.13.0 in 2017 by using the [sha1collisiondetection](https://github.com/crmarcstevens/sha1collisiondetection) algorithm by default and producing an error when known SHA-1 collisions are detected. Git is in the process of migrating to using SHA-256 for object hashes, but this has not been rolled out widely yet and gitoxide does not support SHA-256 object hashes.\n\n### PoC\nThe following program demonstrates the problem, using the two [SHAttered PDFs](https://shattered.io/):\n\n```rust\nuse sha1_checked::{CollisionResult, Digest};\n\nfn sha1_oid_of_file(filename: \u0026str) -\u003e gix::ObjectId {\n    let mut hasher = gix::features::hash::hasher(gix::hash::Kind::Sha1);\n    hasher.update(\u0026std::fs::read(filename).unwrap());\n    gix::ObjectId::Sha1(hasher.digest())\n}\n\nfn sha1dc_oid_of_file(filename: \u0026str) -\u003e Result\u003cgix::ObjectId, String\u003e {\n    // Matches Git’s behaviour.\n    let mut hasher = sha1_checked::Builder::default().safe_hash(false).build();\n    hasher.update(\u0026std::fs::read(filename).unwrap());\n    match hasher.try_finalize() {\n        CollisionResult::Ok(digest) =\u003e Ok(gix::ObjectId::Sha1(digest.into())),\n        CollisionResult::Mitigated(_) =\u003e unreachable!(),\n        CollisionResult::Collision(digest) =\u003e Err(format!(\n            \"Collision attack: {}\",\n            gix::ObjectId::Sha1(digest.into()).to_hex()\n        )),\n    }\n}\n\nfn main() {\n    dbg!(sha1_oid_of_file(\"shattered-1.pdf\"));\n    dbg!(sha1_oid_of_file(\"shattered-2.pdf\"));\n    dbg!(sha1dc_oid_of_file(\"shattered-1.pdf\"));\n    dbg!(sha1dc_oid_of_file(\"shattered-2.pdf\"));\n}\n```\n\nThe output is as follows:\n\n```\n[src/main.rs:24:5] sha1_oid_of_file(\"shattered-1.pdf\") = Sha1(38762cf7f55934b34d179ae6a4c80cadccbb7f0a)\n[src/main.rs:25:5] sha1_oid_of_file(\"shattered-2.pdf\") = Sha1(38762cf7f55934b34d179ae6a4c80cadccbb7f0a)\n[src/main.rs:26:5] sha1dc_oid_of_file(\"shattered-1.pdf\") = Err(\n    \"Collision attack: 38762cf7f55934b34d179ae6a4c80cadccbb7f0a\",\n)\n[src/main.rs:27:5] sha1dc_oid_of_file(\"shattered-2.pdf\") = Err(\n    \"Collision attack: 38762cf7f55934b34d179ae6a4c80cadccbb7f0a\",\n)\n```\n\nThe latter behaviour matches Git.\n\nSince the SHAttered PDFs are not in a valid format for Git objects, a direct proof‐of‐concept using higher‐level APIs cannot be immediately demonstrated without significant computational resources.\n\n### Impact\nAn attacker with the ability to mount a collision attack on SHA-1 like the [SHAttered](https://shattered.io/) or [SHA-1 is a Shambles](https://sha-mbles.github.io/) attacks could create two distinct Git objects with the same hash. This is becoming increasingly affordable for well‐resourced attackers, with the Shambles researchers in 2020 estimating $45k for a chosen‐prefix collision or $11k for a classical collision, and projecting less than $10k for a chosen‐prefix collision by 2025. The result could be used to disguise malicious repository contents, or potentially exploit assumptions in the logic of programs using gitoxide to cause further vulnerabilities.\n\nThis vulnerability affects any user of gitoxide, including `gix-*` library crates, that reads or writes Git objects.","status":"published","published":"2025-04-04T16:06:08Z","modified":"2026-01-23T17:09:15Z","cvss":[{"version":"3.1","score":6.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N","level":"medium"}],"cwes":["CWE-328"],"updated_at":"2026-11-02T14:39:19.525691Z"}],"nvd":[{"id":"CVE-2025-31130","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.","status":"published","published":"2025-04-04T15:15:48.32Z","modified":"2026-06-17T09:09:54.553Z","cvss":[{"version":"3.1","score":6.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N","level":"medium","assessor":"secondary"}],"cwes":["CWE-328"],"updated_at":"2026-11-02T14:10:58.094557Z"}],"osv":[{"id":"CVE-2025-31130","title":"gitoxide does not detect SHA-1 collision attacks","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.","status":"published","published":"2025-04-04T14:41:56.355Z","modified":"2026-10-28T02:30:33.396383937Z","cvss":[{"version":"3.1","score":6.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N","level":"medium"}],"cwes":["CWE-328"],"updated_at":"2026-11-02T15:44:48.02508Z"},{"id":"DEBIAN-CVE-2025-31130","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.","status":"published","published":"2025-04-04T15:15:48.32Z","modified":"2026-09-01T20:05:46.138584339Z","cvss":[{"version":"3.1","score":6.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N","level":"medium"}],"updated_at":"2026-11-02T15:45:45.870237Z"},{"id":"GHSA-2frx-2596-x5r6","title":"gitoxide does not detect SHA-1 collision attacks","description":"### Summary\ngitoxide uses SHA-1 hash implementations without any collision detection, leaving it vulnerable to hash collision attacks.\n\n### Details\ngitoxide 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.\n\nThe SHA-1 function is considered cryptographically insecure. However, in the wake of the SHAttered attacks, this issue was mitigated in Git 2.13.0 in 2017 by using the [sha1collisiondetection](https://github.com/crmarcstevens/sha1collisiondetection) algorithm by default and producing an error when known SHA-1 collisions are detected. Git is in the process of migrating to using SHA-256 for object hashes, but this has not been rolled out widely yet and gitoxide does not support SHA-256 object hashes.\n\n### PoC\nThe following program demonstrates the problem, using the two [SHAttered PDFs](https://shattered.io/):\n\n```rust\nuse sha1_checked::{CollisionResult, Digest};\n\nfn sha1_oid_of_file(filename: \u0026str) -\u003e gix::ObjectId {\n    let mut hasher = gix::features::hash::hasher(gix::hash::Kind::Sha1);\n    hasher.update(\u0026std::fs::read(filename).unwrap());\n    gix::ObjectId::Sha1(hasher.digest())\n}\n\nfn sha1dc_oid_of_file(filename: \u0026str) -\u003e Result\u003cgix::ObjectId, String\u003e {\n    // Matches Git’s behaviour.\n    let mut hasher = sha1_checked::Builder::default().safe_hash(false).build();\n    hasher.update(\u0026std::fs::read(filename).unwrap());\n    match hasher.try_finalize() {\n        CollisionResult::Ok(digest) =\u003e Ok(gix::ObjectId::Sha1(digest.into())),\n        CollisionResult::Mitigated(_) =\u003e unreachable!(),\n        CollisionResult::Collision(digest) =\u003e Err(format!(\n            \"Collision attack: {}\",\n            gix::ObjectId::Sha1(digest.into()).to_hex()\n        )),\n    }\n}\n\nfn main() {\n    dbg!(sha1_oid_of_file(\"shattered-1.pdf\"));\n    dbg!(sha1_oid_of_file(\"shattered-2.pdf\"));\n    dbg!(sha1dc_oid_of_file(\"shattered-1.pdf\"));\n    dbg!(sha1dc_oid_of_file(\"shattered-2.pdf\"));\n}\n```\n\nThe output is as follows:\n\n```\n[src/main.rs:24:5] sha1_oid_of_file(\"shattered-1.pdf\") = Sha1(38762cf7f55934b34d179ae6a4c80cadccbb7f0a)\n[src/main.rs:25:5] sha1_oid_of_file(\"shattered-2.pdf\") = Sha1(38762cf7f55934b34d179ae6a4c80cadccbb7f0a)\n[src/main.rs:26:5] sha1dc_oid_of_file(\"shattered-1.pdf\") = Err(\n    \"Collision attack: 38762cf7f55934b34d179ae6a4c80cadccbb7f0a\",\n)\n[src/main.rs:27:5] sha1dc_oid_of_file(\"shattered-2.pdf\") = Err(\n    \"Collision attack: 38762cf7f55934b34d179ae6a4c80cadccbb7f0a\",\n)\n```\n\nThe latter behaviour matches Git.\n\nSince the SHAttered PDFs are not in a valid format for Git objects, a direct proof‐of‐concept using higher‐level APIs cannot be immediately demonstrated without significant computational resources.\n\n### Impact\nAn attacker with the ability to mount a collision attack on SHA-1 like the [SHAttered](https://shattered.io/) or [SHA-1 is a Shambles](https://sha-mbles.github.io/) attacks could create two distinct Git objects with the same hash. This is becoming increasingly affordable for well‐resourced attackers, with the Shambles researchers in 2020 estimating $45k for a chosen‐prefix collision or $11k for a classical collision, and projecting less than $10k for a chosen‐prefix collision by 2025. The result could be used to disguise malicious repository contents, or potentially exploit assumptions in the logic of programs using gitoxide to cause further vulnerabilities.\n\nThis vulnerability affects any user of gitoxide, including `gix-*` library crates, that reads or writes Git objects.","status":"published","published":"2025-04-04T16:06:08Z","modified":"2026-09-10T03:50:56.896644678Z","cvss":[{"version":"3.1","score":6.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N","level":"medium"}],"cwes":["CWE-328"],"updated_at":"2026-11-02T15:46:34.338541Z"},{"id":"RUSTSEC-2025-0021","title":"SHA-1 collision attacks are not detected","description":"### Summary\ngitoxide uses SHA-1 hash implementations without any collision detection, leaving it vulnerable to hash collision attacks.\n\n### Details\ngitoxide 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.\n\nThe SHA-1 function is considered cryptographically insecure. However, in the wake of the SHAttered attacks, this issue was mitigated in Git 2.13.0 in 2017 by using the [sha1collisiondetection](https://github.com/crmarcstevens/sha1collisiondetection) algorithm by default and producing an error when known SHA-1 collisions are detected. Git is in the process of migrating to using SHA-256 for object hashes, but this has not been rolled out widely yet and gitoxide does not support SHA-256 object hashes.\n\n### PoC\nThe following program demonstrates the problem, using the two [SHAttered PDFs](https://shattered.io/):\n\n```rust\nuse sha1_checked::{CollisionResult, Digest};\n\nfn sha1_oid_of_file(filename: \u0026str) -\u003e gix::ObjectId {\n    let mut hasher = gix::features::hash::hasher(gix::hash::Kind::Sha1);\n    hasher.update(\u0026std::fs::read(filename).unwrap());\n    gix::ObjectId::Sha1(hasher.digest())\n}\n\nfn sha1dc_oid_of_file(filename: \u0026str) -\u003e Result\u003cgix::ObjectId, String\u003e {\n    // Matches Git’s behaviour.\n    let mut hasher = sha1_checked::Builder::default().safe_hash(false).build();\n    hasher.update(\u0026std::fs::read(filename).unwrap());\n    match hasher.try_finalize() {\n        CollisionResult::Ok(digest) =\u003e Ok(gix::ObjectId::Sha1(digest.into())),\n        CollisionResult::Mitigated(_) =\u003e unreachable!(),\n        CollisionResult::Collision(digest) =\u003e Err(format!(\n            \"Collision attack: {}\",\n            gix::ObjectId::Sha1(digest.into()).to_hex()\n        )),\n    }\n}\n\nfn main() {\n    dbg!(sha1_oid_of_file(\"shattered-1.pdf\"));\n    dbg!(sha1_oid_of_file(\"shattered-2.pdf\"));\n    dbg!(sha1dc_oid_of_file(\"shattered-1.pdf\"));\n    dbg!(sha1dc_oid_of_file(\"shattered-2.pdf\"));\n}\n```\n\nThe output is as follows:\n\n```\n[src/main.rs:24:5] sha1_oid_of_file(\"shattered-1.pdf\") = Sha1(38762cf7f55934b34d179ae6a4c80cadccbb7f0a)\n[src/main.rs:25:5] sha1_oid_of_file(\"shattered-2.pdf\") = Sha1(38762cf7f55934b34d179ae6a4c80cadccbb7f0a)\n[src/main.rs:26:5] sha1dc_oid_of_file(\"shattered-1.pdf\") = Err(\n    \"Collision attack: 38762cf7f55934b34d179ae6a4c80cadccbb7f0a\",\n)\n[src/main.rs:27:5] sha1dc_oid_of_file(\"shattered-2.pdf\") = Err(\n    \"Collision attack: 38762cf7f55934b34d179ae6a4c80cadccbb7f0a\",\n)\n```\n\nThe latter behaviour matches Git.\n\nSince the SHAttered PDFs are not in a valid format for Git objects, a direct proof‐of‐concept using higher‐level APIs cannot be immediately demonstrated without significant computational resources.\n\n### Impact\nAn attacker with the ability to mount a collision attack on SHA-1 like the [SHAttered](https://shattered.io/) or [SHA-1 is a Shambles](https://sha-mbles.github.io/) attacks could create two distinct Git objects with the same hash. This is becoming increasingly affordable for well‐resourced attackers, with the Shambles researchers in 2020 estimating $45k for a chosen‐prefix collision or $11k for a classical collision, and projecting less than $10k for a chosen‐prefix collision by 2025. The result could be used to disguise malicious repository contents, or potentially exploit assumptions in the logic of programs using gitoxide to cause further vulnerabilities.\n\nThis vulnerability affects any user of gitoxide, including `gix-*` library crates, that reads or writes Git objects.","status":"published","published":"2025-04-03T12:00:00Z","modified":"2026-11-09T11:00:02.587678233Z","cvss":[{"version":"3.1","score":6.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N","level":"medium"}],"updated_at":"2026-11-09T11:24:16.480676Z"},{"id":"UBUNTU-CVE-2025-31130","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.","status":"published","published":"2025-04-04T15:15:00Z","modified":"2026-10-17T12:56:50.183945755Z","cvss":[{"version":"3.1","score":6.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N","level":"medium"}],"updated_at":"2026-11-02T16:55:28.829873Z"},{"id":"openSUSE-SU-2025:14994-1","title":"gitoxide-0.42.0-1.1 on GA media","description":"These are all security issues fixed in the gitoxide-0.42.0-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2025-04-15T00:00:00Z","modified":"2026-02-04T04:19:43.670142Z","updated_at":"2026-11-02T16:58:37.399567Z"},{"id":"openSUSE-SU-2026:21558-1","title":"Security update for gitoxide","description":"This update for gitoxide fixes the following issues:\n\nChanges in gitoxide:\n\n- Update to 0.56.0:\n  * Fixes CVE-2026-40034 (boo#1266434): the CommandForbiddenInModules\n    trust check could be bypassed in gix_submodule::File::update(),\n    which allowed arbitrary command execution from a crafted\n    .gitmodules file\n  * Fixes a submodule name validation bypass that allowed traversal\n    out of .git/modules and disclosure of credentials\n  * Fixes symlinked .gitmodules files being followed and parsed from\n    outside the repository\n  * Fixes several denial-of-service vectors in gix-pack: unchecked\n    indexing panics and uncapped allocations from crafted pack data\n  * Fixes HTTP credentials being leaked to the redirected host by the\n    curl transport backend\n  * Add the gix config show, gix config list, gix config fmt,\n    gix free remote refs, gix free trust, gix dirwalk and gix tix\n    subcommands\n  * Add a gix status --untracked flag and gix merge tree --message\n    for creating commits\n  * gix exclude query is now index-aware and no longer reports ignore\n    matches for tracked files, matching git check-ignore\n  * Preserve all configured remote URLs rather than only the last one\n  * Fix fetching and cloning with tag refspecs in shallow clones,\n    relative worktree linking files and loose ref path-prefix\n    collisions\n  * Update the crates to the Rust 2024 edition\n- Refresh the vendored dependencies. Recording the state of the\n  remaining open CVE bugs against this version, none of which it is\n  affected by:\n  * CVE-2026-25541 (boo#1274525): the vendored bytes is now 1.12.1,\n    above the 1.11.1 fix\n  * CVE-2025-22620 (boo#1236139): gix-worktree-state is 0.33.0, far\n    above the 0.17.0 that fixed the world-writable checkout of\n    executable files\n\n- update to 0.50.0:\n  see https://github.com/GitoxideLabs/gitoxide/compare/v0.42.0...v0.50.0\n\n- update to 0.42.0:\n  * add first 'debug' version of gix diff file\n  * use revspecs for revision and path\n  * CVE-2025-31130: use collision-detecting SHA-1 hash boo#1240872\n\n- Update to version 0.41.0:\n  * add gix blame -L start,end\n  * add gix env to print paths relevant to the Git installation.\n  * Document the remaining subcommands\n  * Add support for statistics and additional performance\n    information.\n  * add gix blame to the CLI. That way it's possible to see the\n    blame result of any file in the repository.\n\n- Updates from version 0.40.0:\n  * add first 'debug' version of gix log. It's primarily meant to\n    better understand gix blame.\n  * add --tree-favor to gix merge tree|commit. With it one can\n    decide which side to favor in case of irreconcilable\n    tree-conflicts.\n  * CVE-2025-22620: gix-worktree-state specifies 0777 permissions\n    when checking out executable files (boo#1236139)\n\n- Update to version 0.39.0:\n  New Features\n  * add gix merge commit --debug\n  * add gix merge commits\n  * add gix merge tree to merge trees similarly to git merge-tree.\n\n- Update to version 0.38.0:\n  New Features\n  * support for listing worktrees with gix worktree list\n  * add first 'debug' version of gix diff tree.\n  * add new gix cat command.\n  * add gix merge-file with similar features as git merge-file\n  * gix merge-base for the CLI\n  Bug Fixes\n  * Adjust gix clean warning and help for worktree fix\n  * Clarify -r/--repositories and --skip-hidden-repositories\n  Other\n  * switch from time to jiff\n  * Unify style in config support info\n","status":"published","published":"2026-08-10T13:10:07Z","modified":"2026-08-12T18:23:42.677607455Z","updated_at":"2026-11-02T16:58:41.885092Z"}]}}
