Quick answers
- Is CVE-2025-5278 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2025-5278 being exploited in the wild.
- How severe is CVE-2025-5278?
- Medium severity, with a CVSS score of 4.4, published 27 May 2025.
- Which products and versions are affected?
- Gnu Coreutils 7.2 through current (pre-fix) versions.
- Is there a fix for CVE-2025-5278?
- No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
- How is CVE-2025-5278 attacked?
- It is attacked with local access, in a software library.
- Am I affected by CVE-2025-5278?
- Check whether you run Gnu Coreutils at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
Technical details
A heap buffer under-read exists in the begfield() function within GNU Coreutils 'sort' utility (src/sort.c). The flaw is caused by unsafe pointer arithmetic when parsing traditional key specifications (e.g., +POS1.C1). Specifically, providing a character position value of UINTMAX_MAX (18446744073709551615 on 64-bit systems) triggers an integer wraparound during the 'ptr + schar' calculation. This results in a pointer that points one byte before the start of the allocated heap buffer. When this invalid pointer is subsequently used in functions like compare_random() or strxfrm(), it triggers an out-of-bounds read. The vulnerability was introduced in version 7.2 and has been addressed in the latest source commits.
Affected products
- GNU Coreutils 7.2 through current (pre-fix) versions
Timeline
- 2025-05-20: disclosed: Vulnerability reported to GNU Coreutils maintainers by Med Maatallah.
- 2025-05-27: advisory: Public disclosure and CVE assignment.
References
- https://access.redhat.com/security/cve/CVE-2025-5278
- https://bugzilla.redhat.com/show_bug.cgi?id=2368764
- https://cgit.git.savannah.gnu.org/cgit/coreutils.git/commit/?id=8c9602e3a145e9596dc1a63c6ed67865814b6633
- https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78507
- http://www.openwall.com/lists/oss-security/2025/05/27/2
- http://www.openwall.com/lists/oss-security/2025/05/29/1
- http://www.openwall.com/lists/oss-security/2025/05/29/2