CVE-2024-23644
JSON

6.8medium

trillium-http and trillium-client vulnerable to HTTP Request/Response Splitting

Severity
6.8medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.95% (higher than 60% of CVEs)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-9f9p-cp3c-72jfRUSTSEC-2024-0008RUSTSEC-2024-0009

Description

Trillium is a composable toolkit for building internet applications with async rust. In `trillium-http` prior to 0.3.12 and `trillium-client` prior to 0.5.4, insufficient validation of outbound header values may lead to request splitting or response splitting attacks in scenarios where attackers have sufficient control over headers. This only affects use cases where attackers have control of request headers, and can insert "\r\n" sequences. Specifically, if untrusted and unvalidated input is inserted into header names or values. Outbound `trillium_http::HeaderValue` and `trillium_http::HeaderName` can be constructed infallibly and were not checked for illegal bytes when sending requests from the client or responses from the server. Thus, if an attacker has sufficient control over header values (or names) in a request or response that they could inject `\r\n` sequences, they could get the client and server out of sync, and then pivot to gain control over other parts of requests or responses. (i.e. exfiltrating data from other requests, SSRF, etc.) In `trillium-http` versions 0.3.12 and later, if a header name is invalid in server response headers, the specific header and any associated values are omitted from network transmission. Additionally, if a header value is invalid in server response headers, the individual header value is omitted from network transmission. Other headers values with the same header name will still be sent. In `trillium-client` versions 0.5.4 and later, if any header name or header value is invalid in the client request headers, awaiting the client Conn returns an `Error::MalformedHeader` prior to any network access. As a workaround, Trillium services and client applications should sanitize or validate untrusted input that is included in header values and header names. Carriage return, newline, and null characters are not allowed.

Affected

Product or packageVersionsReported by
trillium-rs trillium< 0.5.4, < 0.3.12CVE List
trillium-http (crates.io)before 0.3.12, from 0.0.0-0 before 0.3.12GitHub Advisory Database, RustSec Advisory Database
trillium-client (crates.io)before 0.5.4, from 0.0.0-0 before 0.5.4GitHub Advisory Database, RustSec Advisory Database
trillium trilliumbefore 0.5.4NVD
trillium trillium-httpbefore 0.3.12NVD

All scores

GitHub_M6.8medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
GitHub6.8medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
NVD8.1high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-113CWE-436

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

Trillium is a composable toolkit for building internet applications with async rust. In `trillium-http` prior to 0.3.12 and `trillium-client` prior to 0.5.4, insufficient validation of outbound header values may lead to request splitting or response splitting attacks in scenarios where attackers have sufficient control over headers. This only affects use cases where attackers have control of request headers, and can insert "\r\n" sequences. Specifically, if untrusted and unvalidated input is inserted into header names or values. Outbound `trillium_http::HeaderValue` and `trillium_http::HeaderName` can be constructed infallibly and were not checked for illegal bytes when sending requests from the client or responses from the server. Thus, if an attacker has sufficient control over header values (or names) in a request or response that they could inject `\r\n` sequences, they could get the client and server out of sync, and then pivot to gain control over other parts of requests or responses. (i.e. exfiltrating data from other requests, SSRF, etc.) In `trillium-http` versions 0.3.12 and later, if a header name is invalid in server response headers, the specific header and any associated values are omitted from network transmission. Additionally, if a header value is invalid in server response headers, the individual header value is omitted from network transmission. Other headers values with the same header name will still be sent. In `trillium-client` versions 0.5.4 and later, if any header name or header value is invalid in the client request headers, awaiting the client Conn returns an `Error::MalformedHeader` prior to any network access. As a workaround, Trillium services and client applications should sanitize or validate untrusted input that is included in header values and header names. Carriage return, newline, and null characters are not allowed.

GitHub Advisory Database
Summary

Insufficient validation of outbound header values may lead to request splitting or response splitting attacks in scenarios where attackers have sufficient control over outbound headers.

Details

Outbound trillium_http::HeaderValue and trillium_http::HeaderName can be constructed infallibly and were not checked for illegal bytes when sending requests from the client or responses from the server. Thus, if an attacker has sufficient control over header values (or names) in a request or response that they could inject \r\n sequences, they could get the client and server out of sync, and then pivot to gain control over other parts of requests or responses. (i.e. exfiltrating data from other requests, SSRF, etc.)

Patches
trillium-http >= 0.3.12:
  • If a header name is invalid in server response headers, the specific header and any associated values are omitted from network transmission.
  • If a header value is invalid in server response headers, the individual header value is omitted from network transmission. Other headers values with the same header name will still be sent.
trillium-client >= 0.5.4:
  • If any header name or header value is invalid in the client request headers, awaiting the client Conn returns an Error::MalformedHeader prior to any network access.
Workarounds

trillium services and client applications should sanitize or validate untrusted input that is included in header values and header names. Carriage return, newline, and null characters are not allowed.

Impact

This only affects use cases where attackers have control of outbound headers, and can insert "\r\n" sequences. Specifically, if untrusted and unvalidated input is inserted into header names or values.

