CVE-2024-51501
C# vulnerability analysis and mitigation

Overview

Refit, an automatic type-safe REST library for .NET Core, Xamarin and .NET, contains a vulnerability in its header-related attributes (Header, HeaderCollection and Authorize) that are susceptible to CRLF injection. The vulnerability exists in all versions prior to 7.2.22 and 8.0.0, where HTTP headers are added to requests using the HttpHeaders.TryAddWithoutValidation method without proper CRLF character validation (GitHub Advisory).

Technical details

The vulnerability stems from the way HTTP headers are added to requests using the HttpHeaders.TryAddWithoutValidation method, which does not validate CRLF characters in header values. When using HTTP/1.1, this CRLF injection vulnerability allows attackers to inject additional HTTP headers or smuggle entire HTTP requests. The issue has been assigned CVE-2024-51501 with a CVSS v4.0 score of 10.0 CRITICAL (CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H) (NVD).

Impact

If an application using the Refit library passes user-controllable values through to headers, it becomes vulnerable to CRLF injection. While this may not be a critical security issue for command-line applications, web applications using affected versions become vulnerable to request splitting and Server Side Request Forgery (SSRF). The vulnerability allows attackers to potentially inject additional headers or smuggle complete HTTP requests (GitHub Advisory).

Mitigation and workarounds

Users are advised to upgrade to Refit version 7.2.22 or 8.0.0 or later, which contain fixes for this vulnerability. There are no known workarounds for this vulnerability other than upgrading to a patched version (NVD).

Additional resources


SourceThis report was generated using AI

Related C# vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-64113CRITICAL9.3
  • C#C#
  • MediaBrowser.Server.Core
NoYesDec 09, 2025
CVE-2025-66628HIGH7.5
  • C#C#
  • seal-ImageMagick
NoYesDec 10, 2025
CVE-2025-66631HIGH7.2
  • C#C#
  • Csla
NoYesDec 09, 2025
CVE-2025-66625MEDIUM4.9
  • C#C#
  • Umbraco.Cms
NoYesDec 09, 2025
CVE-2025-65955MEDIUM4.9
  • C#C#
  • Magick.NET-Q16-AnyCPU
NoYesDec 02, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management