CVE-2018-14774: Symfony/symfony Symfony Host Header Injection Vulnerability
HIGHCVE-2018-14774 is a HIGH (CVSS 7.2) symfony host header injection vulnerability (CWE-20: Improper Input Validation) affecting Symfony/symfony libraries in the Packagist ecosystem. The issue involves symfony host header injection. Remediation is available by upgrading affected packages to version 2.7.49, 2.8.44, 3.3.18, 3.4.14, 4.0.14, 4.1.3.
CVE-2018-14774 at a Glance
Security Impact
CVSS: 7.2
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:C/C:L/I:L/A:N).
How to Fix CVE-2018-14774
To remediate this vulnerability, upgrade all affected Symfony/symfony 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 symfony/symfony to 2.7.49
Upgrade symfony/symfony to 2.8.44
Upgrade symfony/symfony to 3.3.18
Upgrade symfony/symfony to 3.4.14
Upgrade symfony/symfony to 4.0.14
Upgrade symfony/symfony to 4.1.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for symfony/symfony
How to Check if You Are Affected
To determine whether your application is affected by CVE-2018-14774, inspect your project dependencies for Symfony/symfony:
inspect dependencies for symfony/symfony
Analyze the terminal output to locate any version of Symfony/symfony in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.7.49), 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Symfony/symfony, 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-2018-14774 Affected Symfony/symfony Versions
6 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
symfony/symfony
|
Packagist |
≥ 2.7.0
< 2.7.49
|
2.7.49
|
|
symfony/symfony
|
Packagist |
≥ 2.8.0
< 2.8.44
|
2.8.44
|
|
symfony/symfony
|
Packagist |
≥ 3.3.0
< 3.3.18
|
3.3.18
|
|
symfony/symfony
|
Packagist |
≥ 3.4.0
< 3.4.14
|
3.4.14
|
|
symfony/symfony
|
Packagist |
≥ 4.0.0
< 4.0.14
|
4.0.14
|
|
symfony/symfony
|
Packagist |
≥ 4.1.0
< 4.1.3
|
4.1.3
|
References
Frequently Asked Questions
What is CVE-2018-14774?
Which Symfony/symfony versions are affected?
What version fixes CVE-2018-14774?
Is symfony/symfony affected?
What is the CVSS score of CVE-2018-14774?
What CWE is associated with CVE-2018-14774?
How can I check Packagist dependencies for CVE-2018-14774?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-66p6-7p29-55p9",
"modified" : "2023-10-06T17:52:44Z",
"published" : "2022-05-14T02:20:59Z",
"aliases" : [ "CVE-2018-14774" ],
"summary" : "Symfony Host Header Injection",
"details" : "An issue was discovered in HttpKernel in Symfony 2.7.0 through 2.7.48, 2.8.0 through 2.8.43, 3.3.0 through 3.3.17, 3.4.0 through 3.4.13, 4.0.0 through 4.0.13, and 4.1.0 through 4.1.2. When using HttpCache, the values of the X-Forwarded-Host headers are implicitly set as trusted while this should be forbidden, leading to potential host header injection.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.7.0"
}, {
"fixed" : "2.7.49"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.7.48"
}
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.8.0"
}, {
"fixed" : "2.8.44"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.8.43"
}
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.3.0"
}, {
"fixed" : "3.3.18"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.3.17"
}
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.4.0"
}, {
"fixed" : "3.4.14"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.4.13"
}
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.0.14"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 4.0.13"
}
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.1.0"
}, {
"fixed" : "4.1.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 4.1.2"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-14774"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/commit/725dee4cd8b4ccd52e335ae4b4522242cea9bd4a"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/commit/7f912bbb78377c2ea331b3da28363435fbd91337"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/commit/96504fb8c9f91204727d2930eb837473ce154956"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/commit/974240e178bb01d734bf1df1ad5c3beba6a2f982"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/commit/9cfcaba0bf71f87683510b5f47ebaac5f5d6a5ba"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/commit/bcf5897bb1a99d4acae8bf7b73e81bfdeaac0922"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/symfony/symfony"
}, {
"type" : "WEB",
"url" : "https://symfony.com/blog/cve-2018-14774-possible-host-header-injection-when-using-httpcache"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-07-25T19:14:01Z",
"nvd_published_at" : "2018-08-03T17:29:00Z"
}
}