8.6high
OroPlatform vulnerable to path traversal during temporary file manipulations
- Severity
- 8.6high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.02% (higher than 64% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-9v3j-4j64-p937
Description
OroPlatform is a PHP Business Application Platform (BAP) designed to make development of custom business applications easier and faster. Path Traversal is possible in `Oro\Bundle\GaufretteBundle\FileManager::getTemporaryFileName`. With this method, an attacker can pass the path to a non-existent file, which will allow writing the content to a new file that will be available during script execution. This vulnerability has been fixed in version 5.0.9.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| oroinc platform | >= 4.1.0, <= 4.1.13, >= 4.2.0, <= 4.2.10, >= 5.0.0, < 5.0.9 | CVE List |
| oro/platform (Packagist) | from 4.1.0 up to 4.1.13, from 4.2.0 up to 4.2.10, from 5.0.0 before 5.0.8 | GitHub Advisory Database |
| oroinc oroplatform | before 5.0.9 | NVD |
All scores
| GitHub_M | 8.6high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H |
| GitHub | 8.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
What each source says
CVE List
OroPlatform is a PHP Business Application Platform (BAP) designed to make development of custom business applications easier and faster. Path Traversal is possible in `Oro\Bundle\GaufretteBundle\FileManager::getTemporaryFileName`. With this method, an attacker can pass the path to a non-existent file, which will allow writing the content to a new file that will be available during script execution. This vulnerability has been fixed in version 5.0.9.
GitHub Advisory Database
Impact
Path Traversal is possible in Oro\Bundle\GaufretteBundle\FileManager::getTemporaryFileName.
With this method, an attacker can pass the path to a non-existent file, which will allow writing the content to a new file that will be available during script execution. The file will be deleted immediately after the script ends.
Workarounds
Apply patch
--- a/vendor/oro/platform/src/Oro/Bundle/GaufretteBundle/FileManager.php
+++ b/vendor/oro/platform/src/Oro/Bundle/GaufretteBundle/FileManager.php
@@ -614,6 +614,10 @@
*/
public function getTemporaryFileName(string $suggestedFileName = null): string
{
+ if ($suggestedFileName) {
+ $suggestedFileName = basename($suggestedFileName);
+ }
+
$tmpDir = ini_get('upload_tmp_dir');
if (!$tmpDir || !is_dir($tmpDir) || !is_writable($tmpDir)) {
$tmpDir = sys_get_temp_dir();
Or decorate Oro\Bundle\GaufretteBundle\FileManager::getTemporaryFileName in your customization and clear $suggestedFileName argument
public function getTemporaryFileName(string $suggestedFileName = null): string
{
if ($suggestedFileName) {
$suggestedFileName = basename($suggestedFileName);
}
return parent::getTemporaryFileName($suggestedFileName);
}
References
NVD (es)
OroPlatform es Business Application Platform (BAP) PHP diseñada para hacer que el desarrollo de aplicaciones empresariales personalizadas sea más fácil y rápido. El Path Traversal es posible en `Oro\Bundle\GaufretteBundle\FileManager::getTemporaryFileName`. Con este método, un atacante puede pasar la ruta a un archivo inexistente, lo que permitirá escribir el contenido en un archivo nuevo que estará disponible durante la ejecución del script. Esta vulnerabilidad se ha solucionado en la versión 5.0.9.
References
| https://github.com/oroinc/platform/security/advisories/GHSA-9v3j-4j64-p937 | patch, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-41951 | advisory | |
| https://github.com/oroinc/platform | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-41951 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-9v3j-4j64-p937 changed 2024-02-16 | CC-BY-4.0 |
| NVD | CVE-2022-41951 changed 2026-06-17 | Public domain |