CVE-2026-95619 in libstdc++info

Summary

by MITRE • 09/22/2026

A flaw was found in libstdc++. An integer overflow can occur when processing large inputs to the C++ `new` operator. This vulnerability could lead to an undersized memory allocation, potentially causing memory corruption or application instability.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 09/22/2026

The GNU Standard C++ Library, commonly known as libstdc++, serves as a foundational component for numerous software applications developed in C and C++. It provides the implementation of the standard library classes and functions that are essential for modern software development. Within this extensive codebase lies a critical vulnerability related to memory management during object instantiation. Specifically, an integer overflow condition exists within the logic governing the C++ new operator when it processes large allocation requests. This flaw represents a significant risk because libstdc is widely deployed across Linux distributions and embedded systems, meaning that any application relying on standard dynamic memory allocation could potentially be affected if it interacts with maliciously crafted inputs designed to trigger this specific code path.

The technical nature of the vulnerability stems from how the allocator calculates the size of memory blocks required for object creation. When a developer requests memory using the new operator, the underlying implementation must determine the total byte count needed, which often involves multiplying the number of elements by the size of each element. In this specific instance, if an attacker can control or influence these parameters with sufficiently large values, the multiplication operation may exceed the maximum value representable by a signed integer variable used for tracking allocation sizes. This arithmetic overflow causes the calculated size to wrap around and become a small positive number rather than a large negative one or an error code. Consequently, the memory allocator proceeds to allocate only this undersized block of heap memory instead of the intended larger buffer.

The operational impact of such an integer overflow is severe due to the subsequent mismatch between allocated space and actual usage requirements. When the application subsequently attempts to write data into the object using pointers derived from the new operator, it will inevitably write beyond the boundaries of the undersized allocation. This behavior constitutes a classic heap-based buffer overflow condition. The immediate consequence is memory corruption, where adjacent metadata structures or other objects in the heap are overwritten with arbitrary data. This corruption can lead to application crashes and instability, resulting in a denial-of-service scenario for legitimate users. However, the implications extend far beyond simple stability issues. Heap overflows provide attackers with opportunities to manipulate control flow within the process memory space. By carefully crafting input values that trigger this overflow, an attacker might overwrite function pointers or return addresses stored on the heap, potentially achieving arbitrary code execution with the privileges of the compromised application.

From a classification perspective, this vulnerability aligns closely with CWE-190, which defines integer overflow or wraparound errors. The specific mechanism involves arithmetic operations that exceed the capacity of their data types without proper validation checks before allocation. Furthermore, in terms of tactical mapping within the MITRE ATT&CK framework, this flaw facilitates techniques associated with initial exploitation and privilege escalation through memory corruption. Attackers leveraging such vulnerabilities often employ heap spraying or targeted overwrite strategies to gain control over execution flow. The presence of this defect highlights a persistent challenge in systems programming where manual memory management is required, emphasizing the difficulty of ensuring complete safety against arithmetic errors in low-level code paths that are frequently executed during normal application operation.

Mitigating this vulnerability requires both immediate patching and long-term architectural improvements. System administrators and developers must ensure that libstdc++ packages on affected systems are updated to versions where the integer overflow has been corrected with proper bounds checking or use of wider data types for size calculations. For software vendors, code audits focusing on dynamic memory allocation patterns should be conducted to identify similar risks in custom implementations. Additionally, adopting safer programming practices such as using smart pointers and standard containers that handle their own sizing can reduce reliance on raw new operator calls where manual arithmetic is involved. Operating system-level mitigations like Address Space Layout Randomization (ASLR) and Heap Protection mechanisms also play a crucial role in limiting the exploitability of memory corruption vulnerabilities by making it significantly harder for attackers to predict target addresses or reliably execute injected code, thereby providing an essential layer of defense-in-depth against such low-level flaws.

Responsible

Redhat

Reservation

09/22/2026

Disclosure

09/22/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

low

Sources

Want to know what is going to be exploited?

We predict KEV entries!