CVE-2018-19789: Symfony/symfony Symfony Path Disclosure Vulnerability
MODERATECVE-2018-19789 is a MODERATE (CVSS 5.3) symfony path disclosure vulnerability (CWE-434: Unrestricted Upload of File with Dangerous Type) affecting Symfony/symfony libraries in the Packagist ecosystem. The issue involves symfony path disclosure. Remediation is available by upgrading affected packages to version 2.7.50, 2.8.49, 3.4.20, 4.0.15, 4.1.9, 4.2.1.
CVE-2018-19789 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:L/I:N/A:N).
How to Fix CVE-2018-19789
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.50
Upgrade symfony/symfony to 2.8.49
Upgrade symfony/symfony to 3.4.20
Upgrade symfony/symfony to 4.0.15
Upgrade symfony/symfony to 4.1.9
Upgrade symfony/symfony to 4.2.1
Upgrade symfony/form to 2.7.50
Upgrade symfony/form to 2.8.49
Upgrade symfony/form to 3.4.20
Upgrade symfony/form to 4.0.15
Upgrade symfony/form to 4.1.9
Upgrade symfony/form to 4.2.1
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-19789, 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.50), 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-434: Unrestricted Upload of File with Dangerous Type, where the product allows the upload or transfer of dangerous file types that are automatically processed within its environment. 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-19789 Affected Symfony/symfony Versions
12 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
symfony/symfony
|
Packagist |
≥ 2.7.0
< 2.7.50
|
2.7.50
|
|
symfony/symfony
|
Packagist |
≥ 2.8.0
< 2.8.49
|
2.8.49
|
|
symfony/symfony
|
Packagist |
≥ 3.0.0
< 3.4.20
|
3.4.20
|
|
symfony/symfony
|
Packagist |
≥ 4.0.0
< 4.0.15
|
4.0.15
|
|
symfony/symfony
|
Packagist |
≥ 4.1.0
< 4.1.9
|
4.1.9
|
|
symfony/symfony
|
Packagist |
≥ 4.2.0
< 4.2.1
|
4.2.1
|
|
symfony/form
|
Packagist |
≥ 2.7.0
< 2.7.50
|
2.7.50
|
|
symfony/form
|
Packagist |
≥ 2.8.0
< 2.8.49
|
2.8.49
|
|
symfony/form
|
Packagist |
≥ 3.0.0
< 3.4.20
|
3.4.20
|
|
symfony/form
|
Packagist |
≥ 4.0.0
< 4.0.15
|
4.0.15
|
|
symfony/form
|
Packagist |
≥ 4.1.0
< 4.1.9
|
4.1.9
|
|
symfony/form
|
Packagist |
≥ 4.2.0
< 4.2.1
|
4.2.1
|
References
Frequently Asked Questions
What is CVE-2018-19789?
Which Symfony/symfony versions are affected?
What version fixes CVE-2018-19789?
Is symfony/symfony affected?
Is symfony/form affected?
What is the CVSS score of CVE-2018-19789?
What CWE is associated with CVE-2018-19789?
How can I check Packagist dependencies for CVE-2018-19789?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x3cf-w64x-4cp2",
"modified" : "2023-10-06T17:56:17Z",
"published" : "2022-05-14T01:04:20Z",
"aliases" : [ "CVE-2018-19789" ],
"summary" : "Symfony Path Disclosure",
"details" : "An issue was discovered in Symfony 2.7.x before 2.7.50, 2.8.x before 2.8.49, 3.x before 3.4.20, 4.0.x before 4.0.15, 4.1.x before 4.1.9, and 4.2.x before 4.2.1. When using the scalar type hint `string` in a setter method (e.g. `setName(string $name)`) of a class that's the `data_class` of a form, and when a file upload is submitted to the corresponding field instead of a normal text input, then `UploadedFile::__toString()` is called which will then return and disclose the path of the uploaded file. If combined with a local file inclusion issue in certain circumstances this could escalate it to a Remote Code Execution.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.7.0"
}, {
"fixed" : "2.7.50"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.8.0"
}, {
"fixed" : "2.8.49"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.4.20"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.0.15"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.1.0"
}, {
"fixed" : "4.1.9"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.2.0"
}, {
"fixed" : "4.2.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/form"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.7.0"
}, {
"fixed" : "2.7.50"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/form"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.8.0"
}, {
"fixed" : "2.8.49"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/form"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.4.20"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/form"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.0.15"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/form"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.1.0"
}, {
"fixed" : "4.1.9"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/form"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.2.0"
}, {
"fixed" : "4.2.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-19789"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/commit/b65e6f1a47b68f2713b60cdac9cc3a4af62a2d1c"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/form/CVE-2018-19789.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2018-19789.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/symfony/symfony"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2019/03/msg00009.html"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4TD3E7FZIXLVFG3SMFJPDEKPZ26TJOW7"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/JZMRJ7VTHCY5AZK24G4QGX36RLUDTDKE"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OA4WVFN5FYPIXAPLWZI6N425JHHDSWAZ"
}, {
"type" : "WEB",
"url" : "https://seclists.org/bugtraq/2019/May/21"
}, {
"type" : "WEB",
"url" : "https://symfony.com/blog/cve-2018-19789-disclosure-of-uploaded-files-full-path"
}, {
"type" : "WEB",
"url" : "https://symfony.com/cve-2018-19789"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20210124224817/http://www.securityfocus.com/bid/106249"
}, {
"type" : "WEB",
"url" : "https://www.debian.org/security/2019/dsa-4441"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-434" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-07-24T19:38:49Z",
"nvd_published_at" : "2018-12-18T22:29:00Z"
}
}