CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request Header Injection')
Micronaut's HTTP client did not validate request header values, allowing an attacker to inject CRLF sequences and manipulate the request headers and body. This could force the client to make multiple attacker-controlled HTTP requests, enabling a variant of server-side request forgery.
github.com
Published on github.com
graemerocher published GHSA-694p-xrhg-x3wm Mar 30, 2020 · 1 comment
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The HTTP client library failed to validate header values, allowing CRLF sequences to be injected and interpreted as separate requests.
Impact
An attacker could control the entire HTTP body of custom requests, enabling a variant of server-side request forgery.
What the attacker needed
Application passes user input as header value; attacker can control that input
The fix
The issue was fixed in micronaut-http-client versions 1.2.11 and 1.3.2 and above by adding validation of header values.
How it was found
- The attacker supplies a crafted header value containing CRLF sequences and additional HTTP requests.
- The application passes this value as a header to the Micronaut HTTP client.
- The client sends the request without validation, causing the injected requests to be sent to the target server.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When a web application sends a request to another server, it includes headers (like labels on an envelope) that tell the server what to do. If the application puts user input directly into a header without checking it, an attacker can sneak in special characters that make the application send extra, unintended requests. This is dangerous because the attacker can control what those extra requests do, potentially accessing internal systems.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.