Skip to content

← Actionable
Medium, CVSS 6.9

Unsoundness in Iterator and DoubleEndedIterator impls for glib::VariantStrIter

GHSA-wrw7-89jp-8q8g

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (glib 0.20.0), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • crates.io glib

    Affected
    >= 0.15.0, < 0.20.0
    Fixed in
    0.20.0

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS 4.0
6.9 · CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N · score source
EPSS
No dated EPSS signal available.
Source description

As published by the source; long descriptions are shortened.

The VariantStrIter::implget function (called internally by implementations of the Iterator and DoubleEndedIterator traits for this type) was unsound, resulting in undefined behaviour. An immutable reference &p to a mut libc::cchar pointer initialized to NULL was passed as an argument to a C function that that mutates the pointer behind &p in-place (i.e. as an out-argument), which was unsound. After changes in recent versions of the Rust compiler, these unsound writes through &p now seem to be completely disregarded when building the glib crate with optimizations. This subsequently caused all calls of VariantStrIter::implget to violate the safety requirements of the std::ffi::CStr::fromptr function - which requires its argument to be a valid pointer to a C-style string - resulting in crashes due to NULL pointer dereferences. This was fixed by passing the out-argument pointer explitly as &mut p instead of &p. This issue has been present since this code was initially added in glib…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 1 · created ·

    Published from ghsa record GHSA-wrw7-89jp-8q8g

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: GHSA-wrw7-89jp-8q8g

Advisory: Unsoundness in `Iterator` and `DoubleEndedIterator` impls for `glib::VariantStrIter`
IDs: GHSA-wrw7-89jp-8q8g
Record: https://patchnext.com/advisories/ghsa-wrw7-89jp-8q8g (revision 1, source checked 26 Oct 2026, 15:38 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 6.9)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: glib 0.20.0. A vendor fix does not mean a deployment is fixed.

## Affected components
- crates.io glib: affected >= 0.15.0, < 0.20.0; fixed in 0.20.0

## Suggested inspection (read-only)
- crates.io glib: check the installed version with your package manager.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on glib.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-wrw7-89jp-8q8g (GitHub-reviewed advisory GHSA-wrw7-89jp-8q8g lists affected ranges: crates.io glib >=0.15.0 <0.20.0)

Commands are suggestions: review each one before running it.

Loading voting…