PT-2024-34666 · .Net · Refit
Sofiaml
·
Published
2024-11-04
·
Updated
2025-01-13
·
CVE-2024-51501
CVSS v4.0
10
Critical
| Vector | AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H |
Name of the Vulnerable Software and Affected Versions
Refit versions prior to 7.2.22
Refit versions prior to 8.0.0
Description
The Refit library for .NET Core, Xamarin, and .NET has a CRLF injection vulnerability in its header-related attributes. This vulnerability occurs because the
HttpHeaders.TryAddWithoutValidation method does not check for CRLF characters in the header value, allowing an attacker to inject additional HTTP headers or smuggle whole HTTP requests. If an application using the Refit library passes a user-controllable value through to a header, then that application becomes vulnerable to CRLF-injection, which can lead to request splitting and Server Side Request Forgery (SSRF).Recommendations
For Refit versions prior to 7.2.22, upgrade to version 7.2.22 or later.
For Refit versions prior to 8.0.0, upgrade to version 8.0.0 or later.
As a temporary workaround, consider avoiding the use of the
HttpHeaders.TryAddWithoutValidation method and instead use a validated method to add headers to requests.
Restrict access to user-controllable header values to minimize the risk of exploitation.Exploit
Fix
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Refit