CVE-2026-84504
fastify vulnerable to request body replacement via an async validation result collision
fastify versions before 5.12.2 treat the object resolved by a successful Ajv async validator as the value result protocol used by custom validator compilers. If a request that passes its route schema contains a property named value at the root, fastify replaces the entire request body with that property's value before the handler runs, so the handler receives a different object than the one that satisfied the schema. An authenticated low-privilege caller can use this to make nested data replace the validated body and trigger an operation the route schema did not authorize, leading to unauthorized state changes and data disclosure. Users should upgrade to fastify 5.12.2 or later.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
8.1
fastify vulnerable to request body replacement via an async validation result collision
fastify versions before 5.12.2 treat the object resolved by a successful Ajv async validator as the value result protocol used by custom validator compilers. If a request that passes its route schema contains a property named value at the root, fastify replaces the entire request body with that property's value before the handler runs, so the handler receives a different object than the one that satisfied the schema. An authenticated low-privilege caller can use this to make nested data replace the validated body and trigger an operation the route schema did not authorize, leading to unauthorized state changes and data disclosure. Users should upgrade to fastify 5.12.2 or later.
- Record
CVE-2026-84504- CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-20
- Updated
- 2026-11-02
EUVDEUVD-2026-70984
8.1
fastify versions before 5.12.2 treat the object resolved by a successful Ajv async validator as the value result protocol used by custom validator compilers. If a request that passes its route schema contains a property named value at the root, fastify replaces the entire request body with that property's value before the handler runs, so the handler receives a different object than the one that satisfied the schema. An authenticated low-privilege caller can use this to make nested data replace the validated body and trigger an operation the route schema did not authorize, leading to unauthorized state changes and data disclosure. Users should upgrade to fastify 5.12.2 or later.
- Record
EUVD-2026-70984- CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-667r-xxjv-c9mm
8.1
fastify vulnerable to request body replacement via an async validation result collision
Impact
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.
Patches
Fastify no longer treats an asynchronous validation result as a { value, error } wrapper: an async validator's resolved value is used only to determine pass or fail, and it can no longer replace the request part or inject an error. The synchronous custom-compiler contract is unchanged. Patched in fastify 5.12.2 and 6.0.0.
Workarounds
If upgrading is not immediately possible, avoid $async request schemas, or perform the security-sensitive check in an onRequest or preHandler hook rather than relying on the schema-validated request part. Custom async validator compilers should signal failure by throwing (rejecting) rather than returning an { error } object.
- Record
GHSA-667r-xxjv-c9mm- CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-20
- Updated
- 2026-11-02
NVD
8.1
fastify versions before 5.12.2 treat the object resolved by a successful Ajv async validator as the value result protocol used by custom validator compilers. If a request that passes its route schema contains a property named value at the root, fastify replaces the entire request body with that property's value before the handler runs, so the handler receives a different object than the one that satisfied the schema. An authenticated low-privilege caller can use this to make nested data replace the validated body and trigger an operation the route schema did not authorize, leading to unauthorized state changes and data disclosure. Users should upgrade to fastify 5.12.2 or later.
- Record
CVE-2026-84504- CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-20
- Updated
- 2026-11-02
OSV
8.1
fastify vulnerable to request body replacement via an async validation result collision
fastify versions before 5.12.2 treat the object resolved by a successful Ajv async validator as the value result protocol used by custom validator compilers. If a request that passes its route schema contains a property named value at the root, fastify replaces the entire request body with that property's value before the handler runs, so the handler receives a different object than the one that satisfied the schema. An authenticated low-privilege caller can use this to make nested data replace the validated body and trigger an operation the route schema did not authorize, leading to unauthorized state changes and data disclosure. Users should upgrade to fastify 5.12.2 or later.
- Record
CVE-2026-84504- CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-20
- Updated
- 2026-11-02
OSVGHSA-667r-xxjv-c9mm
8.1
fastify vulnerable to request body replacement via an async validation result collision
Impact
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.
Patches
Fastify no longer treats an asynchronous validation result as a { value, error } wrapper: an async validator's resolved value is used only to determine pass or fail, and it can no longer replace the request part or inject an error. The synchronous custom-compiler contract is unchanged. Patched in fastify 5.12.2 and 6.0.0.
Workarounds
If upgrading is not immediately possible, avoid $async request schemas, or perform the security-sensitive check in an onRequest or preHandler hook rather than relying on the schema-validated request part. Custom async validator compilers should signal failure by throwing (rejecting) rather than returning an { error } object.
- Record
GHSA-667r-xxjv-c9mm- CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-20
- Updated
- 2026-11-02
Show 7 moreShow less
OSVCLSA-2026-1790870980 No score
TuxCare security update for fastify (2 CVEs)
TuxCare rebuilt fastify to address 2 CVEs. Fixed in 5.12.1-tuxcare.2.
- Record
CLSA-2026-1790870980- Updated
- 2026-11-02
OSVCLSA-2026-1790937680 No score
TuxCare security update for fastify (1 CVE)
TuxCare rebuilt fastify to address 1 CVE. Fixed in 5.12.0-tuxcare.3.
- Record
CLSA-2026-1790937680- Updated
- 2026-11-02
OSVCLSA-2026-1790966173 No score
TuxCare security update for fastify (1 CVE)
TuxCare rebuilt fastify to address 1 CVE. Fixed in 5.11.3-tuxcare.5.
- Record
CLSA-2026-1790966173- Updated
- 2026-11-02
OSVCLSA-2026-1791028128 No score
TuxCare security update for fastify (1 CVE)
TuxCare rebuilt fastify to address 1 CVE. Fixed in 5.7.4-tuxcare.4.
- Record
CLSA-2026-1791028128- Updated
- 2026-11-02
OSVCLSA-2026-1791050166 No score
TuxCare security update for fastify (1 CVE)
TuxCare rebuilt fastify to address 1 CVE. Fixed in 5.2.1-tuxcare.4.
- Record
CLSA-2026-1791050166- Updated
- 2026-11-02
OSVCLSA-2026-1791052604 No score
TuxCare security update for fastify (1 CVE)
TuxCare rebuilt fastify to address 1 CVE. Fixed in 4.29.1-tuxcare.4.
- Record
CLSA-2026-1791052604- Updated
- 2026-11-02
OSVCLSA-2026-1794060794 No score
TuxCare security update for fastify (6 CVEs)
TuxCare rebuilt fastify to address 6 CVEs. Fixed in 4.28.1-tuxcare.1.
- Record
CLSA-2026-1794060794- Updated
- 2026-11-07
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
fastifynpm |
before 5.12.2 | 5.12.2 |
fastifyTuxCare:npm |
5.12.1-tuxcare.0 up to 5.12.1-tuxcare.2, plus listed versions 5.12.15.12.1-tuxcare.1 |
5.12.1-tuxcare.2 |
fastifyTuxCare:npm |
5.12.0-tuxcare.0 up to 5.12.0-tuxcare.3, plus listed versions 5.12.05.12.0-tuxcare.15.12.0-tuxcare.2 |
5.12.0-tuxcare.3 |
fastifyTuxCare:npm |
5.11.3-tuxcare.0 up to 5.11.3-tuxcare.5, plus listed versions 5.11.35.11.3-tuxcare.15.11.3-tuxcare.25.11.3-tuxcare.35.11.3-tuxcare.4 |
5.11.3-tuxcare.5 |
fastifyTuxCare:npm |
5.7.4-tuxcare.0 up to 5.7.4-tuxcare.4, plus listed versions 5.7.45.7.4-tuxcare.15.7.4-tuxcare.25.7.4-tuxcare.3 |
5.7.4-tuxcare.4 |
fastifyTuxCare:npm |
5.2.1-tuxcare.0 up to 5.2.1-tuxcare.4, plus listed versions 5.2.15.2.1-tuxcare.15.2.1-tuxcare.25.2.1-tuxcare.3 |
5.2.1-tuxcare.4 |
fastifyTuxCare:npm |
4.29.1-tuxcare.0 up to 4.29.1-tuxcare.4, plus listed versions 4.29.14.29.1-tuxcare.14.29.1-tuxcare.24.29.1-tuxcare.3 |
4.29.1-tuxcare.4 |
fastifyTuxCare:npm From an advisory covering 6 CVEs |
4.28.1-tuxcare.0 up to 4.28.1-tuxcare.1, plus listed versions 4.28.1 |
4.28.1-tuxcare.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, aliases, facts | OSV | |
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-84504 is a high vulnerability (CVSS 8.1) in @clerk Fastify, published September 4, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.43%, the 37th percentile. Fixed in fastify 5.12.2.
References
github.com/fastify/fastify/security/advisories/GHSA-667r-xxjv-c9mm
cna.openjsf.org/security-advisories.html
nvd.nist.gov/vuln/detail/CVE-2026-84504
github.com/fastify/fastify/commit/f02d8d4ab1ab208f10819c4dc213595b06497833
github.com/fastify/fastify/releases/tag/v5.12.2
github.com/advisories/GHSA-667r-xxjv-c9mm
github.com/CVEProject/cvelistV5/tree/main/cves/2026/84xxx/CVE-2026-84504.json
github.com/fastify/fastify