Skip to content
Heist/ feed
Back to feed
HighFix available

Zod can exhaust memory while validating oversized constrained collections

Type: advisorySources: OSV

Zod schema-validation library through 4.6.5 contains an uncontrolled resource consumption vulnerability that allows attackers to exhaust memory by submitting a large array to an application using an array schema without a length constraint. Attackers can exploit the handleArrayResult parse logic in $ZodArray, which accumulates every validation issue for each failing element with no cap or early termination, causing the process to allocate excessive issue objects and crash due to out-of-memory conditions.

Products
zod
Affected versions
Not specified
Fixed versions
4.6.6
CVEs
CVE-2023-54404
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 02:32 UTC · Revision 1

Source evidence

Zod can exhaust memory while validating oversized constrained collections

core-osv · Original source

Published 1 Oct 2026, 18:32 UTC

Zod schema-validation library through 4.6.5 contains an uncontrolled resource consumption vulnerability that allows attackers to exhaust memory by submitting a large array to an application using an array schema without a length constraint. Attackers can exploit the handleArrayResult parse logic in $ZodArray, which accumulates every validation issue for each failing element with no cap or early termination, causing the process to allocate excessive issue objects and crash due to out-of-memory conditions.

osv:GHSA-mrhx-c7xc-m3w5

zod

Fixed versions: 4.6.6

Complete source record
{
  "id": "7f8e3c848f8186be105593b96debeddb8d06f420c546f611a230750e94d27a3c",
  "url": "https://osv.dev/vulnerability/GHSA-mrhx-c7xc-m3w5",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Zod can exhaust memory while validating oversized constrained collections",
    "summary": "Zod schema-validation library through 4.6.5 contains an uncontrolled resource consumption vulnerability that allows attackers to exhaust memory by submitting a large array to an application using an array schema without a length constraint. Attackers can exploit the handleArrayResult parse logic in $ZodArray, which accumulates every validation issue for each failing element with no cap or early termination, causing the process to allocate excessive issue objects and crash due to out-of-memory conditions.",
    "evidence": "osv:GHSA-mrhx-c7xc-m3w5",
    "products": [
      {
        "name": {
          "value": "zod",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.6.6",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "GHSA-mrhx-c7xc-m3w5",
      "aliases": [
        "CVE-2023-54404",
        "GHSA-mrhx-c7xc-m3w5"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        },
        {
          "type": "CVSS_V4",
          "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"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "4.6.6"
                }
              ]
            }
          ],
          "package": {
            "name": "zod",
            "purl": "pkg:npm/zod",
            "ecosystem": "npm"
          },
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-mrhx-c7xc-m3w5/GHSA-mrhx-c7xc-m3w5.json"
          }
        }
      ],
      "modified": "2026-10-23T18:30:09.376405885Z",
      "provider": "osv",
      "references": [
        "https://nvd.nist.gov/vuln/detail/CVE-2023-54404",
        "https://github.com/colinhacks/zod/issues/1872",
        "https://github.com/colinhacks/zod/pull/6475",
        "https://github.com/colinhacks/zod/pull/6652",
        "https://github.com/colinhacks/zod/commit/a0ebf970f2d752e5f58527cd2942ff48be4f46bd",
        "https://github.com/colinhacks/zod",
        "https://www.vulncheck.com/advisories/zod-uncontrolled-resource-consumption-via-array-validation"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-770"
        ],
        "severity": "HIGH",
        "github_reviewed": true,
        "nvd_published_at": "2026-10-01T18:17:11Z",
        "github_reviewed_at": "2026-10-23T18:26:50Z"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2023-54404",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/database_specific/severity"
  },
  "source_id": "core-osv",
  "document_id": 424596,
  "published_at": "2026-10-01T18:32:46+00:00"
}