REDHAT-BUG-2583438: Medium severity Erlang Erlang/OTP vulnerability
Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting') vulnerability in Erlang OTP inets (httpc module) allows HTTP Request Splitting.
httpc writes request header names and values to the wire without neutralizing CR, LF or NUL characters. On the default path httprequest:mkkeyvaluestr/2, and with the headersasis option httpcrequest:httpheaders/2, build each header line by plain concatenation of the name, ": ", the value and CRLF. A CR/LF in a name or value ends the header line early. An attacker who controls data that an application puts into a header passed to httpc:request/4,5 can add or override request headers, or append a second request on the same connection.
Applications that pass only constant or validated header names and values are not affected. The request line is not affected, because uristring rejects URLs that contain raw CR/LF.
This issue affects OTP from OTP 17.0 before OTP 27.3.4.20, OTP 28.5.0.9, and OTP 29.1.3, corresponding to inets from 5.10 before 9.3.2.9, 9.6.2.5, and 9.8.2. Whether OTP before OTP 17.0, corresponding to inets before 5.10, is affected is unknown.
Affected Software
Event History
Frequently Asked Questions
Which applications are realistically exposed?
Applications are exposed when they place attacker-controlled data into header names or values supplied to httpc:request/4 or httpc:request/5. Applications that use only constant or validated header names and values are not affected.
Is the default request-building path affected?
Yes. The default http_request:mk_key_value_str/2 path constructs header lines by concatenating the name, value, and CRLF without neutralizing CR, LF, or NUL characters. The headers_as_is option path is also affected.
What does an attacker need to exploit this issue?
An attacker must be able to control data that the application inserts into an HTTP header name or value. CR or LF characters in that data can terminate a header early, allowing added or overridden headers or a second request on the same connection.
What can be done if an update cannot be applied immediately?
Ensure all header names and values passed to httpc are constant or validated, rejecting CR, LF, and NUL characters. Do not rely on URL validation for header safety; the request line is protected by uri_string rejecting raw CR/LF, but headers are handled separately.
Which releases should be checked?
The issue affects OTP 17.0 through versions before OTP 27.3.4.20, OTP 28.5.0.9, and OTP 29.1.3, corresponding to inets 5.10 through versions before 9.3.2.9, 9.6.2.5, and 9.8.2. Whether earlier OTP or inets releases are affected is unknown.