CVE-2024-51501

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.
CVSS

No CVSS.

Configurations

No configuration.

History

08 Nov 2024, 16:15

Type Values Removed Values Added
Summary (en) 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 version 8.0.0 and all users are advised to upgrade. There are no known workarounds for this vulnerability. (en) 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.

05 Nov 2024, 16:04

Type Values Removed Values Added
Summary
  • (es) Refit es una librería REST automática y segura de tipos para .NET Core, Xamarin y .NET Los diversos atributos Refit relacionados con los encabezados (Header, HeaderCollection y Authorize) son vulnerables a la inyección CRLF. La forma en que se agregan los encabezados HTTP a una solicitud es a través del método `HttpHeaders.TryAddWithoutValidation`. Este método no verifica los caracteres CRLF en el valor del encabezado. Esto significa que cualquier encabezado agregado a una solicitud de refit es vulnerable a la inyección CRLF. En general, la inyección CRLF en un encabezado HTTP (cuando se usa HTTP/1.1) significa que uno puede inyectar encabezados HTTP adicionales o contrabandear solicitudes HTTP completas. Si una aplicación que usa la librería Refit pasa un valor controlable por el usuario a un encabezado, entonces esa aplicación se vuelve vulnerable a la inyección CRLF. Esto no es necesariamente un problema de seguridad para una aplicación de línea de comandos como la que se muestra arriba, pero si dicho código estuviera presente en una aplicación web, se volvería vulnerable a la división de solicitudes (como se muestra en la PoC) y, por lo tanto, a la Server Side Request Forgery. Estrictamente hablando, esta es una vulnerabilidad potencial en aplicaciones que usan Refit y no en Refit en sí. Este problema se ha solucionado en la versión 8.0.0 y se recomienda a todos los usuarios que actualicen. No existen workarounds conocidas para esta vulnerabilidad.

04 Nov 2024, 23:15

Type Values Removed Values Added
New CVE

Information

Published : 2024-11-04 23:15

Updated : 2024-11-08 16:15


NVD link : CVE-2024-51501

Mitre link : CVE-2024-51501

CVE.ORG link : CVE-2024-51501


JSON object : View

Products Affected

No product.

CWE
CWE-93

Improper Neutralization of CRLF Sequences ('CRLF Injection')