CVE-2026-3634: Libsoup: libsoup: http header injection and response splitting via crlf injection in content-type header
A flaw was found in libsoup. An attacker controlling the value used to set the Content-Type header can inject a Carriage Return Line Feed (CRLF) sequence due to improper input sanitization in the soupmessageheaderssetcontenttype() function. This vulnerability allows for the injection of arbitrary header-value pairs, potentially leading to HTTP header injection and response splitting attacks.
Other sources
The soupmessageheaderssetcontenttype() function sets the Content-Type header value. Internally, it calls soupmessageheadersappendcommon() to add the new Content-Type value to an accumulating array. Unlike soupmessageheadersappend(), the internal soupmessageheadersappendcommon() function does not enforce any restrictions on the allowed characters in the header value, allowing the creation of a header whose value contains a CRLF sequence. Later, when the HTTP request or response is constructed, the header strings are interpreted without further sanitization, resulting in the effective injection of a CRLF sequence, and hence, arbitrary header-value pairs. A proof of concept script that showcases the issue can be found in the attachment. CRLFinjinsoupmessageheaderssetcontenttype.c Running this code confirms that the server on localhost:5000 receives a valid HTTP request containing the injected X-Injected-By header with the value injection.
Impact An attacker controlling the value used to set the Content-Type header is able to perform a CRLF injection, potentially leading to header injection and response splitting.
Recommended solution Instead of directly using the soupmessageheadersappendcommon() function, use the soupmessageheadersappend() function in soupmessageheaderssetcontenttype().
— Red Hat
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-3634?
CVE-2026-3634 is considered a high-severity vulnerability due to its potential for HTTP header injection and response splitting.
How do I fix CVE-2026-3634?
To fix CVE-2026-3634, ensure you're using the latest version of libsoup that addresses this vulnerability.
What versions of libsoup are affected by CVE-2026-3634?
CVE-2026-3634 affects various versions of libsoup across different operating systems, including multiple versions of Red Hat Enterprise Linux.
What are the potential impacts of CVE-2026-3634?
Exploitation of CVE-2026-3634 can lead to HTTP response splitting, which may allow attackers to perform cross-site scripting (XSS) or cache poisoning attacks.
How does CVE-2026-3634 allow CRLF injection?
CVE-2026-3634 allows CRLF injection due to improper input sanitization of the Content-Type header, enabling attackers to inject line breaks.