SQL injection in ElementController.php in pimcore/pimcore
Valid
Reported on
Apr 8th 2022
Description
The property parameter is append to the sql query directly, which leads to a sql injection problem.
if you set a wrong value. you can see the error from log.
then you can check the result.
after injection
Proof of Concept
// PoC.js
"body": "filterText=sdf&page=1&start=0&limit=50&filter="+encodeURIComponent('[{"property":"id` = 1 or 1=1 # ","type":"string","value":"1","operator":"="}]')
Impact
This vulnerability is capable of steal the data
Occurrences
We are processing your report and will contact the
pimcore
team within 24 hours.
a year ago
mylong modified the report
a year ago
We have contacted a member of the
pimcore
team and are waiting to hear back
a year ago
ElementController.php#L249
has been validated
Hi,@aryaantony92. the fixup in line 245. $dateCondition = '`' . $filter[$propertyKey] . '` ' . ' BETWEEN ' . $db->quote($value) . ' AND ' . $db->quote($maxTime);
may be the $filter[$propertyKey]
should also be quoted?
to join this conversation