RUSTSEC-2026-0183

Source
https://rustsec.org/advisories/RUSTSEC-2026-0183
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0183.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2026-0183
Published
2026-05-12T12:00:00Z
Modified
2026-06-17T13:00:04.696626611Z
Summary
Potential undefined behavior when calling Remote::list()
Details

When calling Remote::list() for a remote of a git repository, when that remote does not advertise any references, git2 passes a null pointer to the unsafe function slice::from_raw_parts(). Based on the safety section documentation of function, data must be non-null even for slices of length zero. Thus, the use of a null pointer leads to undefined behavior.

Database specific
{
    "license": "CC0-1.0"
}
References

Affected packages

crates.io / git2

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-0
Fixed
0.21.0

Ecosystem specific

{
    "affects": {
        "os": [],
        "functions": [],
        "arch": []
    },
    "affected_functions": null
}

Database specific

categories
[]
informational
"unsound"
cvss
null
source
"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0183.json"