rustsec-2025-0140
Vulnerability from osv_rustsec
Published
2025-12-29 12:00
Modified
2026-02-04 06:56
Summary
Non-utf8 String can be created with `TimeBuf::as_str`
Details

The function gix_date::parse::TimeBuf::as_str can create an illegal string containing non-utf8 characters. This violates the safety invariant of TimeBuf and can lead to undefined behavior when consuming the string.

The bug can be prevented by adding str::from_utf8 to the function TimeBuf::write.


{
  "affected": [
    {
      "database_specific": {
        "categories": [
          "memory-corruption"
        ],
        "cvss": null,
        "informational": null
      },
      "ecosystem_specific": {
        "affected_functions": null,
        "affects": {
          "arch": [],
          "functions": [
            "gix_date::parse::TimeBuf::as_str"
          ],
          "os": []
        }
      },
      "package": {
        "ecosystem": "crates.io",
        "name": "gix-date",
        "purl": "pkg:cargo/gix-date"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.0.0-0"
            },
            {
              "fixed": "0.12.0"
            }
          ],
          "type": "SEMVER"
        }
      ],
      "versions": []
    }
  ],
  "aliases": [
    "CVE-2026-0810",
    "GHSA-6mw6-mj76-grwc"
  ],
  "database_specific": {
    "license": "CC0-1.0"
  },
  "details": "The function `gix_date::parse::TimeBuf::as_str` can create an illegal string containing non-utf8 characters. This violates the safety invariant of `TimeBuf` and can lead to undefined behavior when consuming the string.\n\nThe bug can be prevented by adding `str::from_utf8` to the function `TimeBuf::write`.",
  "id": "RUSTSEC-2025-0140",
  "modified": "2026-02-04T06:56:11Z",
  "published": "2025-12-29T12:00:00Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://crates.io/crates/gix-date"
    },
    {
      "type": "ADVISORY",
      "url": "https://rustsec.org/advisories/RUSTSEC-2025-0140.html"
    },
    {
      "type": "REPORT",
      "url": "https://github.com/GitoxideLabs/gitoxide/issues/2305"
    }
  ],
  "related": [],
  "severity": [],
  "summary": "Non-utf8 String can be created with `TimeBuf::as_str`"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

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…

Detection rules are retrieved from Rulezet.

Loading…

Loading…