cve.bz

CVE-2026-18504 fastify fastify: Improper Input Validation

5.3 mediumEPSS 0.3%Fix available

Medium (5.3) in fastify fastify. EPSS 0.3% estimated probability of exploitation activity in the next 30 days. Fixed in fastify 5.12.1.

On this page
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.

Severity

CVSS 3.1

5.3 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
EPSS
0.3% (unchanged from 0.3% a week ago; 0.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 21st percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-08-19. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-20 Improper Input Validation
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-18504 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-18504?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-18504?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-18504 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
fastifybefore 5.12.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-w2qp-rph6-63g4npmfastify<5.12.15.12.1

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

A moderate severity schema validation bypass was found in fastify, a Node.js web framework bundled in Red Hat OpenShift AI (RHOAI) container images. When a route's request body schema targets a root primitive value (such as a top-level integer), the Ajv-based validation process may coerce a JSON string into the expected type during validation, but fastify does not replace the root request body with the coerced value. As a result, the route handler receives the original unvalidated string, and a remote attacker can cause a request that should have failed validation to reach application logic with a value that does not satisfy the schema. This can undermine integrity and access-control checks that rely on the validated type, potentially leading to unintended behavior or unauthorized access. The affected RHOAI components bundle the fastify 4.x release line, while the upstream fix is only available in a later major release line of fastify, so updating the bundled dependency is deferred to a future product release. Until then, a residual risk remains for applications that rely on root primitive request body schemas to enforce type-based integrity or access-control checks.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux AI (RHEL AI) 3rhelai3/bootc-cuda-rhel9Fix deferred
Red Hat Enterprise Linux AI (RHEL AI) 3rhelai3/bootc-gaudi-rhel9Fix deferred
Red Hat Enterprise Linux AI (RHEL AI) 3rhelai3/bootc-rocm-rhel9Fix deferred
Red Hat Enterprise Linux AI (RHEL AI) 3rhelai3/disk-image-cuda-rhel9Fix deferred
Red Hat OpenShift AI (RHOAI)rhoai/odh-core-bff-rhel9Fix deferred
Red Hat OpenShift AI (RHOAI)rhoai/odh-dashboard-operator-rhel9Fix deferred
Red Hat OpenShift AI (RHOAI)rhoai/odh-dashboard-rhel9Fix deferred
Red Hat OpenShift AI (RHOAI)rhoai/odh-mod-arch-agent-ops-rhel9Fix deferred
Red Hat OpenShift AI (RHOAI)rhoai/odh-mod-arch-automl-rhel9Fix deferred
Red Hat OpenShift AI (RHOAI)rhoai/odh-mod-arch-autorag-rhel9Fix deferred
Red Hat OpenShift AI (RHOAI)rhoai/odh-mod-arch-eval-hub-rhel9Fix deferred
Red Hat OpenShift AI (RHOAI)rhoai/odh-mod-arch-gen-ai-rhel9Fix deferred
Red Hat OpenShift AI (RHOAI)rhoai/odh-mod-arch-maas-rhel9Fix deferred
Red Hat OpenShift AI (RHOAI)rhoai/odh-mod-arch-mlflow-rhel9Fix deferred
Red Hat OpenShift AI (RHOAI)rhoai/odh-mod-arch-model-registry-rhel9Fix deferred
Red Hat OpenShift Dev Spacesdevspaces/dashboard-rhel9Fix deferred

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-18504.

GitHub PoC (unverified)

Repositories on GitHub named after this CVE. Nobody has checked them and they are not scanned: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-20 (51).

References

Check your stackJSON