A note on timing from @jbr on behalf of trillium-rs

@divergentdave filed this vulnerability many months ago but I did not see it until the evening of Jan 23, 2024. Patches were issued less than 24h after reading the vulnerability. The security policy has been updated to avoid delays like this in the future.

RustSec Advisory Database
Summary

Insufficient validation of outbound header values may lead to request splitting or response splitting attacks in scenarios where attackers have sufficient control over outbound headers.

Details

Outbound trillium_http::HeaderValue and trillium_http::HeaderName can be constructed infallibly and were not checked for illegal bytes when sending requests. Thus, if an attacker has sufficient control over header values (or names) in a request that they could inject \r\n sequences, they could get the client and server out of sync, and then pivot to gain control over other parts of requests or responses. (i.e. exfiltrating data from other requests, SSRF, etc.)

Patches
trillium-client >= 0.5.4:
  • If any header name or header value is invalid in the client request headers, awaiting the client Conn returns an Error::MalformedHeader prior to any network access.
Workarounds

trillium client applications should sanitize or validate untrusted input that is included in header values and header names. Carriage return, newline, and null characters are not allowed.

Impact

This only affects use cases where attackers have control of outbound headers, and can insert "\r\n" sequences. Specifically, if untrusted and unvalidated input is inserted into header names or values.

Credit

Discovered and reported by @divergentdave

RustSec Advisory Database
Summary

Insufficient validation of outbound header values may lead to request splitting or response splitting attacks in scenarios where attackers have sufficient control over outbound headers.

Details

Outbound trillium_http::HeaderValue and trillium_http::HeaderName can be constructed infallibly and were not checked for illegal bytes when sending responses from the server. Thus, if an attacker has sufficient control over header values (or names) in an outbound response that they could inject \r\n sequences, they could get the client and server out of sync, and then pivot to gain control over other parts of requests or responses. (i.e. exfiltrating data from other requests, SSRF, etc.)

Patches
trillium-http >= 0.3.12:
  • If a header name is invalid in server response headers, the specific header and any associated values are omitted from network transmission.
  • If a header value is invalid in server response headers, the individual header value is omitted from network transmission. Other headers values with the same header name will still be sent.
Workarounds

trillium services should sanitize or validate untrusted input that is included in header values and header names. Carriage return, newline, and null characters are not allowed.

Impact

This only affects use cases where attackers have control of outbound headers, and can insert "\r\n" sequences. Specifically, if untrusted and unvalidated input is inserted into header names or values.

Credit

Discovered and reported by @divergentdave

NVD (es)

Trillium es un conjunto de herramientas componibles para crear aplicaciones de Internet con óxido asíncrono. En `trillium-http` anterior a 0.3.12 y `trillium-client` anterior a 0.5.4, la validación insuficiente de los valores de encabezado salientes puede llevar a ataques de división de solicitudes o de división de respuestas en escenarios donde los atacantes tienen suficiente control sobre los encabezados. Esto solo afecta a los casos de uso en los que los atacantes tienen control de los encabezados de las solicitudes y pueden insertar secuencias "\r\n". Específicamente, si se inserta entrada que no es de confianza y no validada en nombres o valores de encabezado. Los `trillium_http::HeaderValue` y `trillium_http::HeaderName` salientes se pueden construir de manera infalible y no se verificaron en busca de bytes ilegales al enviar solicitudes del cliente o respuestas del servidor. Por lo tanto, si un atacante tiene suficiente control sobre los valores de encabezado (o nombres) en una solicitud o respuesta como para poder inyectar secuencias `\r\n`, podría desincronizar el cliente y el servidor y luego girar para obtener control sobre otras partes de solicitudes o respuestas. (es decir, filtrar datos de otras solicitudes, SSRF, etc.) En las versiones 0.3.12 y posteriores de `trillium-http`, si un nombre de encabezado no es válido en los encabezados de respuesta del servidor, el encabezado específico y cualquier valor asociado se omiten de la transmisión de red. Además, si un valor de encabezado no es válido en los encabezados de respuesta del servidor, el valor del encabezado individual se omite de la transmisión de la red. Se seguirán enviando otros valores de encabezado con el mismo nombre de encabezado. En las versiones 0.5.4 y posteriores de `trillium-client`, si algún nombre o valor de encabezado no es válido en los encabezados de solicitud del cliente, en espera, el cliente Conn devuelve un `Error::MalformedHeader` antes de cualquier acceso a la red. Como workaround, los servicios de Trillium y las aplicaciones cliente deben desinfectar o validar las entradas que no son de confianza incluidas en los valores y nombres de los encabezados. No se permiten caracteres de carriage return, nueva línea, ni nulos.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-23644 changed 2025-05-30CVE Terms of Use
GitHub Advisory DatabaseGHSA-9f9p-cp3c-72jf changed 2026-09-10CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2024-0008 changed 2026-10-12CC0-1.0
RustSec Advisory DatabaseRUSTSEC-2024-0009 changed 2026-10-12CC0-1.0
NVDCVE-2024-23644 changed 2026-06-17Public domain