GHSA-j39j-6gw9-jw6h

Suggest an improvement
Source
https://github.com/advisories/GHSA-j39j-6gw9-jw6h
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/02/GHSA-j39j-6gw9-jw6h/GHSA-j39j-6gw9-jw6h.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-j39j-6gw9-jw6h
Aliases
Downstream
CGA (13)
MINI (1)
Published
2026-02-04T20:36:04Z
Modified
2026-09-10T03:50:35Z
Severity
  • 2.7 (Low) CVSS_V4 - 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 CVSS Calculator
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.

Database specific
{
    "cwe_ids":  [
        "CWE-476"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-02-04T20:36:04Z",
    "nvd_published_at":  null,
    "severity":  "LOW"
}
References

Affected packages

crates.io / git2

Package

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
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"