CVE-2022-23797

9.8 CRITICAL

📋 TL;DR

CVE-2022-23797 is a critical SQL injection vulnerability in Joomla! CMS that allows attackers to execute arbitrary SQL commands through inadequate filtering of selected IDs in requests. This affects all Joomla! installations from versions 3.0.0 through 3.10.6 and 4.0.0 through 4.1.0. Attackers could potentially read, modify, or delete database content.

💻 Affected Systems

Products:
  • Joomla! CMS
Versions: 3.0.0 through 3.10.6 and 4.0.0 through 4.1.0
Operating Systems: All operating systems running Joomla!
Default Config Vulnerable: ⚠️ Yes
Notes: All Joomla! installations within affected version ranges are vulnerable regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, privilege escalation, remote code execution, or complete system takeover.

🟠

Likely Case

Unauthorized data access, data manipulation, or privilege escalation within the Joomla! application.

🟢

If Mitigated

Limited impact with proper input validation, parameterized queries, and database permissions in place.

🌐 Internet-Facing: HIGH - Joomla! is typically deployed as a public-facing web application, making it directly accessible to attackers.
🏢 Internal Only: MEDIUM - Internal Joomla! installations could still be exploited by internal threat actors or through compromised internal systems.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires some level of access to Joomla! functionality, but detailed technical information is publicly available.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Joomla! 3.10.7 and 4.1.1

Vendor Advisory: https://developer.joomla.org/security-centre/874-20220305-core-inadequate-filtering-on-the-selected-ids.html

Restart Required: No

Instructions:

1. Backup your Joomla! site and database. 2. Update to Joomla! 3.10.7 or 4.1.1 via the Joomla! Update component. 3. Verify the update completed successfully. 4. Test critical site functionality.

🔧 Temporary Workarounds

Input Validation Filter

all

Implement custom input validation to filter and sanitize all ID parameters before processing.

Implement in Joomla! components/plugins to validate integer IDs: if (!is_numeric($id) || $id <= 0) { die('Invalid input'); }

🧯 If You Can't Patch

  • Implement web application firewall (WAF) rules to block SQL injection patterns in request parameters.
  • Restrict database user permissions to minimum required operations (SELECT only where possible).

🔍 How to Verify

Check if Vulnerable:

Check Joomla! version in Administrator panel → System → System Information → Joomla! Version.

Check Version:

Check Joomla! configuration.php file: grep '$version' configuration.php

Verify Fix Applied:

Confirm version is 3.10.7 or higher for Joomla! 3.x, or 4.1.1 or higher for Joomla! 4.x.

📡 Detection & Monitoring

Log Indicators:

  • Unusual database queries in Joomla! logs
  • Multiple failed parameter validation attempts
  • Suspicious requests with SQL keywords in ID parameters

Network Indicators:

  • HTTP requests containing SQL injection patterns in GET/POST parameters
  • Unusual database connection patterns from web server

SIEM Query:

source="joomla_logs" AND ("SELECT" OR "UNION" OR "INSERT" OR "DELETE") AND parameter="id"

🔗 References

📤 Share & Export