High

OroPlatform vulnerable to path traversal during temporary file manipulations

  • Disclosed: 27.11.2023
  • Updated: 11.10.2026 10:22

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

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

php
    public function getTemporaryFileName(string $suggestedFileName = null): string
    {
        if ($suggestedFileName) {
            $suggestedFileName = basename($suggestedFileName);
        }

        return parent::getTemporaryFileName($suggestedFileName);
    }

References

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Composer package oro/platform >= 4.1.0, <= 4.1.13, >= 4.2.0, <= 4.2.10, >= 5.0.0, < 5.0.8 5.0.8

References

CVSS score 8.5/10
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
Weakness (CWE)
CWE-22
Platform
Composer
Package
oro/platform
Disclosed
27.11.2023
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-9v3j-4j64-p937 - CC BY 4.0

Vulnerability history: oro/platform

All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
6
First → latest
01.2022 05.2024
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 1
  • Medium 5

Disclosures per year

  1. 2022: 3
  2. 2023: 1
  3. 2024: 2
  4. 2025: 0
  5. 2026: 0
  1. Medium · 6.1 ghsa-3vhm-q4w3-rw8q >= 1.7.0, < 1.7.4 1.7.4
  2. Medium · 4.3 CVE-2023-45824 >= 5.1.0, < 5.1.4, >= 5.0.0, <= 5.0.12, >= 4.2.0, <= 4.2.10 5.1.4
  3. OroPlatform vulnerable to path traversal during temporary file manipulations this entry
    High · 8.5 CVE-2022-41951 >= 4.1.0, <= 4.1.13, >= 4.2.0, <= 4.2.10, >= 5.0.0, < 5.0.8 5.0.8
  4. Medium · 6.9 ghsa-rrgw-3hg3-9x8c >= 3.1.0, < 3.1.29, >= 4.1.0, < 4.1.17, >= 4.2.0, < 4.2.8 3.1.29, 4.1.17, 4.2.8
  5. Medium · 6.9 CVE-2021-41236 >= 3.1.0, < 3.1.21, >= 4.1.0, < 4.1.14, >= 4.2.0, < 4.2.8 3.1.21, 4.1.14, 4.2.8
  6. Medium · 5.3 CVE-2021-43852 >= 4.1.0, < 4.1.14, >= 4.2.0, < 4.2.8 4.1.14, 4.2.8

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.