{"id":"GHSA-j39j-6gw9-jw6h","summary":"git2 has potential undefined behavior when dereferencing Buf struct ","details":"If the Buf struct is dereferenced immediately after calling new() or default() on the Buf struct, a null pointer is passed to the unsafe function slice::from_raw_parts. According to the safety section documentation of the function, data must be non-null and aligned even for zero-length slices or slices of ZSTs. Thus, passing a null pointer will lead to undefined behavior.","aliases":["RUSTSEC-2026-0008"],"modified":"2026-09-10T03:50:35.308686138Z","published":"2026-02-04T20:36:04Z","database_specific":{"severity":"LOW","github_reviewed":true,"github_reviewed_at":"2026-02-04T20:36:04Z","nvd_published_at":null,"cwe_ids":["CWE-476"]},"references":[{"type":"WEB","url":"https://github.com/rust-lang/git2-rs/issues/1211"},{"type":"WEB","url":"https://github.com/rust-lang/git2-rs/pull/1213"},{"type":"WEB","url":"https://github.com/rust-lang/git2-rs/commit/9e160f15bd056f82143109bb330573381e5de719"},{"type":"PACKAGE","url":"https://github.com/rust-lang/git2-rs"},{"type":"WEB","url":"https://rustsec.org/advisories/RUSTSEC-2026-0008.html"}],"affected":[{"package":{"name":"git2","ecosystem":"crates.io","purl":"pkg:cargo/git2"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.20.4"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/02/GHSA-j39j-6gw9-jw6h/GHSA-j39j-6gw9-jw6h.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U"}]}