CWEweakness

CWE-835 Loop with Unreachable Exit Condition

Official page ↗
Alternate terms
Infinite Loop
Abstraction
Base
Structure
Simple
Status
Incomplete
Languages
Not Language-Specific
CWE version
5.0

Description

The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.

Common consequences

• Availability: DoS: Resource Consumption (CPU), DoS: Resource Consumption (Memory), DoS: Amplification — An infinite loop will cause unexpected consumption of resources, such as CPU cycles or memory. The software's operation may slow down, or cause a long time to respond.

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.)

Observed examples

• CVE-2025-32399: Chain: library for implementing Profinet devices does not check an input for a loop condition (CWE-606), allowing an infinite loop (CWE-835) via a crafted RPC packet • CVE-2022-22224: Chain: an operating system does not properly process malformed Open Shortest Path First (OSPF) Type/Length/Value Identifiers (TLV) (CWE-703), which can cause the process to enter an infinite loop (CWE-835) • CVE-2022-25304: A Python machine communication platform did not account for receiving a malformed packet with a null size, causing the receiving function to never update the message buffer and be caught in an infinite loop. • CVE-2011-1027: Chain: off-by-one error (CWE-193) leads to infinite loop (CWE-835) using invalid hex-encoded characters. • CVE-2011-1142: Chain: self-referential values in recursive definitions lead to infinite loop. • CVE-2011-1002: NULL UDP packet is never cleared from a queue, leading to infinite loop. • CVE-2006-6499: Chain: web browser crashes due to infinite loop - "bad looping logic [that relies on] floating point math [CWE-1339] to exit the loop [CWE-835]" • CVE-2010-4476: Floating point conversion routine cycles back and forth between two different values. • CVE-2010-4645: Floating point conversion routine cycles back and forth between two different values. • CVE-2010-2534: Chain: improperly clearing a pointer in a linked list leads to infinite loop. • CVE-2013-1591: Chain: an integer overflow (CWE-190) in the image size calculation causes an infinite loop (CWE-835) which sequentially allocates buffers without limits (CWE-1325) until the stack is full. • CVE-2008-3688: Chain: A denial of service may be caused by an uninitialized variable (CWE-457) allowing an infinite loop (CWE-835) resulting from a connection to an unresponsive server.

Related

Observed example · CVE (12)

  • CVE-2025-32399 An Unchecked Input for Loop Condition in RT-Labs P-Net version 1.0.1 or earlier allows an attacker to cause IO devices that use the library… vulnerability
  • CVE-2022-22224 An Improper Check or Handling of Exceptional Conditions vulnerability in the processing of a malformed OSPF TLV in Juniper Networks Junos… vulnerability
  • CVE-2022-25304 All versions of package opcua; all versions of package asyncua are vulnerable to Denial of Service (DoS) due to a missing limitation on the… vulnerability
  • CVE-2013-1591 Stack-based buffer overflow in libpixman, as used in Pale Moon before 15.4 and possibly other products, has unspecified impact and… vulnerability
  • CVE-2011-1027 Off-by-one error in the convert_query_hexchar function in html.c in cgit.cgi in cgit before 0.8.3.5 allows remote attackers to cause a… vulnerability
  • CVE-2011-1142 Stack consumption vulnerability in the dissect_ber_choice function in the BER dissector in Wireshark 1.2.x through 1.2.15 and 1.4.x through… vulnerability
  • CVE-2011-1002 avahi-core/socket.c in avahi-daemon in Avahi before 0.6.29 allows remote attackers to cause a denial of service (infinite loop) via an… vulnerability
  • CVE-2010-4476 The Double.parseDouble method in Java Runtime Environment (JRE) in Oracle Java SE and Java for Business 6 Update 23 and earlier, 5.0 Update… vulnerability
  • CVE-2010-4645 strtod.c, as used in the zend_strtod function in PHP 5.2 before 5.2.17 and 5.3 before 5.3.5, and other products, allows context-dependent… vulnerability
  • CVE-2010-2534 The NetworkSyncCommandQueue function in network/network_command.cpp in OpenTTD before 1.0.3 does not properly clear a pointer in a linked… vulnerability
  • CVE-2008-3688 sockethandler.cpp in HTTP Antivirus Proxy (HAVP) 0.88 allows remote attackers to cause a denial of service (hang) by connecting to a… vulnerability
  • CVE-2006-6499 The js_dtoa function in Mozilla Firefox 2.x before 2.0.0.1, 1.5.x before 1.5.0.9, Thunderbird before 1.5.0.9, and SeaMonkey before 1.0.7… vulnerability

