Security mailing lists by PureSourceCode

RUSTSEC-2026-0008

LOW

git2 has potential undefined behavior when dereferencing Buf struct

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.

Published
2 Feb 2026
Last modified
10 Sep 2026
Weakness
CWE-476
Also known as
GHSA-j39j-6gw9-jw6h
Sources
OSV GHSA-j39j-6gw9-jw6hJSONOSVJSON

Scores

SourceScored byVersionScoreVector / decision
OSV GitHub CVSS 4.0 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

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV crates.io git2 < 0.20.4 0.20.4
OSV crates.io git2 >= 0.0.0-0, < 0.20.4 0.20.4

References

History

  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 2 Feb 2026)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 4 Feb 2026)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.