CVEMETERBack to radar
OFFICIAL RECORD · JavaScript packages

CVE-2026-18504

PUBLISHEDOfficial status check: verifiedCVSS 3.1: 5.4 · medium

fastify vulnerable to schema validation bypass via root primitive coercion mismatch

fastify is a fast and low overhead web framework for Node.js. Versions of fastify before 5.12.1 are affected by a schema validation bypass when a request body schema targets a root primitive value. When the schema validates a top-level primitive such as an integer, Ajv can coerce a JSON string into the expected type during validation, but Fastify does not replace the root request body with the coerced value, so the route handler receives the original unvalidated string. As a result, a request that should have failed validation can reach application logic with a value that does not satisfy the schema, which can undermine integrity and access-control checks that rely on the validated type. Users should upgrade to fastify 5.12.1, which fixes the mismatch. No known workarounds are available.

Exposure status: unknown. This page does not establish whether an installed system is affected or corrected.

Severity and exploitation evidence

EPSS: 0.280% · score date 2026-11-19. EPSS is an estimated probability over the next 30 days, not proof of exploitation.

CISA KEV: not included in the checked catalog; exploitation may still occur. Last checked: 2026-11-19T17:28:52.703Z. Public exploit availability is not used to set this status.

CVSS 3.1 · 5.4 · published by openjs
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
Assessment source · checked 2026-11-19T12:58:10.467Z

Verification by field

FieldStatusChecked at (UTC)Source
kevverified2026-11-19T17:28:52.703ZCISA KEV
cvssverified2026-11-19T12:58:10.467ZCVE Program
epssverified2026-11-19T16:04:47.342ZFIRST EPSS
patchesverified2026-11-19T12:52:30.987ZOSV
affectedverified2026-11-19T12:58:10.467ZCVE Program
lifecycleverified2026-11-19T12:58:10.467ZCVE Program

Affected versions and configuration

fastify fastify; default status: unaffected: 0 to < 5.12.1 [affected; scheme: semver]; 5.12.1 [unaffected; scheme: semver]

Defaults, conditional configuration, package status and version schemes are retained below. A version range alone is not an exposure verdict.

CVE Program · cve-json · full conditions
{
  "affected": [
    {
      "vendor": "fastify",
      "product": "fastify",
      "versions": [
        {
          "status": "affected",
          "version": "0",
          "lessThan": "5.12.1",
          "versionType": "semver"
        },
        {
          "status": "unaffected",
          "version": "5.12.1",
          "versionType": "semver"
        }
      ],
      "packageURL": "pkg:npm/fastify",
      "defaultStatus": "unaffected"
    }
  ],
  "additionalContainers": [
    {
      "title": "CISA ADP Vulnrichment",
      "metrics": [
        {
          "other": {
            "type": "ssvc",
            "content": {
              "id": "CVE-2026-18504",
              "role": "CISA Coordinator",
              "options": [
                {
                  "Exploitation": "none"
                },
                {
                  "Automatable": "no"
                },
                {
                  "Technical Impact": "partial"
                }
              ],
              "version": "2.0.3",
              "timestamp": "2026-08-19T13:14:53.749588Z"
            }
          }
        }
      ],
      "providerMetadata": {
        "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "shortName": "CISA-ADP",
        "dateUpdated": "2026-08-19T13:15:05.131Z"
      }
    }
  ]
}
Archived source JSON
OSV · osv · full conditions
{
  "id": "GHSA-w2qp-rph6-63g4",
  "aliases": [
    "CVE-2026-18504"
  ],
  "affected": [
    {
      "ranges": [
        {
          "type": "SEMVER",
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "5.12.1"
            }
          ]
        }
      ],
      "package": {
        "name": "fastify",
        "purl": "pkg:npm/fastify",
        "ecosystem": "npm"
      },
      "versions": [],
      "database_specific": {
        "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-w2qp-rph6-63g4/GHSA-w2qp-rph6-63g4.json"
      }
    }
  ],
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N"
    }
  ],
  "upstream": [],
  "withdrawn": null,
  "references": [
    {
      "url": "https://github.com/fastify/fastify/security/advisories/GHSA-w2qp-rph6-63g4",
      "type": "WEB"
    },
    {
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-18504",
      "type": "ADVISORY"
    },
    {
      "url": "https://github.com/fastify/fastify/commit/1ef8a60c87e94f42f666aa15ad68957772a83655",
      "type": "WEB"
    },
    {
      "url": "https://cna.openjsf.org/security-advisories.html",
      "type": "WEB"
    },
    {
      "url": "https://github.com/fastify/fastify",
      "type": "PACKAGE"
    },
    {
      "url": "https://github.com/fastify/fastify/releases/tag/v5.12.1",
      "type": "WEB"
    }
  ],
  "relatedGitRanges": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-20"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "nvd_published_at": "2026-08-18T21:16:34Z",
    "github_reviewed_at": "2026-09-02T15:13:23Z"
  }
}
Archived source JSON

Correction evidence

Distribution packages and upstream releases are distinct. ESM channels may require the corresponding Ubuntu entitlement. Notes and branch ranges are not installable package versions. OSV fixed boundaries are ecosystem-specific version thresholds, not proof that a package is currently available or installed.

Evidence typeDistribution / releasePackageChannelVersion or source noteSource
ecosystem-boundarynpm / packagefastifyNot a distribution channel5.12.1Official record

Vendor notices and operational guidance

No connected vendor notice is available for this record.

Original sources and dates

Official status history