# CVE-2023-51701: @fastify/reply-from JSON Content-Type parsing confusion

Source: https://junglewise.ai/threats/cve-2023-51701-fastify-reply-from-json-content-type-parsing-confusion  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2024-01-08. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2023-51701 · Severity: low · CVSS 3.1 · Published 2024-01-08

@fastify/reply-from is a Fastify plugin that implements reverse proxy functionality. A parsing inconsistency in Content-Type header handling could allow an attacker to bypass security checks by crafting malformed requests with spaces in the Content-Type header (e.g., "application/json ; charset=utf-8"), causing the proxy to misinterpret the request body.

Technologies: [@fastify/reply-from (npm)](https://junglewise.ai/threats/technologies/fastify-reply-from). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2023-51701 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2023-51701 being exploited in the wild.

**How severe is CVE-2023-51701?** Low severity, with a CVSS score of 3.1, published 8 January 2024.

**Which products and versions are affected?** @fastify/reply-from (npm) SEMVER:introduced=0,fixed=9.6.0.

**Is there a fix for CVE-2023-51701?** Yes. @fastify/reply-from (npm): upgrade to 9.6.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2023-51701 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2023-51701?** Check whether you run @fastify/reply-from (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- @fastify/reply-from (npm): upgrade to 9.6.0 or later

  ```sh
  npm install @fastify/reply-from@9.6.0
  ```


## Technical details

This vulnerability is a Content-Type parsing confusion (CWE-444: HTTP Request/Response Smuggling) where @fastify/reply-from does not trim whitespace after splitting the Content-Type header, unlike the main fastify framework which uses fast-content-type-parse for consistent parsing. An attacker can send a crafted Content-Type header with spaces (e.g., "application/json ; charset=utf-8") that will be misinterpreted by the reverse proxy, potentially bypassing downstream security checks. The vulnerability requires only network access with no authentication or user interaction. It is fixed in version 9.6.0 and later.

## Affected products

- Fastify @fastify/reply-from <9.6.0

## Identifiers

- CVE-2023-51701
- GHSA-v2v2-hph8-q5xp

## Timeline

- 2024-01-08: disclosed
- 2024-01-08: patched: Fixed in v9.6.0

## References

- [https://github.com/fastify/fastify-reply-from/security/advisories/GHSA-v2v2-hph8-q5xp](https://github.com/fastify/fastify-reply-from/security/advisories/GHSA-v2v2-hph8-q5xp)

## Related threats

- [Fastify proxy components header stripping via Connection header abuse](https://junglewise.ai/threats/cve-2026-33805-fastify-proxy-components-header-stripping-via-connection-header)
- [Fastify reply-from route bypass using path traversal](https://junglewise.ai/threats/cve-2025-66415-fastify-fastify-reply-from-reply-forwarding-bypass)
- [fastify-reply-from prefix escape in URL routing](https://junglewise.ai/threats/cve-2021-21321-fastify-reply-from-prefix-escape-in-url-routing)
