CVE-2026-18504Fastify
Medium 5.3 No auth needed
Follow: this CVE · Fastify · Fastify We alert you by email or Slack (account required).
- Priority
- 47
- CVSS 3.1
- 5.3
- EPSS
- —
- Auth required
- No
- Published
- Aug 18, 2026
- Updated
- Sep 2, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-20
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
What happens
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.
What to do
- Apply the vendor's security update for Fastify.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | fastify |
< 5.12.1 |
5.12.1 |
npm install fastify@5.12.1 |
Per OSV / GitHub Advisories (GHSA-w2qp-rph6-63g4). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| fastify | fastify | < 5.12.1 |
Official sources
References
Links published by the sources. Open them with care.
- cna.openjsf.org Third Party Advisory
- github.com Mitigation Vendor Advisory