CWEweakness

CWE-127 Buffer Under-read

Official page ↗
Abstraction
Variant
Structure
Simple
Status
Draft
Languages
C, C++, Memory-Unsafe
CWE version
5.0

Description

The product reads from a buffer using buffer access mechanisms such as indexes or pointers that reference memory locations prior to the targeted buffer.

Common consequences

• Confidentiality: Read Memory • Confidentiality: Bypass Protection Mechanism — By reading out-of-bounds memory, an attacker might be able to get secret values, such as memory addresses, which can bypass protection mechanisms such as ASLR in order to improve the reliability and likelihood of exploiting a separate weakness to achieve code execution instead of just denial of service.

Detection methods

• Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.) • Automated Dynamic Analysis: Use tools that are integrated during compilation to insert runtime error-checking mechanisms related to memory safety errors, such as AddressSanitizer (ASan) for C/C++ [REF-1518].

Observed examples

• CVE-2021-40985: HTML conversion package has a buffer under-read, allowing a crash

Related

Observed example · CVE (1)

  • CVE-2021-40985 A stack-based buffer under-read in htmldoc before 1.9.12, allows attackers to cause a denial of service via a crafted BMP image to… vulnerability

Child of · CWE (2)

  • CWE-125 Out-of-bounds Read weakness
  • CWE-786 Access of Memory Location Before Start of Buffer weakness

Referenced by CVE · weakness (10)

  • CVE-2026-103119 Buffer under-read vulnerability in Apache Tomcat meant that a large non-blocking write could result in the response body being split… vulnerability
  • CVE-2026-110758 Text::CSV_XS versions before 1.65 for Perl read before the start of an all-blank field under allow_whitespace in strip_trail_whitespace. vulnerability
  • CVE-2026-45683 OpenTelemetry eBPF Instrumentation provides eBPF instrumentation based on the OpenTelemetry standard. vulnerability
  • CVE-2026-5928 Calling the ungetwc function on a FILE stream with wide characters encoded in a character set that has overlaps between its single byte and… vulnerability
  • CVE-2025-20359 Multiple Cisco products are affected by a vulnerability in the Snort 3 HTTP Decoder that could allow an unauthenticated, remote attacker to… vulnerability
  • CVE-2025-32050 A flaw was found in libsoup. vulnerability
  • CVE-2024-10395 No proper validation of the length of user input in http_server_get_content_type_from_extension. vulnerability
  • CVE-2024-25629 c-ares is a C library for asynchronous DNS requests. vulnerability
  • CVE-2020-1918 In-memory file operations (ie: using fopen on a data URI) did not properly restrict negative seeking, allowing for the reading of memory… vulnerability
  • CVE-2020-5360 Dell BSAFE Micro Edition Suite, versions prior to 4.5, are vulnerable to a Buffer Under-Read Vulnerability. vulnerability