Description
Calling the scanf family of functions with a %mc (malloc'd character match) in the GNU C Library version 2.7 to version 2.43 with a format width specifier with an explicit width greater than 1024 could result in a one byte heap buffer overflow.
Published: 2026-04-20
Score: n/a
EPSS: n/a
KEV: No
Impact: Heap Buffer Overflow (memory corruption)
Action: Patch glibc
AI Analysis

Impact

The vulnerability arises when an application calls a scanf family function with the %mc conversion specifier and includes an explicit width larger than 1024. This causes a one‑byte overflow on a heap buffer, potentially corrupting adjacent memory. The affected conversion can overwrite adjacent heap objects, leading to undefined behavior that could allow an attacker to corrupt data, trigger a crash, or, with additional conditions, achieve remote code execution. The flaw is characterized as a classic heap buffer overflow (CWE‑122).

Affected Systems

Systems using the GNU C Library (glibc) versions 2.7 through 2.43 are affected, which covers most Linux distributions and any applications that link against these glibc releases. Users who run binaries built against these library versions, especially those that process untrusted input with scanf and include a %mc specifier, are at risk.

Risk and Exploitability

The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog, indicating that no widespread exploit activity has been reported thus far. The CVSS score is not provided, so the severity is uncertain; however, because the overflow is off‑by‑one and limited to a single byte, the exploitation difficulty is moderate, requiring the attacker to supply input that passes through a scanf with a large width. The likely attack vector is a local or remote user passing specially crafted data to a vulnerable process, and the impact could be denial of service or, with sufficient control, privilege escalation or arbitrary code execution.

Generated by OpenCVE AI on April 20, 2026 at 23:57 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the GNU C Library to a version that fixes the %mc heap overflow (glibc 2.44 or later).
  • If an upgrade cannot be applied immediately, modify application code to avoid using the scanf %mc specifier with an explicit width greater than 1024, or replace scanf with safer parsing functions such as strnlen or fgets.
  • Enable or verify that memory protection mechanisms such as stack canaries, ASLR, and PIE are in effect on affected binaries to mitigate the impact of any remaining memory corruption.

Generated by OpenCVE AI on April 20, 2026 at 23:57 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 20 Apr 2026 23:15:00 +0000

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

Mon, 20 Apr 2026 21:00:00 +0000

Type Values Removed Values Added
Description Calling the scanf family of functions with a %mc (malloc'd character match) in the GNU C Library version 2.7 to version 2.43 with a format width specifier with an explicit width greater than 1024 could result in a one byte heap buffer overflow.
Title scanf %mc off-by-one heap buffer overflow
Weaknesses CWE-122
References

Subscriptions

The Gnu C Library Glibc
cve-icon MITRE

Status: PUBLISHED

Assigner: glibc

Published:

Updated: 2026-04-20T20:55:41.170Z

Reserved: 2026-04-02T21:47:21.403Z

Link: CVE-2026-5450

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-04-20T21:16:36.850

Modified: 2026-04-20T21:16:36.850

Link: CVE-2026-5450

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-04-21T00:00:13Z

Weaknesses