Pimcore: One click, two security vulnerabilities
Pimcore versions before 10.5.19 had a path traversal and an SQL injection in the create-csv endpoint. An attacker could craft a link that, when clicked by an admin, writes a PHP web shell to the server and executes arbitrary code.
Published on sonarsource.com
The Pimcore Platform provides software for central management of corporate data. With over 100,000 clients across 56 countries, including some major vendors, it has become a trusted choice for businesses worldwide.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the endpoint lacked CSRF protection and did not sanitise user input used in a file path and in SQL queries.
What the attacker needed
Admin clicks a crafted link; Pimcore version before 10.5.19
The fix
The vulnerabilities were fixed in Pimcore 10.5.19 by quoting field names in SQL and by verifying the file extension and normalising the path.
How it was found
- Craft a GET request to the create-csv endpoint with a malicious exportFile parameter that points to a PHP file in the web root.
- Include SQL injection payloads in the drillDownFilters parameter to control the data written to the file.
- Set headers=true to include field names in the CSV output.
- Set name=Quality_Attributes to reference a valid report.
- Send the crafted link to an admin; when clicked, the server writes a PHP web shell.
- Access the web shell to execute arbitrary code on the server.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
This report describes two bugs in a content management system. One bug lets an attacker choose where a file is saved on the server, and the other lets them control what gets written into that file. By combining them, an attacker can trick a logged-in administrator into clicking a link that creates a malicious file, which then runs code on the server.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.