GHSA-fg5q-r2q5-qmh3 CVE-2016-3166
Drupal CRLF injection vulnerability in the drupal_set_header function
- Severity
- 5.9 / 10
- Medium · CVSS 3.0
- Exploit chance (EPSS)
- 1.18%
- Chance of exploitation in the next 30 days. Higher than 67.68% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-113 Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')
- Fix
- Available
- 2 packages have a fixed version
Description
CRLF injection vulnerability in the drupal_set_header function in Drupal 6.x before 6.38, when used with PHP before 5.1.2, allows remote attackers to inject arbitrary HTTP headers and conduct HTTP response splitting attacks by leveraging a module that allows user-submitted data to appear in HTTP headers.
Affected versions
Packagist
| Package | Vulnerable | Fixed in |
|---|---|---|
| drupal/core | >= 6.0, < 6.38 |
6.38 |
| drupal/drupal | >= 6.0, < 6.38 |
6.38 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
drupal/core Packagist → 6.38
- composer
composer require drupal/core:^6.38
drupal/drupal Packagist → 6.38
- composer
composer require drupal/drupal:^6.38
Severity breakdown
CVSS 3.0 5.9
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- High
- Availability
- None
Weakness
CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')
The product receives data from an HTTP agent/component (e.g., web server, proxy, browser, etc.), but it does not neutralize or incorrectly neutralizes CR and LF characters before the data is included in outgoing HTTP headers.
How to prevent it
- Implementation: Construct HTTP headers very carefully, avoiding the use of non-validated input data.
- Implementation: Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. If an input does not strictly conform to specifications, reject it or transform it into something that conforms. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
- Implementation: Use and specify an output encoding that can be handled by the downstream component that is reading the output. Common encodings include ISO-8859-1, UTF-7, and UTF-8. When an encoding is not specified, a downstream component may choose a different encoding, either by assuming a default encoding or automatically inferring which encoding is being used, which can be erroneous. When the encodings are inconsistent, the downstream component might treat some character or byte sequences as special, even if they are not special in the original encoding. Attackers might then be able to exploit this discrepancy and conduct injection attacks; they even might be able to bypass protection mechanisms that assume the original encoding is also being used by the downstream component.
- Implementation: Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.
References
Advisories
Packages
Other links
- github.com/FriendsOfPHP/security-advisories/blob/master/drupal/core/CVE-2016-31…
- github.com/FriendsOfPHP/security-advisories/blob/master/drupal/drupal/CVE-2016-…
- drupal.org/SA-CORE-2016-001
- debian.org/security/2016/dsa-3498
- openwall.com/lists/oss-security/2016/02/24/19
- openwall.com/lists/oss-security/2016/03/15/10
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| DRUPAL-CORE-2026-004 Drupal Core has a SQL Injection issue | Critical Known exploited | Also affects drupal/core |
| CVE-2020-28949 Multiple vulnerabilities through filename manipulation in Archive_Tar | High Known exploited | Also affects drupal/core |
| CVE-2020-13671 Drupal core Unrestricted Upload of File with Dangerous Type | High Known exploited | Also affects drupal/core |
| CVE-2019-6340 Drupal Core Remote Code Execution Vulnerability | High Known exploited | Also affects drupal/core |
| CVE-2018-7602 Drupal Core Remote Code Execution Vulnerability | Critical Known exploited | Also affects drupal/core |
| CVE-2018-7600 Drupal Core Remote Code Execution Vulnerability | Critical Known exploited | Also affects drupal/core |
| DRUPAL-CORE-2026-016 The Navigation module doesn't sufficiently sanitize certain attributes, which can lead to a cross-site scripting (XSS) vulnerability. | Not rated yet | Also affects drupal/core |
| DRUPAL-CORE-2026-015 The Drupal core Link module provides a field type that can be used for internal and external URLs. | Not rated yet | Also affects drupal/core |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor