{"id":"CVE-2022-41951","aliases":["CVE-2022-41951","GHSA-9v3j-4j64-p937"],"related":[],"kind":"vulnerability","state":"published","title":"OroPlatform vulnerable to path traversal during temporary file manipulations","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\nPath Traversal is possible in `Oro\\Bundle\\GaufretteBundle\\FileManager::getTemporaryFileName`. \nWith 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. \n\n### Workarounds\nApply patch\n```patch\n--- a/vendor/oro/platform/src/Oro/Bundle/GaufretteBundle/FileManager.php\n+++ b/vendor/oro/platform/src/Oro/Bundle/GaufretteBundle/FileManager.php\n@@ -614,6 +614,10 @@\n      */\n     public function getTemporaryFileName(string $suggestedFileName = null): string\n     {\n+        if ($suggestedFileName) {\n+            $suggestedFileName = basename($suggestedFileName);\n+        }\n+\n         $tmpDir = ini_get('upload_tmp_dir');\n         if (!$tmpDir || !is_dir($tmpDir) || !is_writable($tmpDir)) {\n             $tmpDir = sys_get_temp_dir();\n\n```\n\nOr decorate `Oro\\Bundle\\GaufretteBundle\\FileManager::getTemporaryFileName` in your customization and clear `$suggestedFileName` argument\n\n```php\n    public function getTemporaryFileName(string $suggestedFileName = null): string\n    {\n        if ($suggestedFileName) {\n            $suggestedFileName = basename($suggestedFileName);\n        }\n\n        return parent::getTemporaryFileName($suggestedFileName);\n    }\n```\n\n### References\n - [Path Traversal](https://owasp.org/www-community/attacks/Path_Traversal)\n - [How to Decorate Services](https://symfony.com/doc/5.4/service_container/service_decoration.html)","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2023-11-27T20:27:33.911Z","modified":"2026-06-17T05:04:07.463Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","score":8.6,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","score":8.6,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","score":8.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":">= 4.1.0, <= 4.1.13","status":"affected"},{"version":">= 4.2.0, <= 4.2.10","status":"affected"},{"version":" >= 5.0.0, < 5.0.9","status":"affected"}],"vendor":"oroinc","product":"platform","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"4.1.0","status":"affected","lastAffected":"4.1.13"}],"ecosystem":"Packagist","package":"oro/platform","purl":"pkg:composer/oro/platform","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"4.2.0","status":"affected","lastAffected":"4.2.10"}],"ecosystem":"Packagist","package":"oro/platform","purl":"pkg:composer/oro/platform","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"5.0.0","status":"affected","fixed":"5.0.8"}],"ecosystem":"Packagist","package":"oro/platform","purl":"pkg:composer/oro/platform","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"5.0.9"}],"vendor":"oroinc","product":"oroplatform","cpe":"cpe:2.3:a:oroinc:oroplatform:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/oroinc/platform/security/advisories/GHSA-9v3j-4j64-p937","tags":["patch","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-41951","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/oroinc/platform","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-41951","url":"https://www.cve.org/CVERecord?id=CVE-2022-41951","licence":"CVE Terms of Use","modified":"2024-08-03T12:56:38.599Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-9v3j-4j64-p937","url":"https://github.com/advisories/GHSA-9v3j-4j64-p937","licence":"CC-BY-4.0","modified":"2024-02-16T08:15:01.929Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-41951","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-41951","licence":"Public domain","modified":"2026-06-17T05:04:07.463Z"}],"updatedAt":"2026-11-25T22:58:19.687Z","epss":{"score":0.01017,"percentile":0.64283,"date":"2026-12-01T12:00:22.000Z"}}