GHSA-J39J-6GW9-JW6H
Vulnerability from github – Published: 2026-02-04 20:36 – Updated: 2026-02-04 20:36
VLAI?
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.
Severity ?
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "git2"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.20.4"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-476"
],
"github_reviewed": true,
"github_reviewed_at": "2026-02-04T20:36:04Z",
"nvd_published_at": null,
"severity": "LOW"
},
"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.",
"id": "GHSA-j39j-6gw9-jw6h",
"modified": "2026-02-04T20:36:04Z",
"published": "2026-02-04T20:36:04Z",
"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"
}
],
"schema_version": "1.4.0",
"severity": [
{
"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",
"type": "CVSS_V4"
}
],
"summary": "git2 has potential undefined behavior when dereferencing Buf struct "
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…