{"id":"CVE-2022-41951","aliases":["GHSA-9v3j-4j64-p937"],"url":"https://o3.security/vulnerability/CVE-2022-41951","summary":"OroPlatform vulnerable to path traversal during temporary file manipulations","details":"### 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)\n\n","published":"2023-11-27T20:27:33.911Z","modified":"2026-10-28T02:30:37.863269751Z","cvss":{"score":8.5,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H"},"epss":{"score":0.00946,"percentile":0.59388,"asOf":"2026-09-16"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Packagist","name":"oro/platform","fixedVersion":null},{"ecosystem":"Packagist","name":"oro/platform","fixedVersion":null},{"ecosystem":"Packagist","name":"oro/platform","fixedVersion":"5.0.8"}],"fix":null,"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/41xxx/CVE-2022-41951.json"},{"type":"ADVISORY","url":"https://github.com/oroinc/platform/security/advisories/GHSA-9v3j-4j64-p937"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-41951"},{"type":"PACKAGE","url":"https://github.com/oroinc/platform"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-28T02:30:37.863269751Z"}}