Child of · CWE (1)

  • CWE-834 Excessive Iteration weakness

Referenced by CVE · weakness (1,027)

  • CVE-2026-111731 P-Net before 1.0.3 enters an infinite loop when handling a read request for the PDPortDataCheck record with subslot 0 (whole module). vulnerability
  • CVE-2026-103410 An Integer Overflow vulnerability in the DPI certificate scanner in Juniper Networks Session Smart Router allows an unauthenticated remote… vulnerability
  • CVE-2026-111496 Kafka Streams derives its stream-time clock from record timestamps. vulnerability
  • CVE-2026-118035 In Progress® Telerik® Document Processing Libraries prior to version 2026.3.1027, uncontrolled recursion, inefficient algorithmic… vulnerability
  • CVE-2026-118036 In Progress® Telerik® Document Processing Libraries prior to version 2026.3.1027, uncontrolled recursion, infinite loop, inefficient… vulnerability
  • CVE-2026-118037 In Progress® Telerik® Document Processing Libraries prior to version 2026.3.1027, uncontrolled recursion, infinite loop, unchecked loop… vulnerability
  • CVE-2026-109088 A malicious X server could send malformed RECORD EnableContext reolies that can cause a X client using the parse_reply_call_callback… vulnerability
  • CVE-2026-116774 russh is a Rust SSH client and server library that includes an SSH agent protocol implementation. vulnerability
  • CVE-2026-115269 Allocation of Resources Without Limits or Throttling vulnerability in the HTTP/2 request body reader of mtrudel bandit allows an… vulnerability
  • CVE-2026-116581 Seroval facilitates JavaScript value stringification, including complex structures beyond JSON.stringify capabilities. vulnerability
  • CVE-2026-116671 Infinite loop in Xpdf 4.06 and earlier, due to incorrect validation of progression order field in JPEG 2000 image. vulnerability
  • CVE-2026-115774 Twisted is an event-based framework for internet applications, supporting Python 3.6+. vulnerability
  • CVE-2026-110354 HAProxy 3 before 3.4.6 allows a remote unauthenticated attacker to cause a denial of service (persistent worker-thread CPU exhaustion) via… vulnerability
  • CVE-2026-66281 In EmberZNet 9.1.1 and earlier, a malformed Discover Attributes command can result in a loop with unreachable exit condition (infinite… vulnerability
  • CVE-2026-111074 In Eclipse OpenJ9 versions prior to 0.63.0, the JITServer component is vulnerable to a pre-authentication remote denial of service. vulnerability
  • CVE-2026-113792 pypdf is a free and open-source pure-python PDF library. vulnerability
  • CVE-2026-113793 pypdf is a free and open-source pure-python PDF library. vulnerability
  • CVE-2026-113794 pypdf is a free and open-source pure-python PDF library. vulnerability
  • CVE-2026-114095 Dulwich before 1.2.9 contains a denial of service vulnerability in Pack.resolve_object that allows attackers to cause infinite recursion… vulnerability
  • CVE-2026-20019 Multiple Cisco products are affected by a vulnerability in the Snort 3 NetFlow Detection Engine that could allow an unauthenticated, remote… vulnerability
  • CVE-2026-76445 Multiple Cisco products are affected by a vulnerability in the Snort 3 Detection Engine that could allow an unauthenticated, remote… vulnerability
  • CVE-2026-96642 Pillow is a Python imaging library. vulnerability
  • CVE-2026-92454 The GUIX software JPEG decoder reads four kinds of marker segment without checking that each is long enough to hold what it reads. vulnerability
  • CVE-2026-112390 Pillow is a Python imaging library. vulnerability
  • CVE-2026-112391 Pillow is a Python imaging library. vulnerability
  • CVE-2026-112406 Pillow is a Python imaging library. vulnerability
  • CVE-2026-112046 OW2 ASM 9.11 before 9.11.1 contains an infinite loop vulnerability in Label.resolve() caused by 16-bit forward-reference offsets truncating… vulnerability
  • CVE-2026-105273 MP4Parser does not adequately validate MP4 box sizes. vulnerability
  • CVE-2026-107621 JPEGParser can enter an infinite loop while parsing a specially crafted or truncated stream. vulnerability
  • CVE-2026-68906 libIEC61850 is an open-source implementation of IEC 61850 client and server protocols including MMS, GOOSE, Sampled Values, and R-Session. vulnerability
Show all 1,027 ›

Referenced by CWE · can precede (1)

  • CWE-1322 Use of Blocking Code in Single-threaded, Non-blocking Context weakness

Referenced by CWE · has member (1)