Skip to content

CVE-2024-51501 CRLF injection in Refit's [Header], [HeaderCollection] and [Authorize] attributes

CriticalCVSS 10.0 EPSS 0.56%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: no · technical impact: partial

Description

Refit is an automatic type-safe REST library for .NET Core, Xamarin and .NET The various header-related Refit attributes (Header, HeaderCollection and Authorize) are vulnerable to CRLF injection. The way HTTP headers are added to a request is via the HttpHeaders.TryAddWithoutValidation method. This method does not check for CRLF characters in the header value. This means that any headers added to a refit request are vulnerable to CRLF-injection. In general, CRLF-injection into a HTTP header (when using HTTP/1.1) means that one can 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. This is not necessarily a security issue for a command line application like the one above, but if such code were present in a web application then it becomes vulnerable to request splitting (as shown in the PoC) and thus Server Side Request Forgery. Strictly speaking this is a potential vulnerability in applications using Refit and not in Refit itself. This issue has been addressed in release versions 7.2.22 and 8.0.0 and all users are advised to upgrade. There are no known workarounds for this vulnerability.

Upgrade path

2 packages: 2 fixed.

PackageAffectedFixed inStatus
nuget Refit(NuGet) < 7.2.22; = 1.0.0; = 1.1.0; = 1.2.0 +61 more 7.2.22 Fixed
reactiveui refit < 8.0.0; = < 7.2.22 8.0.0 Fixed

Affected products

ProductAffected versionsFixed in
nuget Refit(NuGet) < 7.2.22 7.2.22
nuget Refit(NuGet) = 1.0.0 No fix listed
nuget Refit(NuGet) = 1.1.0 No fix listed
nuget Refit(NuGet) = 1.2.0 No fix listed
nuget Refit(NuGet) = 1.3.0 No fix listed
nuget Refit(NuGet) = 2.0.0 No fix listed
nuget Refit(NuGet) = 2.0.1 No fix listed
nuget Refit(NuGet) = 2.0.2 No fix listed
nuget Refit(NuGet) = 2.1.0 No fix listed
nuget Refit(NuGet) = 2.2.0 No fix listed
nuget Refit(NuGet) = 2.2.1 No fix listed
nuget Refit(NuGet) = 2.3.0 No fix listed
nuget Refit(NuGet) = 2.4.0 No fix listed
nuget Refit(NuGet) = 2.4.1 No fix listed
nuget Refit(NuGet) = 3.0.0 No fix listed
nuget Refit(NuGet) = 3.0.1 No fix listed
nuget Refit(NuGet) = 3.1.0 No fix listed
nuget Refit(NuGet) = 4.0.0 No fix listed
nuget Refit(NuGet) = 4.0.1 No fix listed
nuget Refit(NuGet) = 4.1.0 No fix listed
nuget Refit(NuGet) = 4.2.0 No fix listed
nuget Refit(NuGet) = 4.3.0 No fix listed
nuget Refit(NuGet) = 4.4.17 No fix listed
nuget Refit(NuGet) = 4.5.4 No fix listed
nuget Refit(NuGet) = 4.5.6 No fix listed
Show 42 more
ProductAffected versionsFixed in
nuget Refit(NuGet) = 4.6.107 No fix listed
nuget Refit(NuGet) = 4.6.15 No fix listed
nuget Refit(NuGet) = 4.6.16 No fix listed
nuget Refit(NuGet) = 4.6.30 No fix listed
nuget Refit(NuGet) = 4.6.48 No fix listed
nuget Refit(NuGet) = 4.6.58 No fix listed
nuget Refit(NuGet) = 4.6.85 No fix listed
nuget Refit(NuGet) = 4.6.90 No fix listed
nuget Refit(NuGet) = 4.6.99 No fix listed
nuget Refit(NuGet) = 4.7.5 No fix listed
nuget Refit(NuGet) = 4.7.51 No fix listed
nuget Refit(NuGet) = 4.7.9 No fix listed
nuget Refit(NuGet) = 4.8.14 No fix listed
nuget Refit(NuGet) = 5.0.15 No fix listed
nuget Refit(NuGet) = 5.0.23 No fix listed
nuget Refit(NuGet) = 5.1.26 No fix listed
nuget Refit(NuGet) = 5.1.27 No fix listed
nuget Refit(NuGet) = 5.1.54 No fix listed
nuget Refit(NuGet) = 5.1.67 No fix listed
nuget Refit(NuGet) = 5.2.1 No fix listed
nuget Refit(NuGet) = 5.2.4 No fix listed
nuget Refit(NuGet) = 6.0.1 No fix listed
nuget Refit(NuGet) = 6.0.15 No fix listed
nuget Refit(NuGet) = 6.0.21 No fix listed
nuget Refit(NuGet) = 6.0.24 No fix listed
nuget Refit(NuGet) = 6.0.38 No fix listed
nuget Refit(NuGet) = 6.0.8 No fix listed
nuget Refit(NuGet) = 6.0.94 No fix listed
nuget Refit(NuGet) = 6.1.15 No fix listed
nuget Refit(NuGet) = 6.2.14 No fix listed
nuget Refit(NuGet) = 6.2.16 No fix listed
nuget Refit(NuGet) = 6.3.2 No fix listed
nuget Refit(NuGet) = 6.4.1 No fix listed
nuget Refit(NuGet) = 6.5.1 No fix listed
nuget Refit(NuGet) = 7.0.0 No fix listed
nuget Refit(NuGet) = 7.1.0 No fix listed
nuget Refit(NuGet) = 7.1.1 No fix listed
nuget Refit(NuGet) = 7.1.2 No fix listed
nuget Refit(NuGet) = 7.2.0 No fix listed
nuget Refit(NuGet) = 7.2.1 No fix listed
reactiveui refit = < 7.2.22 No fix listed
reactiveui refit < 8.0.0 8.0.0

References