Details
Impact
An authenticated user with website_settings permission (or any permission granting access to a listing endpoint with DateFilter support) extracts the full contents of any database table one character at a time through conditional time-based blind SQL injection.
Directly extractable high-value data:
- Admin password hashes (
users.password) for offline cracking - Password recovery tokens (
users.passwordRecoveryToken) for direct account takeover viaPOST /login/token - Session data for session hijacking
- All PIM product data, CMS content, and asset metadata
Affected Endpoints
All endpoints using ListingFilter::applyFilters() with a DateFilter on column filter:
POST /pimcore-studio/api/website-settingsPOST /pimcore-studio/api/notificationsPOST /pimcore-studio/api/recycle-binPOST /pimcore-studio/api/redirectsPOST /pimcore-studio/api/translations/{domain}POST /pimcore-studio/api/quantity-value/unitsPOST /pimcore-studio/api/propertiesPOST /pimcore-studio/api/classification-store/{storeId}/keysPOST /pimcore-studio/api/classification-store/{storeId}/groupsPOST /pimcore-studio/api/classification-store/{storeId}/collectionsGET /pimcore-studio/api/notes/{elementType}/{id}(via Note FilterService fieldFilters)
Recommended Fix
Replace manual backtick wrapping with Doctrine\DBAL\Connection::quoteIdentifier(), or implement a per-listing allowlist of valid column names:
// Option 1: quoteIdentifier (doubles internal backticks)
$db = \Pimcore\Db::get();
$dateCondition = $db->quoteIdentifier($key) . ' BETWEEN :minTime AND :maxTime';
// Option 2: allowlist (preferred)
private const ALLOWED_COLUMNS = ['id', 'name', 'date', 'type', 'creationDate', 'modificationDate'];
if (!in_array($key, self::ALLOWED_COLUMNS, true)) {
throw new InvalidArgumentException('Invalid filter column');
}
Apply the same fix to EqualsFilter, LikeFilter, and Note/FilterService as defense-in-depth, even though those are currently protected by PDO named parameter validation.
Supporting Materials
- Live-tested on Pimcore 12.x (2026.x branch, commit
82f9ff6), Docker, PHP 8.4, MariaDB 10.11 - MySQL general query log confirms injected SQL reaches the database
- The safe pattern (
quoteIdentifier()) exists in the same codebase inLogRepository.phpline 202 - Package:
pimcore/studio-backend-bundle