CVE-2026-18374

glibc: glibc: Heap buffer overflow via attacker-controlled fopen mode string

Published Aug 27, 2026 CVSS 3.1 · 4.9 Medium EPSS < 1% KEV · Not listed
Description
Passing an effectively empty string to the `,ccs=` syntax extension of the mode argument in the `fopen` function in the GNU C Library version 2.45 or earlier may result in a heap buffer overflow when the mode string input to the function is attacker controlled.



This usage pattern is not seen in applications in common GNU/Linux distributions and applications that process user-supplied values for `ccs` should not pass them through without validation.

Analysis

AI-generated

Technical impact

Passing an effectively empty string to the ,ccs= syntax extension in the mode argument of fopen triggers a heap buffer overflow in glibc versions 2.45 or earlier. The vulnerability can corrupt heap memory and lead to program instability or undefined behavior; the description does not specify successful code execution.

Affected Systems

The GNU C Library (glibc) is affected. All installations using glibc version 2.45 or earlier contain the flaw, while newer releases are not reported to be vulnerable.

Risk and Exploitability

With a CVSS score of 4.9, the vulnerability is considered moderate. The EPSS score is less than 1%, indicating a low probability of exploitation, and the vulnerability is not listed in CISA KEV, suggesting no widespread attacks have been observed. The likely attack vector is application‑level, where a user‑controlled mode string with the ,ccs= extension, potentially empty or malicious, is passed to fopen. Exploitation would rely on the vulnerable code executing in an environment that allows heap corruption, but no evidence of active exploitation is reported.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply a glibc update (e.g., 2.46 or later) that includes the heap buffer overflow fix for the fopen ccs extension.
  • Audit the application code that constructs mode strings containing the ,ccs= extension and validate or sanitize any user‑supplied data to prevent empty or malicious values from being passed to fopen.
  • If the ccs extension is not required, remove it from mode strings or enforce strict input constraints to eliminate the vector.

Generated by OpenCVE AI on September 1, 2026 at 17:44 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-9065-1 GNU C Library vulnerabilities
History
Type Values Removed Values Added
Title glibc: glibc: Heap buffer overflow via attacker-controlled fopen mode string
Weaknesses CWE-134
References
Metrics threat_severity

None

threat_severity

Moderate

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared The Gnu C Library
The Gnu C Library glibc
Vendors & Products The Gnu C Library
The Gnu C Library glibc
Type Values Removed Values Added
Description Passing an effectively empty string to the `,ccs=` syntax extension of the mode argument in the `fopen` function in the GNU C Library version 2.45 or earlier may result in a heap buffer overflow when the mode string input to the function is attacker controlled. This usage pattern is not seen in applications in common GNU/Linux distributions and applications that process user-supplied values for `ccs` should not pass them through without validation.
Weaknesses CWE-787
References
Metrics cvssV3_1

{'score': 4.9, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L'}

Weaknesses
  • CWE-134

    Use of Externally-Controlled Format String

  • CWE-787

    Out-of-bounds Write

Sources

Status
PUBLISHED
Assigner
glibc
Published
Updated
Aug 28, 2026, 3:37 PM
Reserved
Jul 30, 2026, 10:48 AM
Status
Awaiting Analysis
Published
Aug 27, 2026, 8:17 PM
Modified
Sep 3, 2026, 4:43 PM
Severity
Moderate
Public date
Aug 27, 2026, 7:20 PM