GHSA-v2v2-hph8-q5xp

Suggest an improvement
Source
https://github.com/advisories/GHSA-v2v2-hph8-q5xp
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/01/GHSA-v2v2-hph8-q5xp/GHSA-v2v2-hph8-q5xp.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-v2v2-hph8-q5xp
Aliases
Related
Published
2024-01-08T15:22:40Z
Modified
2024-01-08T15:55:16Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N CVSS Calculator
Summary
@fastify/reply-from JSON Content-Type parsing confusion
Details

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.

Database specific
{
    "github_reviewed_at": "2024-01-08T15:22:40Z",
    "cwe_ids": [
        "CWE-444"
    ],
    "nvd_published_at": "2024-01-08T14:15:46Z",
    "severity": "MODERATE",
    "github_reviewed": true
}
References

Affected packages

npm / @fastify/reply-from

Package

Name
@fastify/reply-from
View open source insights on deps.dev
Purl
pkg:npm/%40fastify/reply-from

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
9.6.0