logo

CVE-2023-51701 @fastify/reply-from

Package

Manager: npm
Name: @fastify/reply-from
Vulnerable Version: >=0 <9.6.0

Severity

Level: Medium

CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

EPSS: 0.00099 pctl0.28261

Details

@fastify/reply-from JSON Content-Type parsing confusion ### Impact The main repo of fastify use [fast-content-type-parse](https://github.com/fastify/fast-content-type-parse) to parse request Content-Type, which will [trim after split](https://github.com/fastify/fast-content-type-parse/blob/2776d054dd48e9ce40b8d5e5ff9b46fee82b95f1/index.js#L59). The [fastify-reply-from](https://github.com/fastify/fastify-reply-from/blob/b79a22d6eb9a0b52cfbe8eb2cb22ad65f5a39e64/index.js#L118C14-L118C14) have not use this repo to unify the parse of Content-Type, which [won't trim](https://github.com/fastify/fastify-reply-from/blob/b79a22d6eb9a0b52cfbe8eb2cb22ad65f5a39e64/index.js#L118C14-L118C14). 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.

Metadata

Created: 2024-01-08T15:22:40Z
Modified: 2024-01-08T15:55:16Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/01/GHSA-v2v2-hph8-q5xp/GHSA-v2v2-hph8-q5xp.json
CWE IDs: ["CWE-444"]
Alternative ID: GHSA-v2v2-hph8-q5xp
Finding: F110
Auto approve: 1