fastify/fastify-reply-from · Security
@fastify/reply-from JSON Content-Type parsing confusion
- GHSA ID
- GHSA-v2v2-hph8-q5xp
- CVE ID
- CVE-2023-51701
- Severity
- medium
- Published
- Updated
- CVSS
- 5.3 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- CVSS v3
- 5.3 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Description
Impact
The main repo of fastify use fast-content-type-parse to parse request Content-Type, which will trim after split.
The fastify-reply-from have not use this repo to unify the parse of Content-Type, which won't trim.
As a result, a reverse proxy server built with @fastify/reply-from could misinterpret the incoming body by passing an header ContentType: application/json ; charset=utf-8. This can lead to bypass of security checks.
Patches
@fastify/reply-from v9.6.0 include the fix.
Workarounds
There are no known workarounds.
References
Hackerone Report: https://hackerone.com/reports/2295770.
CWEs
- CWE-444 · Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')
References
- https://github.com/fastify/fastify-reply-from/security/advisories/GHSA-v2v2-hph8-q5xp ↗
- https://github.com/fastify/fastify-reply-from/commit/cbd7c17c09e6476268e34f5e499a6b923e8acc18 ↗
- https://github.com/fastify/fastify-reply-from/releases/tag/v9.6.0 ↗
- https://nvd.nist.gov/vuln/detail/CVE-2023-51701 ↗
- https://github.com/advisories/GHSA-v2v2-hph8-q5xp ↗