Vulnerabilities / CVE-2023-25139

critical

CVE-2023-25139

glibc: incorrect printf output for integers with thousands separator and width field

Published Modified CWE 787
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat7.5CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Trivy's own label is CRITICAL. Rated critical by NVD. Rated lower by Red Hat (medium), Ubuntu (medium).

Description

sprintf in the GNU C Library (glibc) 2.37 has a buffer overflow (out-of-bounds write) in some situations with a correct buffer size. This is unrelated to CWE-676. It may write beyond the bounds of the destination buffer when attempting to write a padded, thousands-separated string representation of a number, if the buffer is allocated the exact size required to represent that number as a string. For example, 1,234,567 (with padding to 13) overflows by two bytes.

Affected packages and fixed versions

SourcePackageFixed in
alpine 3.19mpfr44.2.1-r0
alpine 3.20mpfr44.2.1-r0
alpine 3.21mpfr44.2.1-r0
alpine 3.22mpfr44.2.1-r0
alpine 3.23mpfr44.2.1-r0
alpine 3.24mpfr44.2.1-r0
alpine edgempfr44.2.1-r0
chainguardglibc2.37-r1
ubuntu 23.04glibc2.37-0ubuntu2
wolfiglibc2.37-r1

References

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.