CVE-2022-31092

7.5 HIGH

📋 TL;DR

CVE-2022-31092 is an SQL injection vulnerability in Pimcore's listing classes where improper quoting of order/group columns allows SQL injection when developers use these methods with untrusted input. This affects Pimcore users who rely on the platform's auto-quoting functionality without implementing additional input validation. The vulnerability could allow attackers to execute arbitrary SQL commands on the database.

💻 Affected Systems

Products:
  • Pimcore
Versions: Versions before 10.4.4
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects applications using Pimcore's listing classes with orderBy or groupBy methods on untrusted input.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full database compromise including data theft, modification, or deletion, and potential remote code execution through database functions.

🟠

Likely Case

Data exfiltration from the database, privilege escalation, or unauthorized data modification.

🟢

If Mitigated

No impact if proper input validation is implemented or if the vulnerability is patched.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires developer misuse of the vulnerable methods with user-controlled input.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 10.4.4

Vendor Advisory: https://github.com/pimcore/pimcore/security/advisories/GHSA-gvmf-wcx6-p974

Restart Required: Yes

Instructions:

1. Upgrade Pimcore to version 10.4.4 or later. 2. Apply the patch manually from the GitHub commit if upgrading is not immediately possible. 3. Restart the application server.

🔧 Temporary Workarounds

Manual Input Validation

all

Implement strict input validation for all parameters passed to orderBy and groupBy methods in listing classes.

🧯 If You Can't Patch

  • Implement strict input validation and parameterized queries for all database operations.
  • Restrict database user permissions to minimum required privileges.

🔍 How to Verify

Check if Vulnerable:

Check if Pimcore version is below 10.4.4 and review code for usage of orderBy/groupBy methods with user input.

Check Version:

Check Pimcore version in admin panel or via composer show pimcore/pimcore

Verify Fix Applied:

Verify Pimcore version is 10.4.4 or higher and test that orderBy/groupBy methods properly quote input.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple failed login attempts or unusual query patterns

Network Indicators:

  • Unusual database query patterns from application servers

SIEM Query:

Search for SQL error messages or unusual query patterns in application and database logs.

🔗 References

📤 Share & Export