OSV 1.4.0 · github-reviewed · 修改于 2026-07-11 03:08
发布时间
2026-05-29 04:47
GitHub 审查时间
2026-05-29 04:47
NVD 发布时间
—
源文件
advisories/github-reviewed/2026/05/GHSA-r2f4-ff2p-xc64/GHSA-r2f4-ff2p-xc64.json
My name is Oscar Uribe, Security Researcher at Fluid Attacks. I am reaching out because we have identified a security vulnerability in Pimcore 12.3.3 that we would like to report to you so we can coordinate a responsible disclosure together.
As part of our standard disclosure measures, we follow a timeline (outlined at https://fluidattacks.com/advisories/policy), which is aligned with ISO/IEC 29147:2018 and ISO/IEC 30111:2019. In short, the timeline works as follows: we ask for acknowledgment of the report within a few days of your first accessing it, and from there, we are happy to coordinate a joint disclosure date with you, typically within 90 days of the initial discovery. This gives your team reasonable time to assess, develop, and release a fix.
We have reserved the CVE ID "CVE-2026-5394" for this issue, and the advisory will eventually be published at https://fluidattacks.com/advisories/dragons. We are committed to coordinating the timing of that publication with you.
Please feel free to reach out if you have any questions about the report, the process, or the timeline. We are glad to work with you on this.
An authenticated administrative user who can import or save DataObject class definitions can inject attacker-controlled composite index metadata and trigger unintended SQL execution in the backend.
The vulnerable flow accepts compositeIndices from imported JSON, stores the values without strict validation, and later concatenates them directly into ALTER TABLE ... DROP INDEX and ALTER TABLE ... ADD INDEX statements executed through Doctrine DBAL.
Although the original report focused on compositeIndices.index_key, independent code review shows that the strongest and most reliable injection point is compositeIndices.index_columns, because it is inserted verbatim inside the ADD INDEX (...) clause. This permits injection of additional ALTER TABLE subclauses against Pimcore object tables without relying on stacked queries.
Pimcore\Model\DataObject\ClassDefinition\Service::importClassDefinitionFromJson() accepts compositeIndices directly from imported JSON.Pimcore\Model\DataObject\ClassDefinition::setCompositeIndices() does not enforce an allowlist for index names or column names.__id and __type, which is not a security control.Pimcore\Model\DataObject\Traits\CompositeIndexTrait::updateCompositeIndices() builds raw SQL with string concatenation and executes it via $this->db->executeQuery(...).quoteIdentifier() is used for the SHOW INDEXES query, but not for the dynamic ALTER TABLE statements.index_key or index_columns to known safe identifier characters.importClassDefinitionFromJson() decodes attacker-controlled JSON and forwards compositeIndices.setCompositeIndices() stores those values without sanitizing identifier content.ClassDefinition::save() reaches ClassDefinition\Dao::update().Dao::update() calls updateCompositeIndices() for:
object_store_<classId>object_query_<classId>Localizedfield\Dao also calls updateCompositeIndices() for:
The vulnerable ADD INDEX statement is built as:
'ALTER TABLE `'.$table.'` ADD INDEX `' . $key.'` ('.$columnName.');'
$columnName is produced from implode(',', $columns) and is not quoted or validated. A malicious index_columns element such as:
slider), DROP COLUMN `oo_className` --
produces SQL of the form:
ALTER TABLE `object_query_<id>` ADD INDEX `c_poc_idx` (slider), DROP COLUMN `oo_className` -- );
This remains a single ALTER TABLE statement, so the base vulnerability does not depend on multi-statement support. The attacker can inject additional DDL clauses affecting the target Pimcore object table.
The issue allows a privileged attacker to alter backend SQL behavior during class-definition import/save and modify schema on Pimcore object tables associated with the affected class.
Practical impact includes:
index_key is also concatenated into SQL without proper identifier escaping, but the most defensible exploitation path is through index_columns.
Relevant code:
models/DataObject/ClassDefinition/Service.php:92-137models/DataObject/ClassDefinition.php:994-1006models/DataObject/Traits/CompositeIndexTrait.php:30-85models/DataObject/ClassDefinition/Dao.php:217-218models/DataObject/Localizedfield/Dao.php:945-951Preconditions:
compositeIndicesThe original report reproduced the issue through an authenticated Studio endpoint:
POST /pimcore-studio/api/class/definition/configuration-view/detail/1/import
Minimal malicious JSON fragment:
{
"compositeIndices": [
{
"index_key": "poc_idx",
"index_type": "query",
"index_columns": [
"slider), DROP COLUMN `oo_className` -- "
]
}
]
}
Reproduction:
compositeIndices section with the payload above.Expected result:
updateCompositeIndices() during class save/import.ALTER TABLE statement against the target object table.The behavior is directly visible from the code path:
$newIndicesMap['c_' . $key] = implode(',', $columns);
$columnName = $newIndicesMap[$key];
$this->db->executeQuery(
'ALTER TABLE `'.$table.'` ADD INDEX `' . $key.'` ('.$columnName.');'
);
No escaping or allowlist validation is applied to $columns before they are interpolated into SQL.
We have reserved the ID CVE-2026-5394 to refer to this issue from now on.
Pimcore Platform
Version v12.3.3
Database layer: doctrine/dbal ^4.4
Operating System: Any
Github Repository: https://github.com/pimcore/pimcore Security: https://github.com/pimcore/pimcore/security