Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS05ZjlwLWNwM2MtNzJqZs4AA4q3

Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting') in trillium-http and trillium-client

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:

trillium-client >= 0.5.4:

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.

Permalink: https://github.com/advisories/GHSA-9f9p-cp3c-72jf
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS05ZjlwLWNwM2MtNzJqZs4AA4q3
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: 10 months ago
Updated: 10 months ago


CVSS Score: 6.8
CVSS vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N

Identifiers: GHSA-9f9p-cp3c-72jf, CVE-2024-23644
References: Repository: https://github.com/trillium-rs/trillium
Blast Radius: 11.6

Affected Packages

cargo:trillium-client
Dependent packages: 5
Dependent repositories: 5
Downloads: 52,761 total
Affected Version Ranges: < 0.5.4
Fixed in: 0.5.4
All affected versions: 0.1.0, 0.1.1, 0.2.0, 0.2.1, 0.2.2, 0.3.0, 0.3.1, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.4.7, 0.4.8, 0.4.9, 0.5.0, 0.5.1, 0.5.2, 0.5.3
All unaffected versions: 0.5.4, 0.5.5, 0.5.6, 0.6.0, 0.6.1, 0.6.2
cargo:trillium-http
Dependent packages: 13
Dependent repositories: 50
Downloads: 140,718 total
Affected Version Ranges: < 0.3.12
Fixed in: 0.3.12
All affected versions: 0.0.1, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.2.8, 0.2.9, 0.2.10, 0.2.11, 0.2.12, 0.2.13, 0.2.14, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9, 0.3.10, 0.3.11
All unaffected versions: 0.3.12, 0.3.13, 0.3.14, 0.3.15, 0.3.16, 0.3.17