{"id":"GHSA-g27r-r6ph-vf5r","aliases":["RUSTSEC-2026-0109"],"status":"published","title":"sequoia-git has broken hard revocation handling","description":"Before `sq-git` checks if a commit can be authenticated, it first looks for hard revocations.  Because parsing a policy is expensive\nand a project's policy rarely changes, `sq-git` has an optimization to only check a policy if it hasn't checked it before.  It does this by maintaining a set of policies that it had already seen keyed on the policy's hash.  Unfortunately, due to a bug the hash was truncated to be 0 bytes and thus only hard revocations in the target commit were considered.  Normally this is not a problem as hard revocations are not removed from the signing policy.\n\nAn attacker could nevertheless exploit this flaw as follows. Consider Alice and Bob who maintain a project together.  If Bob's\ncertificate is compromised and Bob issues a hard revocation, Alice can add it to the project's signing policy.  An attacker who has\naccess to Bob's key can then create a merge request that strips the hard revocation.  If Alice merges Bob's merge request, then\nthe latest commit will not carry the hard revocation, and `sq-git` will not see the hard revocation when authenticating that commit or any following commits.\n\nNote: for this attack to be successful, Alice needs to be tricked into merging the malicious MR.  If Alice is reviewing MRs, then she is likely to notice changes to the signing policy.\n\nReported-by: Hassan Sheet","severity":{"version":"4.0","score":1.8,"vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","level":"low","from":"ghsa"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-299"],"published":"2026-04-21T12:00:00Z","modified":"2026-05-06T06:56:26Z","fixes":[{"ecosystem":"crates.io","package":"sequoia-git","fixed_in":["0.6.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"sequoia-git","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"sequoia-git","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.6.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"sequoia-git","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.6.0"}]}]}],"references":[{"url":"https://gitlab.com/sequoia-pgp/sequoia-git/-/commit/f9c9074bd80023456221f09c3c4ff19957ee9c58","tags":["web"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0109.html","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-g27r-r6ph-vf5r"},{"url":"https://gitlab.com/sequoia-pgp/sequoia-git","tags":["package"]},{"url":"https://crates.io/crates/sequoia-git","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-g27r-r6ph-vf5r","title":"sequoia-git has broken hard revocation handling","description":"Before `sq-git` checks if a commit can be authenticated, it first looks for hard revocations.  Because parsing a policy is expensive\nand a project's policy rarely changes, `sq-git` has an optimization to only check a policy if it hasn't checked it before.  It does this by maintaining a set of policies that it had already seen keyed on the policy's hash.  Unfortunately, due to a bug the hash was truncated to be 0 bytes and thus only hard revocations in the target commit were considered.  Normally this is not a problem as hard revocations are not removed from the signing policy.\n\nAn attacker could nevertheless exploit this flaw as follows. Consider Alice and Bob who maintain a project together.  If Bob's\ncertificate is compromised and Bob issues a hard revocation, Alice can add it to the project's signing policy.  An attacker who has\naccess to Bob's key can then create a merge request that strips the hard revocation.  If Alice merges Bob's merge request, then\nthe latest commit will not carry the hard revocation, and `sq-git` will not see the hard revocation when authenticating that commit or any following commits.\n\nNote: for this attack to be successful, Alice needs to be tricked into merging the malicious MR.  If Alice is reviewing MRs, then she is likely to notice changes to the signing policy.\n\nReported-by: Hassan Sheet","status":"published","published":"2026-05-04T22:28:50Z","modified":"2026-05-04T22:28:52Z","cvss":[{"version":"4.0","score":1.8,"vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","level":"low"}],"cwes":["CWE-299"],"updated_at":"2026-11-02T14:40:00.970271Z"}],"osv":[{"id":"GHSA-g27r-r6ph-vf5r","title":"sequoia-git has broken hard revocation handling","description":"Before `sq-git` checks if a commit can be authenticated, it first looks for hard revocations.  Because parsing a policy is expensive\nand a project's policy rarely changes, `sq-git` has an optimization to only check a policy if it hasn't checked it before.  It does this by maintaining a set of policies that it had already seen keyed on the policy's hash.  Unfortunately, due to a bug the hash was truncated to be 0 bytes and thus only hard revocations in the target commit were considered.  Normally this is not a problem as hard revocations are not removed from the signing policy.\n\nAn attacker could nevertheless exploit this flaw as follows. Consider Alice and Bob who maintain a project together.  If Bob's\ncertificate is compromised and Bob issues a hard revocation, Alice can add it to the project's signing policy.  An attacker who has\naccess to Bob's key can then create a merge request that strips the hard revocation.  If Alice merges Bob's merge request, then\nthe latest commit will not carry the hard revocation, and `sq-git` will not see the hard revocation when authenticating that commit or any following commits.\n\nNote: for this attack to be successful, Alice needs to be tricked into merging the malicious MR.  If Alice is reviewing MRs, then she is likely to notice changes to the signing policy.\n\nReported-by: Hassan Sheet","status":"published","published":"2026-05-04T22:28:50Z","modified":"2026-05-06T06:56:26.102307095Z","cvss":[{"version":"4.0","score":1.8,"vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","level":"low"}],"cwes":["CWE-299"],"updated_at":"2026-11-02T15:46:47.119724Z"},{"id":"RUSTSEC-2026-0109","title":"Broken hard revocation handling","description":"Before `sq-git` checks if a commit can be authenticated, it first\nlooks for hard revocations.  Because parsing a policy is expensive\nand a project's policy rarely changes, `sq-git` has an\noptimization to only check a policy if it hasn't checked it\nbefore.  It does this by maintaining a set of policies that it had\nalready seen keyed on the policy's hash.  Unfortunately, due to a\nbug the hash was truncated to be 0 bytes and thus only hard\nrevocations in the target commit were considered.  Normally this\nis not a problem as hard revocations are not removed from the\nsigning policy.\n\nAn attacker could nevertheless exploit this flaw as follows.\nConsider Alice and Bob who maintain a project together.  If Bob's\ncertificate is compromised and Bob issues a hard revocation, Alice\ncan add it to the project's signing policy.  An attacker who has\naccess to Bob's key can then create a merge request that strips\nthe hard revocation.  If Alice merges Bob's merge request, then\nthe latest commit will not carry the hard revocation, and `sq-git`\nwill not see the hard revocation when authenticating that commit or\nany following commits.\n\nNote: for this attack to be successful, Alice needs to be tricked\ninto merging the malicious MR.  If Alice is reviewing MRs, then\nshe is likely to notice changes to the signing policy.\n\nReported-by: Hassan Sheet","status":"published","published":"2026-04-21T12:00:00Z","modified":"2026-05-06T06:32:50Z","cvss":[{"version":"4.0","score":1.8,"vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","level":"low"}],"updated_at":"2026-11-02T15:53:40.430679Z"}]}}
