Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. fastify
  4. ›
  5. CVE-2026-84504

CVE-2026-84504: fastify vulnerable to request body replacement via an async validation result collision

September 30, 2026

Fastify runs a route’s validator and, for a result shaped like { value, error }, unwraps it: an error becomes a validation failure and value replaces the request part. This convention is intended for synchronous custom compilers (for example Joi). A JSON Schema $async validator, however, resolves with the validated data itself, so Fastify applied the same unwrapping to it. If a request part validated by an $async schema contains a value property, Fastify replaced the whole request part with that nested value before the handler ran, so a value or error property in the payload was attacker-controlled. An application that dispatches operations from the validated request body could then act on data that never satisfied the route schema, leading to unauthorized state changes or disclosure. Reaching the vulnerable path requires the route to use an $async request schema.

References

  • cna.openjsf.org/security-advisories.html
  • github.com/advisories/GHSA-667r-xxjv-c9mm
  • github.com/fastify/fastify/commit/f02d8d4ab1ab208f10819c4dc213595b06497833
  • github.com/fastify/fastify/releases/tag/v5.12.2
  • github.com/fastify/fastify/security/advisories/GHSA-667r-xxjv-c9mm
  • nvd.nist.gov/vuln/detail/CVE-2026-84504

Code Behaviors & Features

Detect and mitigate CVE-2026-84504 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 5.12.2

Fixed versions

  • 5.12.2

Solution

Upgrade to version 5.12.2 or above.

Impact 8.1 HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-20: Improper Input Validation

Source file

npm/fastify/CVE-2026-84504.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Thu, 15 Oct 2026 12:17:33 +0000.