Security mailing lists by PureSourceCode

CVE-2026-18504

MEDIUM 5.3CVSS 3.1

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.

Published
18 Aug 2026
Last modified
2 Sep 2026
Assigned by
ce714d77-add3-4f53-aff5-83d477b104bb
NVD status
Analyzed
Weakness
CWE-20
Also known as
GHSA-w2qp-rph6-63g4
Sources
NVDJSONOSV GHSA-w2qp-rph6-63g4JSON

Scores

SourceScored byVersionScoreVector / decision
NVD ce714d77-add3-4f53-aff5-83d477b104bb (Secondary) CVSS 3.1 MEDIUM 5.4 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
OSV GitHub CVSS 3.1 MEDIUM 5.4 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
NVD nvd@nist.gov (Primary) CVSS 3.1 MEDIUM 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD fastify fastify
cpe:2.3:a:fastify:fastify:*:*:*:*:*:node.js:*:*
< 5.12.1 5.12.1
OSV npm fastify < 5.12.1 5.12.1

References

History

  • 25 Nov 2026 21:04 UTC · NVD: first stored (published 18 Aug 2026)
  • 25 Nov 2026 20:11 UTC · OSV: first stored (published 2 Sep 2026)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.