# CVE-2025-4373: Glib: buffer underflow on glib through glib/gstring.c via function g_string_insert_unichar

> An integer overflow in GLib's g_string_insert_unichar function allows attackers to trigger a buffer underwrite, potentially leading to code execution or crashes.

- **Severity:** Medium 4.8 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 6 May 2025
- **Updated:** 15 Oct 2026
- **Also known as:** AZL-62286, AZL-62295, BELL-CVE-2025-4373, CLSA-2025-1753768618, CLSA-2025-1753768865, CLSA-2025-1753769031, CLSA-2026-1778219103, DEBIAN-CVE-2025-4373, ECHO-c49e-c84a-3d59, GHSA-cfv9-2rgf-f55c, MGASA-2025-0173, OESA-2026-1763, OESA-2026-1764, OESA-2026-1765, OESA-2026-1766, SUSE-SU-2025:01880-1, SUSE-SU-2025:02233-1, SUSE-SU-2025:02375-1, UBUNTU-CVE-2025-4373, USN-7532-1

## What is CVE-2025-4373?

CVE-2025-4373 is a medium-severity vulnerability in Red Hat Enterprise Linux 10, published on 6 May 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

A flaw was found in GLib, which is vulnerable to an integer overflow in the g_string_insert_unichar() function. When the position at which to insert the character is large, the position will overflow, leading to a buffer underwrite.

Weakness: CWE-124 (Buffer Underwrite)

## Which versions are affected by CVE-2025-4373?


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `glib2` | SUSE:Linux Enterprise Micro 5.1 | All versions | 2.62.6-150200.3.30.1 |
| `glib2` | SUSE:Linux Enterprise Micro 5.2 | All versions | 2.62.6-150200.3.30.1 |
| `glib2` | SUSE:Linux Enterprise Micro 5.3 | All versions | 2.70.5-150400.3.23.1 |
| `glib2` | SUSE:Linux Enterprise Micro 5.4 | All versions | 2.70.5-150400.3.23.1 |
| `glib2` | SUSE:Linux Enterprise Micro 5.5 | All versions | 2.70.5-150400.3.23.1 |
| `glib2` | SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | All versions | 2.48.2-12.46.1 |

## How do I fix CVE-2025-4373?

Apply the vendor's patch.

## Is CVE-2025-4373 being exploited?

There is no known exploitation of CVE-2025-4373 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-4373 and fix it if it is affected.

What it is: CVE-2025-4373 is a medium-severity vulnerability in Red Hat Enterprise Linux 10, published on 6 May 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-4373 in the wild and no public exploit code.

Affected product: Red Hat Enterprise Linux 10. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-4373/ (Markdown: https://insights.sbomify.com/CVE-2025-4373/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-4373
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-4373
- OSV: https://osv.dev/vulnerability/CVE-2025-4373

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-4373/
Summaries are generated and may contain mistakes; the official description above is the record.
