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

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-05-12T12:00:00.000Z
- Modified: 2026-06-17T13:00:04.696Z

## 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.

(As written by RustSec Advisory Database.)

## Affected

- git2 (crates.io): from 0.0.0-0 before 0.21.0

## References

- <https://crates.io/crates/git2> (package)
- <https://rustsec.org/advisories/RUSTSEC-2026-0183.html> (advisory)
- <https://github.com/rust-lang/git2-rs/pull/1250> (web)

## Sources

- RustSec Advisory Database: [RUSTSEC-2026-0183](https://rustsec.org/advisories/RUSTSEC-2026-0183.html), CC0-1.0, modified 2026-06-17

---

Page: https://cve.day/RUSTSEC-2026-0183 · Whole record: https://cve.day/RUSTSEC-2026-0183.json · Rebuilt by cve.day 2026-11-25T22:56:43.372Z
