# CVE-2025-5278: Coreutils: heap buffer under-read in gnu coreutils sort via key specification

> A heap buffer under-read in GNU Coreutils sort allows attackers to cause crashes or leak sensitive data via crafted key specifications.

- **Severity:** Medium 4.4 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 27 May 2025
- **Updated:** 14 Oct 2026
- **Also known as:** ALSA-2026:28911, ALSA-2026:33124, ALSA-2026:69964, AZL-93060, BELL-CVE-2025-5278, CLSA-2026-1783530353, CLSA-2026-1783532249, DEBIAN-CVE-2025-5278, ECHO-d009-fb3c-dd57, GHSA-ch64-4x3c-w3jq, MGASA-2025-0172, OESA-2025-1637, RHSA-2026:28911, RHSA-2026:33124, RHSA-2026:69964, RLSA-2026:28911, RLSA-2026:33124, RLSA-2026:69964, ROOT-OS-DEBIAN-12-CVE-2025-5278, SUSE-SU-2025:02353-1, SUSE-SU-2025:02354-1, SUSE-SU-2025:02362-1, SUSE-SU-2025:20523-1, SUSE-SU-2025:20660-1, UBUNTU-CVE-2025-5278, openSUSE-SU-2025:15327-1

## What is CVE-2025-5278?

CVE-2025-5278 is a medium-severity memory corruption vulnerability in Cert Manager support for Red Hat OpenShift release 1.17, published on 27 May 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

A flaw was found in GNU Coreutils. The sort utility's begfield() function is vulnerable to a heap buffer under-read. The program may access memory outside the allocated buffer if a user runs a crafted command using the traditional key format. A malicious input could lead to a crash or leak sensitive data.

Weakness: CWE-121 (Stack-based Buffer Overflow)

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `coreutils` | AlmaLinux:10 | All versions | 9.5-8.el10_2 |
| `coreutils-common` | AlmaLinux:10 | All versions | 9.5-8.el10_2 |
| `coreutils-single` | AlmaLinux:10 | All versions | 9.5-8.el10_2 |
| `coreutils` | AlmaLinux:8 | All versions | 8.30-21.el8_10 |
| `coreutils-common` | AlmaLinux:8 | All versions | 8.30-21.el8_10 |
| `coreutils-single` | AlmaLinux:8 | All versions | 8.30-21.el8_10 |
| `coreutils` | AlmaLinux:9 | All versions | 8.32-41.el9_8 |
| `coreutils-common` | AlmaLinux:9 | All versions | 8.32-41.el9_8 |
| `coreutils-single` | AlmaLinux:9 | All versions | 8.32-41.el9_8 |
| `coreutils` | Red Hat:enterprise_linux:10.2 | All versions | 0:9.5-8.el10_2 |
| `coreutils-debuginfo` | Red Hat:enterprise_linux:10.2 | All versions | 0:9.5-8.el10_2 |
| `coreutils-debugsource` | Red Hat:enterprise_linux:10.2 | All versions | 0:9.5-8.el10_2 |
| `coreutils-single` | Red Hat:enterprise_linux:10.2 | All versions | 0:9.5-8.el10_2 |
| `coreutils-single-debuginfo` | Red Hat:enterprise_linux:10.2 | All versions | 0:9.5-8.el10_2 |
| `coreutils` | Red Hat:enterprise_linux:8::baseos | All versions | 0:8.30-21.el8_10 |
| `coreutils-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:8.30-21.el8_10 |
| `coreutils-debugsource` | Red Hat:enterprise_linux:8::baseos | All versions | 0:8.30-21.el8_10 |
| `coreutils-single` | Red Hat:enterprise_linux:8::baseos | All versions | 0:8.30-21.el8_10 |
| `coreutils-single-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:8.30-21.el8_10 |
| `coreutils` | Red Hat:enterprise_linux:9::baseos | All versions | 0:8.32-41.el9_8 |
| `coreutils-debuginfo` | Red Hat:enterprise_linux:9::baseos | All versions | 0:8.32-41.el9_8 |
| `coreutils-debugsource` | Red Hat:enterprise_linux:9::baseos | All versions | 0:8.32-41.el9_8 |
| `coreutils-single` | Red Hat:enterprise_linux:9::baseos | All versions | 0:8.32-41.el9_8 |
| `coreutils-single-debuginfo` | Red Hat:enterprise_linux:9::baseos | All versions | 0:8.32-41.el9_8 |
| `coreutils` | Rocky Linux:10 | All versions | 0:9.5-8.el10_2 |
| `coreutils` | Rocky Linux:8 | All versions | 0:8.30-21.el8_10 |
| `coreutils` | Rocky Linux:9 | All versions | 0:8.32-41.el9_8 |
| `coreutils` | SUSE:Enterprise Storage 7.1 | All versions | 8.32-150300.3.11.1 |
| `coreutils` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 8.32-150300.3.11.1 |
| `coreutils` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 8.32-150400.9.9.1 |
| `coreutils` | SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 8.32-150400.9.9.1 |
| `coreutils` | SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | All versions | 8.32-150400.9.9.1 |
| `coreutils` | SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | All versions | 8.32-150400.9.9.1 |
| `coreutils` | SUSE:Linux Enterprise Micro 5.1 | All versions | 8.32-150300.3.11.1 |
| `coreutils` | SUSE:Linux Enterprise Micro 5.2 | All versions | 8.32-150300.3.11.1 |
| `coreutils` | SUSE:Linux Enterprise Micro 5.3 | All versions | 8.32-150400.9.9.1 |
| `coreutils` | SUSE:Linux Enterprise Micro 5.4 | All versions | 8.32-150400.9.9.1 |
| `coreutils` | SUSE:Linux Enterprise Micro 5.5 | All versions | 8.32-150400.9.9.1 |
| `coreutils` | SUSE:Linux Enterprise Module for Basesystem 15 SP6 | All versions | 8.32-150400.9.9.1 |
| `coreutils` | SUSE:Linux Enterprise Module for Basesystem 15 SP7 | All versions | 8.32-150400.9.9.1 |

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

Apply the vendor's patch.

## Is CVE-2025-5278 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2025-5278 is a medium-severity memory corruption vulnerability in Cert Manager support for Red Hat OpenShift release 1.17, published on 27 May 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2025-5278 in the wild and no public exploit code.

Affected product: Cert Manager support for Red Hat OpenShift release 1.17. 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-5278/ (Markdown: https://insights.sbomify.com/CVE-2025-5278/index.md)
```

## Sources

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

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