Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CWE-835 (不可达退出条件的循环(无限循环)) — Vulnerability Class 252

252 vulnerabilities classified as CWE-835 (不可达退出条件的循环(无限循环)). AI Chinese analysis included.

CWE-835 represents a logic error where a software loop lacks a reachable termination condition, resulting in an infinite execution cycle. This weakness typically manifests when developers fail to update loop variables correctly or rely on floating-point comparisons prone to precision errors. Attackers exploit this vulnerability to trigger Denial of Service (DoS) attacks by consuming excessive CPU resources, effectively freezing the application or system. To mitigate this risk, developers must ensure loop counters are properly incremented or decremented within the iteration body. Implementing strict boundary checks, avoiding direct equality comparisons with floating-point numbers, and utilizing static analysis tools can help detect unreachable exit conditions early. Additionally, incorporating timeout mechanisms or maximum iteration limits provides a safety net, ensuring that even if logic errors occur, the process terminates gracefully without exhausting system resources.

MITRE CWE Description
The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.
Common Consequences (1)
AvailabilityDoS: 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.
Examples (2)
In the following code the method processMessagesFromServer attempts to establish a connection to a server and read and process messages from the server. The method uses a do/while loop to continue trying to establish the connection to the server when an attempt fails.
int processMessagesFromServer(char *hostaddr, int port) { ... int servsock; int connected; struct sockaddr_in servaddr; // create socket to connect to server servsock = socket( AF_INET, SOCK_STREAM, 0); memset( &servaddr, 0, sizeof(servaddr)); servaddr.sin_family = AF_INET; servaddr.sin_port = htons(port); servaddr.sin_addr.s_addr = inet_addr(hostaddr); do { // establish connection to server connected = connect(servsock, (struct sockaddr *)&servaddr, sizeof(servaddr)); // if connected then read and process messages from server if (connected > -1) { // read and process messages ... } // keep tr
Bad · C
int processMessagesFromServer(char *hostaddr, int port) { ... // initialize number of attempts counter int count = 0; do { // establish connection to server connected = connect(servsock, (struct sockaddr *)&servaddr, sizeof(servaddr)); // increment counter count++; // if connected then read and process messages from server if (connected > -1) { // read and process messages ... } // keep trying to establish connection to the server // up to a maximum number of attempts } while (connected < 0 && count < MAX_ATTEMPTS); // close socket and return success or failure ... }
Good · C
For this example, the method isReorderNeeded is part of a bookstore application that determines if a particular book needs to be reordered based on the current inventory count and the rate at which the book is being sold.
public boolean isReorderNeeded(String bookISBN, int rateSold) { boolean isReorder = false; int minimumCount = 10; int days = 0; // get inventory count for book int inventoryCount = inventory.getIventoryCount(bookISBN); // find number of days until inventory count reaches minimum while (inventoryCount > minimumCount) { inventoryCount = inventoryCount - rateSold; days++; } // if number of days within reorder timeframe // set reorder return boolean to true if (days > 0 && days < 5) { isReorder = true; } return isReorder; }
Bad · Java
public boolean isReorderNeeded(String bookISBN, int rateSold) { ... // validate rateSold variable if (rateSold < 1) { return isReorder; } ... }
Good · Java
CVE IDTitleCVSSSeverityPublished
CVE-2026-50647 Active Directory Federation Server Denial of Service Vulnerability — Windows 10 Version 1607 7.5 High2026-07-14
CVE-2026-50324 Windows Active Directory Federation Services Denial of Service Vulnerability — Windows 10 Version 1607 5.9 Medium2026-07-14
CVE-2026-50653 Azure Active Directory Denial of Service Vulnerability — Azure Active Directory 7.5 High2026-07-14
CVE-2026-54119 Windows Active Directory Denial of Service Vulnerability — Windows 10 Version 1607 7.5 High2026-07-14
CVE-2026-62642 Roundcube Webmail TNEF无限循环致DoS漏洞 — Webmail 4.3 Medium2026-07-14
CVE-2026-59203 Pillow EpsImagePlugin negative %%BeginBinary byte count causes infinite loop denial of service — Pillow 5.3 Medium2026-07-14
CVE-2026-55865 Python Liquid: Infinite loop when parsing malformed `{% case %}` tags — liquid--2026-07-09
CVE-2026-56289 Loop with Unreachable Exit Condition in GNU patch — patch--2026-07-09
CVE-2026-15163 Loop with Unreachable Exit Condition ('Infinite Loop') in Wireshark — Wireshark 5.5 Medium2026-07-08
CVE-2026-59935 pypdf: Possible infinite loop for not terminated inline images (ASCII85 and ASCIIHex filter) — pypdf--2026-07-08
CVE-2026-59877 protobufjs: Denial of Service via infinite loop in .proto option parsing — protobuf.js 5.3 Medium2026-07-08
CVE-2026-59874 node-tar: Negative tar entry size causes infinite loop in archive replace — node-tar--2026-07-08
CVE-2026-54886 SSH SFTP server denial of service via extended channel data infinite loop — OTP--2026-07-02
CVE-2026-6684 FatFs Infinite Loop in GPT Partition Scan — FatFs 4.6 Medium2026-07-01
CVE-2026-14258 Dhcpcd: dhcpcd infinite loop and out-of-bounds read via zero-length ipv6 nd option in router advertisement handling — Red Hat Enterprise Linux 10 6.5 Medium2026-07-01
CVE-2026-10642 Unbounded TX busy-loop DoS in Zephyr PL011 UART driver under CTS hardware flow control — zephyr 4.6 Medium2026-06-24
CVE-2026-54904 concurrent-ruby: `AtomicReference#update` livelocks when the stored value is `Float::NAN` — concurrent-ruby--2026-06-24
CVE-2026-54651 pypdf: Possible infinite loop when processing threads/articles in writer — pypdf--2026-06-22
CVE-2026-54531 pypdf: Possible infinite loop when processing outlines/bookmarks in writer — pypdf--2026-06-22
CVE-2026-54530 pypdf: Possible infinite loop when retrieving fonts for layout-mode text extraction — pypdf--2026-06-22
CVE-2026-48986 pam_usb: Infinite loop DoS in process-tree walk when parent process exits during authentication — pam_usb 4.7 Medium2026-06-18
CVE-2026-55199 libssh2 - Pre-Authentication DoS via SSH_MSG_EXT_INFO Handler — libssh2 5.9 Medium2026-06-17
CVE-2026-48733 ImageMagick: Infinite Loop in subimage-search with crafted image — ImageMagick 4.7 Medium2026-06-10
CVE-2025-71329 image-size 2.0.2 Denial of Service via Infinite Loop in JXL/HEIF Parser — image-size 7.5 High2026-06-10
CVE-2025-71330 image-size 2.0.2 Denial of Service via Malformed ICNS Image Parsing — image-size 7.5 High2026-06-10
CVE-2026-49495 Ghidra 10.2 < 12.1 - Denial of Service via Circular Reference in Mach-O Export Trie Parser — ghidra 5.5 Medium2026-06-10
CVE-2025-71319 image-size 2.0.2 Denial of Service via Infinite Loop in JXL/HEIF Parser — image-size 7.5 High2026-06-09
CVE-2026-44186 Apache HTTP Server: Loop in `proxy_ftp_handler` in mod_proxy_ftp — Apache HTTP Server--2026-06-08
CVE-2026-41150 Mermaid Gantt Charts are vulnerable to an Infinite Loop DoS — mermaid--2026-05-29
CVE-2026-10028 Glib-networking: infinite loop in glib-networking gnutls backend allows remote denial of service via circular certificate chain — Red Hat Enterprise Linux 10 4.3 Medium2026-05-28

Vulnerabilities classified as CWE-835 (不可达退出条件的循环(无限循环)) represent 252 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.