CVE catalog

CVE-2026-18504

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. Wh

[CVE catalog]

Severity
Medium · CVSS 5.4CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
Published
Updated
Source
[NVD] · [CVE record]
EPSS
0.28% · Oct 25, 2026

A flaw was found in fastify. A remote attacker can bypass schema validation when a request body schema targets a root primitive value. This occurs because the validation process may coerce a JSON string into an expected type, but the original unvalidated string is then passed to the application logic. This can undermine integrity and access-control checks that rely on the validated type, potentially leading to unintended behavior or unauthorized access. fastify: fastify: Schema validation bypass via root primitive coercion mismatch 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. The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
CpefastifyNot reported5.12.1fixed
NpmfastifyNot reported5.12.1fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
CpefastifycpeNot reported5.12.1Not reportedNVD-CVE-2026-18504Not reported
NpmfastifynpmNot reported5.12.1Not reportedGHSA-W2QP-RPH6-63G4Not reported

OpenFactory catalog packages

No matching packages in this catalog.

Observed:

References