--- magento2-2.4.6-p8/Download.php
+++ magento2-2.4.6-p9/Download.php
@@ -81,13 +81,11 @@
return $resultRedirect;
}
- // phpcs:ignore Magento2.Functions.DiscouragedFunction
- $fileName = basename($fileName);
-
- $exportDirectory = $this->filesystem->getDirectoryRead(...);
+ $exportDirectory = $this->filesystem->getDirectoryWrite(...);
try {
- $fileExist = $exportDirectory->isExist('export/' . $fileName);
+ $fileName = $exportDirectory->getDriver()->getRealPathSafety(...);
+ $fileExist = $exportDirectory->isExist('export' . $fileName);
} catch (Throwable $e) {
$fileExist = false;
}
Identified CVE-2025-24406: Adobe Commerce versions 2.4.8-beta1, 2.4.7-p3, 2.4.6-p8, 2.4.5-p10, 2.4.4-p11 and earlier are affected by an Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability that could lead to a security feature bypass. An unauthenticated attacker could exploit this vulnerability to modify files that are stored outside the restricted directory. Exploitation of this issue does not require user interaction.
Folder Analysis
Comparing versions: Magento 2.4.6-p8 → 2.4.6-p9
Analyzes security patches between local directory versions