---
id: CVE-2023-25139
title: >-
  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
summary: >-
  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 t…
severity: critical
cvss: 9.8
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'
cwe:
  - CWE-787
vendor: gnu
product: glibc
affected:
  - glibc = 2.37
published: '2023-02-03'
updated: '2026-10-14'
sourceUpdated: '2026-10-14T23:17:15.260'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2023-25139'
references:
  - url: 'http://www.openwall.com/lists/oss-security/2023/02/10/1'
    label: cve@mitre.org
  - url: 'https://security.netapp.com/advisory/ntap-20230302-0010/'
    label: cve@mitre.org
  - url: 'https://sourceware.org/bugzilla/show_bug.cgi?id=30068'
    label: cve@mitre.org
  - url: 'http://www.openwall.com/lists/oss-security/2023/02/10/1'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://security.netapp.com/advisory/ntap-20230302-0010/'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://sourceware.org/bugzilla/show_bug.cgi?id=30068'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://cert-portal.siemens.com/productcert/html/ssa-398330.html'
    label: 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
tags:
  - nvd
  - cve.org
epss: 0.01423
epssPercentile: 0.72365
ingestedAt: '2026-10-15T00:02:07.126Z'
ssvc:
  exploitation: none
  automatable: 'yes'
  technicalImpact: total
  timestamp: '2025-03-26T14:48:30.307657Z'
---

## Overview

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

- `glibc = 2.37`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
