RUSTSEC-2026-0183 Potential undefined behavior when calling Remote::list()

Not scored Published

Calling Remote::list() on a remote with no references causes undefined behavior via null pointer dereference, potentially crashing the application.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is RUSTSEC-2026-0183?

RUSTSEC-2026-0183 is a vulnerability in git2, published on 12 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Which versions are affected by RUSTSEC-2026-0183?

1 open source package ship an affected version, including git2.

PackageAffectedFixed in
git2 crates.ioFrom 0.0.0-00.21.0

How do I fix RUSTSEC-2026-0183?

Upgrade git2 to 0.21.0 or later.

Is RUSTSEC-2026-0183 being exploited?

There is no known exploitation of RUSTSEC-2026-0183 in the wild and no public exploit code.

Sources

Is RUSTSEC-2026-0183 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free