CVE-2017-18587: Hyper Headers Containing Newline Characters Can Vulnerability
MODERATECVE-2017-18587 is a MODERATE (CVSS 5.3) headers containing newline characters can vulnerability (CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')) affecting Hyper libraries in the crates.io ecosystem. The issue involves headers containing newline characters can split messages in hyper. Remediation is available by upgrading affected packages to version 0.10.2, 0.9.18.
CVE-2017-18587 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).
How to Fix CVE-2017-18587
To remediate this vulnerability, upgrade all affected Hyper dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade hyper to 0.10.2
Upgrade hyper to 0.9.18
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for hyper
How to Check if You Are Affected
To determine whether your application is affected by CVE-2017-18587, inspect your project dependencies for Hyper:
inspect dependencies for hyper
Analyze the terminal output to locate any version of Hyper in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.10.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection'), where the product uses crlf (carriage return line feeds) as a special element, e.g. to separate lines or records, but it does not neutralize or incorrectly neutralizes crlf sequences from inputs. In Hyper, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2017-18587 Affected Hyper Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
hyper
|
crates.io |
≥ 0.10.0
< 0.10.2
|
0.10.2
|
|
hyper
|
crates.io |
< 0.9.18
|
0.9.18
|
References
Frequently Asked Questions
What is CVE-2017-18587?
Which Hyper versions are affected?
What version fixes CVE-2017-18587?
Is hyper affected?
What is the CVSS score of CVE-2017-18587?
What CWE is associated with CVE-2017-18587?
How can I check crates.io dependencies for CVE-2017-18587?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-q89x-f52w-6hj2",
"modified" : "2023-06-13T17:39:45Z",
"published" : "2021-08-25T20:43:04Z",
"aliases" : [ "CVE-2017-18587" ],
"summary" : "Headers containing newline characters can split messages in hyper",
"details" : "Serializing of headers to the socket did not filter the values for newline bytes (\\r or \\n), which allowed for header values to split a request or response. People would not likely include newlines in the headers in their own applications, so the way for most people to exploit this is if an application constructs headers based on unsanitized user input.\n\nThis issue was fixed by replacing all newline characters with a space during serialization of a header value.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "hyper"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.10.0"
}, {
"fixed" : "0.10.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "hyper"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.9.18"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-18587"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/hyperium/hyper"
}, {
"type" : "WEB",
"url" : "https://github.com/hyperium/hyper/wiki/Security-001"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2017-0002.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-93" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-08-19T21:25:19Z",
"nvd_published_at" : "2019-08-26T13:15:00Z"
}
}