Pimcore Admin Classic Bundle SQL Injection in Admin download files as zip
Description
Pimcore's Admin Classic Bundle provides a backend user interface for Pimcore. The application allows users to create zip files from available files on the site. In the 1.x branch prior to version 1.3.2, parameter selectedIds is susceptible to SQL Injection. Any backend user with very basic permissions can execute arbitrary SQL statements and thus alter any data or escalate their privileges to at least admin level. Version 1.3.2 contains a fix for this issue.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
pimcore/admin-ui-classic-bundlePackagist | >= 1.0.0, < 1.3.2 | 1.3.2 |
Affected products
1- Range: >= 1.0.0, < 1.3.2
Patches
1363afef29496fix: add quote for ids processed in downloadAsZipAddFilesAction method (#405)
1 file changed · +15 −9
src/Controller/Admin/Asset/AssetController.php+15 −9 modified@@ -2015,10 +2015,10 @@ public function downloadAsZipJobsAction(Request $request): JsonResponse $userIds = $this->getAdminUser()->getRoles(); $userIds[] = $this->getAdminUser()->getId(); $conditionFilters[] = ' ( - (select list from users_workspaces_asset where userId in (' . implode(',', $userIds) . ') and LOCATE(CONCAT(`path`, filename),cpath)=1 ORDER BY LENGTH(cpath) DESC LIMIT 1)=1 - OR - (select list from users_workspaces_asset where userId in (' . implode(',', $userIds) . ') and LOCATE(cpath,CONCAT(`path`, filename))=1 ORDER BY LENGTH(cpath) DESC LIMIT 1)=1 - )'; + (select list from users_workspaces_asset where userId in (' . implode(',', $userIds) . ') and LOCATE(CONCAT(`path`, filename),cpath)=1 ORDER BY LENGTH(cpath) DESC LIMIT 1)=1 + OR + (select list from users_workspaces_asset where userId in (' . implode(',', $userIds) . ') and LOCATE(cpath,CONCAT(`path`, filename))=1 ORDER BY LENGTH(cpath) DESC LIMIT 1)=1 + )'; } $condition = implode(' AND ', $conditionFilters); @@ -2088,18 +2088,24 @@ public function downloadAsZipAddFilesAction(Request $request): JsonResponse if (!empty($selectedIds)) { $selectedIds = explode(',', $selectedIds); + $quotedSelectedIds = []; + foreach ($selectedIds as $selectedId) { + if ($selectedId) { + $quotedSelectedIds[] = $db->quote($selectedId); + } + } //add a condition if id numbers are specified - $conditionFilters[] = 'id IN (' . implode(',', $selectedIds) . ')'; + $conditionFilters[] = 'id IN (' . implode(',', $quotedSelectedIds) . ')'; } $conditionFilters[] = "`type` != 'folder' AND `path` like " . $db->quote(Helper::escapeLike($parentPath) . '/%'); if (!$this->getAdminUser()->isAdmin()) { $userIds = $this->getAdminUser()->getRoles(); $userIds[] = $this->getAdminUser()->getId(); $conditionFilters[] = ' ( - (select list from users_workspaces_asset where userId in (' . implode(',', $userIds) . ') and LOCATE(CONCAT(`path`, filename),cpath)=1 ORDER BY LENGTH(cpath) DESC LIMIT 1)=1 - OR - (select list from users_workspaces_asset where userId in (' . implode(',', $userIds) . ') and LOCATE(cpath,CONCAT(`path`, filename))=1 ORDER BY LENGTH(cpath) DESC LIMIT 1)=1 - )'; + (select list from users_workspaces_asset where userId in (' . implode(',', $userIds) . ') and LOCATE(CONCAT(`path`, filename),cpath)=1 ORDER BY LENGTH(cpath) DESC LIMIT 1)=1 + OR + (select list from users_workspaces_asset where userId in (' . implode(',', $userIds) . ') and LOCATE(cpath,CONCAT(`path`, filename))=1 ORDER BY LENGTH(cpath) DESC LIMIT 1)=1 + )'; } $condition = implode(' AND ', $conditionFilters);
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
7- github.com/advisories/GHSA-cwx6-4wmf-c6xvghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2024-23646ghsaADVISORY
- github.com/pimcore/admin-ui-classic-bundle/blob/1.x/src/Controller/Admin/Asset/AssetController.phpghsax_refsource_MISCWEB
- github.com/pimcore/admin-ui-classic-bundle/blob/1.x/src/Controller/Admin/Asset/AssetController.phpghsax_refsource_MISCWEB
- github.com/pimcore/admin-ui-classic-bundle/commit/363afef29496cc40a8b863c2ca2338979fcf50a8ghsax_refsource_MISCWEB
- github.com/pimcore/admin-ui-classic-bundle/releases/tag/v1.3.2ghsax_refsource_MISCWEB
- github.com/pimcore/admin-ui-classic-bundle/security/advisories/GHSA-cwx6-4wmf-c6xvghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.