CVE-2024-41109: Pimcore vulnerable to disclosure of system and database information behind /admin firewall
Summary
Navigating to /admin/index/statistics with a logged in Pimcore user (not an XmlHttpRequest because of this check: IndexController:125) exposes information about the Pimcore installation, PHP version, MYSQL version, installed bundles and all database tables and their row count in the system.
The web server should not return any product and version information of the components used. The table names and row counts should not be exposed.
Details
/admin/index/statistics returns the following JSON-response: { { "instanceId": "...", "pimcoremajorversion": 11, "pimcoreversion": "v11.3.1", "pimcorehash": "3ecd39f21dbdd25ffdf4bec6e2c860eccfd3d008", "pimcoreplatformversion": "v2024.2", "phpversion": "8.3.8", "mysqlversion": "10.11.8-MariaDB-ubu2204", "bundles": [ // all installed bundles ], "tables": [ // all tables and their row count, e.g: { "name": "users", "rows": 2 }, ] }
Information about the Pimcore Version can also be seen here:
In a current Version:  
In Pimcore Version 10.6.9:  
PoC
- [Demo App](https://demo.pimcore.fun/admin) with credentials user: admin and pass: demo - Watching Network-Tab in Developer-Tools and looking for /admin/index/statistics
Impact
Only for logged in Pimcore users possible.
Workaround and Patch
We patched the following additional check for Pimcore v10.6.9. This uses an app-specific class but any user permission would be ok. This resolves navigating to /admin/index/statistics.
patch diff --git a/vendor/pimcore/pimcore/bundles/AdminBundle/Controller/Admin/IndexController.php b/vendor/pimcore/pimcore/bundles/AdminBundle/Controller/Admin/IndexController.php --- a/vendor/pimcore/pimcore/bundles/AdminBundle/Controller/Admin/IndexController.php (revision dd81ef4c666b18c254333867a60f6ed455025076) +++ b/vendor/pimcore/pimcore/bundles/AdminBundle/Controller/Admin/IndexController.php (date 1721225746781) @@ -15,6 +15,7 @@
namespace Pimcore\Bundle\AdminBundle\Controller\Admin;
+use App\Constant\UserPermission; use Doctrine\DBAL\Connection; use Exception; use Pimcore\Analytics\Google\Config\SiteConfigProvider; @@ -142,6 +143,12 @@ throw $this->createAccessDeniedHttpException(); }
+ $user = $this->tokenResolver->getUser(); + + if (!$user->isAdmin() && !$user->isAllowed(UserPermission::ADMININDEXVIEW)) { + throw $this->createAccessDeniedException(); + } + // DB try { $tables = $db->fetchAllAssociative('SELECT TABLENAME as name,TABLEROWS as rows from informationschema.TABLES
For the Pimcore versions in the UI we used the IndexActionSettingsEvent. This works for Versions < Pimcore 11:
php <?php
namespace App\EventListener\Admin;
use App\Constant\UserPermission; use Pimcore\Bundle\AdminBundle\Event\AdminEvents; use Pimcore\Event\Admin\IndexActionSettingsEvent; use Pimcore\Security\User\TokenStorageUserResolver; use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/ @deprecated and cannot be used in Pimcore 11 / class PimcoreVersionUIGuardSubscriber implements EventSubscriberInterface { public function construct(private readonly TokenStorageUserResolver $tokenResolver) { }
public static function getSubscribedEvents() { return [ AdminEvents::INDEXACTIONSETTINGS => ['onIndexActionSettingsEvent'], ]; }
public function onIndexActionSettingsEvent(IndexActionSettingsEvent $event): void { $user = $this->tokenResolver->getUser(); if ($user->isAdmin() || $user->isAllowed(UserPermission::ADMININDEXVIEW)) { return; }
$settings = $event->getSettings(); $settings['instanceId'] = ''; $settings['version'] = ''; $settings['build'] = ''; $event->setSettings($settings); } }
Other sources
Pimcore's Admin Classic Bundle provides a backend user interface for Pimcore. Navigating to /admin/index/statistics with a logged in Pimcore user exposes information about the Pimcore installation, PHP version, MYSQL version, installed bundles and all database tables and their row count in the system. This vulnerability is fixed in 1.5.2, 1.4.6, and 1.3.10.
— MITRE
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-41109?
CVE-2024-41109 has been classified as a medium severity vulnerability, affecting specific versions of the Pimcore admin-ui-classic-bundle.
How do I fix CVE-2024-41109?
To resolve CVE-2024-41109, upgrade to version 1.5.2 or later of the pimcore/admin-ui-classic-bundle.
Which versions are affected by CVE-2024-41109?
CVE-2024-41109 affects versions up to and including 1.5.1 of the pimcore/admin-ui-classic-bundle.
What vulnerability does CVE-2024-41109 exploit?
CVE-2024-41109 exploits improper access controls on the /admin/index/statistics endpoint for logged-in Pimcore users.
Is a patch available for CVE-2024-41109?
Yes, a patch for CVE-2024-41109 is available in version 1.5.2 of the pimcore/admin-ui-classic-bundle.