Skip to content
OpenAdvisories

Weakness (CWE)

CWE-674: Uncontrolled Recursion

Class Draft

The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.

How to prevent it (2 mitigations)
  1. Implementation

    Ensure that an end condition will be reached under all logic conditions. The end condition may include checking against the depth of recursion and exiting with an error if the recursion goes too deep. The complexity of the end condition contributes to the effectiveness of this action.

  2. Implementation

    Increase the stack size.

Source: MITRE CWE-674

506 results · Feed

  • High 8.6

    Denial of Service (DOS) in JSONReader in run-llama/llama_index

    A denial of service vulnerability exists in the JSONReader component of the run-llama/llama_index repository, specifically in version v0.12.37. The vulnerability is caused by uncontrolled recursion when parsing deeply nested JSON files, which can lead to Pyth…

  • Medium 6.7

    Uncontrolled recursion for some TinyCBOR libraries maintained by Intel(R) before version 0.6.1 may allow an authenticat…

  • Medium 4.4

    Uncontrolled recursion for some TinyCBOR libraries maintained by Intel(R) before version 0.6.1 may allow an authenticat…

  • Low 3.3

    libxml2 xmlcatalog xmlParseSGMLCatalog recursion

    A vulnerability was found in libxml2 up to 2.14.5. It has been declared as problematic. This vulnerability affects the function xmlParseSGMLCatalog of the component xmlcatalog. The manipulation leads to uncontrolled recursion. Attacking locally is a requireme…

  • High 7.5

    NVIDIA Triton Inference Server for Windows and Linux contains a vulnerability where an attacker could cause uncontrolle…

  • Medium 6.5
    CVE-2025-50420 Public exploit

    An issue in the pdfseparate utility of freedesktop poppler v25.04.0 allows attackers to cause an infinite recursion via…

  • Medium 6.5
    CVE-2025-46206 Public exploit

    An issue in Artifex mupdf 1.25.6, 1.25.5 allows a remote attacker to cause a denial of service via an infinite recursio…

  • Low 3.2

    serde-json-wasm stack overflow during recursive JSON parsing

    The serde-json-wasm crate before 1.0.1 for Rust allows stack consumption via deeply nested JSON data.

  • Medium 5.3
    CVE-2025-48924 Public exploit

    Apache Commons Lang, Apache Commons Lang: ClassUtils.getClass(...) can throw a StackOverflowError on very long inputs

    Uncontrolled Recursion vulnerability in Apache Commons Lang. This issue affects Apache Commons Lang: Starting with commons-lang:commons-lang 2.0 to 2.6, and, from org.apache.commons:commons-lang3 3.0 before 3.18.0. The methods ClassUtils.getClass(...) can thr…

  • Medium 5.8

    Nimbus JOSE + JWT is vulnerable to DoS attacks when processing deeply nested JSON

    Connect2id Nimbus JOSE + JWT 10.0.x before 10.0.2 and 9.37.x before 9.37.4 allows a remote attacker to cause a denial of service via a deeply nested JSON object supplied in a JWT claim set, because of uncontrolled recursion. NOTE: this is independent of the G…

  • Medium 6.5

    Denial of Service via Uncontrolled Recursive JSON Parsing in JSONReader in run-llama/llama_index

    The JSONReader in run-llama/llama_index versions 0.12.28 is vulnerable to a stack overflow due to uncontrolled recursive JSON parsing. This vulnerability allows attackers to trigger a Denial of Service (DoS) by submitting deeply nested JSON structures, leadin…

  • Medium 5.9

    Crash due to uncontrolled recursion in protobuf crate

    The protobuf crate before 3.7.2 for Rust allows uncontrolled recursion in the protobuf::coded_input_stream::CodedInputStream::skip_group parsing of unknown fields in untrusted input.

  • High 7.5

    Pre-authentication Denial of Service Stack Overflow Vulnerability in JSON Parsing via Excessive Recursion in MongoDB

    MongoDB Server may be susceptible to stack overflow due to JSON parsing mechanism, where specifically crafted JSON inputs may induce unwarranted levels of recursion, resulting in excessive stack space consumption. Such inputs can lead to a stack overflow that…

  • High 8.2

    Unbounded recursion in Python Protobuf

    Any project that uses Protobuf Pure-Python backend to parse untrusted Protocol Buffers data containing an arbitrary number of recursive groups, recursive messages or a series of SGROUP tags can be corrupted by exceeding the Python recursion limit. This can re…

  • Medium 6.5
  • High 7.5

    Denial of service via crafted TCP exchange

    In some circumstances, when DNSdist is configured to allow an unlimited number of queries on a single, incoming TCP connection from a client, an attacker can cause a denial of service by crafting a TCP exchange that triggers an exhaustion of the stack and a c…

  • High 7.5

    Denial of Service in run-llama/llama_index

    A Denial of Service (DoS) vulnerability has been identified in the KnowledgeBaseWebReader class of the run-llama/llama_index project, affecting version ~ latest(v0.12.15). The vulnerability arises due to inappropriate secure coding measures, specifically the …

  • Low 3.3

    VisiCut 2.1 allows stack consumption via an XML document with nested set elements, as demonstrated by a java.util.HashM…

  • Medium 6.5

    Helm Allows A Specially Crafted JSON Schema To Cause A Stack Overflow

    Helm is a package manager for Charts for Kubernetes. A JSON Schema file within a chart can be crafted with a deeply nested chain of references, leading to parser recursion that can exceed the stack size limit and trigger a stack overflow. This issue has been …

  • Medium 4.2

    Denial of Service in run-llama/llama_index

    A vulnerability in the `KnowledgeBaseWebReader` class of the run-llama/llama_index repository, version latest, allows an attacker to cause a Denial of Service (DoS) by controlling a URL variable to contain the root URL. This leads to infinite recursive calls …

  • Medium 5.8

    Wire has Uncontrolled Recursion on Nested Groups

    Square Wire before 5.2.0 does not enforce a recursion limit on nested groups in ByteArrayProtoReader32.kt and ProtoReader.kt.

  • High 7.5
    CVE-2024-8176 Public exploit

    Libexpat: expat: improper restriction of xml entity expansion depth in libexpat

    A stack overflow vulnerability exists in the libexpat library due to the way it handles recursive entity expansion in XML documents. When parsing an XML document with deeply nested entity references, libexpat can be forced to recurse indefinitely, exhausting …

  • Medium 5.7

    An issue was discovered in Datalust Seq before 2024.3.13545. An insecure default parsing depth limit allows stack consu…

  • High 7.8

    Uncontrolled Recursion in Wireshark

    Bundle Protocol and CBOR dissector crashes in Wireshark 4.4.0 to 4.4.3 and 4.2.0 to 4.2.10 allows denial of service via packet injection or crafted capture file

  • Low 2.0

    A stack consumption issue in sqfs_size in Das U-Boot before 2025.01-rc1 occurs via a crafted squashfs filesystem with d…

  • High 7.5

    Netplex Json-smart Uncontrolled Recursion vulnerability

    A security issue was found in Netplex Json-smart 2.5.0 through 2.5.1. When loading a specially crafted JSON input, containing a large number of ’{’, a stack exhaustion can be trigger, which could allow an attacker to cause a Denial of Service (DoS). This issu…

  • Medium 4.0

    cpdf through 2.8 allows stack consumption via a crafted PDF document.

  • High 7.4

    Uncontrolled Recursion and Asymmetric Resource Consumption (Amplification) in media/file proxy in Misskey

    Misskey is an open source, federated social media platform. In affected versions FileServerService (media proxy) in github.com/misskey-dev/misskey 2024.10.1 or earlier did not detect proxy loops, which allows remote actors to execute a self-propagating reflec…

  • High —

    ASA-2024-0012, ASA-2024-0013: CosmosSDK: Transaction decoding may result in a stack overflow or resource exhaustion

    ## Summary ### ASA-2024-0012 Name: ASA-2024-0012, Transaction decoding may result in a stack overflow Component: Cosmos SDK Criticality: High (Considerable Impact, and Possible Likelihood per [ACMv1.2](https://github.com/interchainio/security/blob/main/resour…

  • High 8.7

    Uncontrolled recursion due to insufficient validation of the IPv6 source routing header in Contiki-NG

    Contiki-NG is an open-source, cross-platform operating system for IoT devices. The Contiki-NG operating system processes source routing headers (SRH) in its two alternative RPL protocol implementations. The IPv6 implementation uses the results of this process…

  • Medium 5.3

    smol-toml has a Denial of Service via malicious TOML document using deeply nested inline tables

    ### Summary An attacker can send a maliciously crafted TOML to cause the parser to crash because of a stack overflow caused by a deeply nested inline structure. A similar problem occurs when attempting to stringify deeply nested objects. The library does not …

  • High 7.5

    afs: Fix lock recursion

    In the Linux kernel, the following vulnerability has been resolved: afs: Fix lock recursion afs_wake_up_async_call() can incur lock recursion. The problem is that it is called from AF_RXRPC whilst holding the ->notify_lock, but it tries to take a ref on the a…

  • High 7.5

    In Faust 2.23.1, an input file with the lines "// r visualisation tCst" and "//process = +: L: abM-^Q;" and "process = …

  • Medium 5.9

    Next.js image optimization has Denial of Service condition

    Next.js is a React Framework for the Web. Cersions on the 10.x, 11.x, 12.x, 13.x, and 14.x branches before version 14.2.7 contain a vulnerability in the image optimization feature which allows for a potential Denial of Service (DoS) condition which could lead…

  • Medium 5.5

    Denial-of-service due to unbounded pattern matching in Redis

    Redis is an open source, in-memory database that persists on disk. Authenticated users can trigger a denial-of-service by using specially crafted, long string match patterns on supported commands such as `KEYS`, `SCAN`, `PSUBSCRIBE`, `FUNCTION LIST`, `COMMAND…

  • High 8.7

    Stack overflow in Protocol Buffers Java Lite

    Any project that parses untrusted Protocol Buffers data containing an arbitrary number of nested groups / series of SGROUP tags can corrupted by exceeding the stack limit i.e. StackOverflow. Parsing nested groups as unknown fields with DiscardUnknownFieldsPar…

  • High 7.5

    Stack exhaustion in Parse in go/build/constraint

    Calling Parse on a "// +build" build tag line with deeply nested expressions can cause a panic due to stack exhaustion.

  • High 7.5

    Apollo Query Planner and Apollo Gateway may infinitely loop on sufficiently complex queries

    Apollo Federation is an architecture for declaratively composing APIs into a unified graph. Each team can own their slice of the graph independently, empowering them to deliver autonomously and incrementally. Instances of @apollo/query-planner >=2.0.0 and <2.…

  • Medium 4.1

    A room with itself as a its predecessor will freeze matrix-js-sdk

    matrix-js-sdk is a Matrix messaging protocol Client-Server SDK for JavaScript. A malicious homeserver can craft a room or room structure such that the predecessors form a cycle. The matrix-js-sdk's getRoomUpgradeHistory function will infinitely recurse in thi…

  • High 7.5

    Miniscript allows stack consumption

    The Miniscript (aka rust-miniscript) library before 12.2.0 for Rust allows stack consumption because it does not properly track tree depth.