CVE-2022-24112
📋 TL;DR
CVE-2022-24112 is a critical authentication bypass vulnerability in Apache APISIX's batch-requests plugin that allows attackers to bypass IP restrictions and execute remote code. Organizations running default configurations of Apache APISIX are affected. The vulnerability enables attackers to send malicious requests to the Admin API even when IP restrictions are configured.
💻 Affected Systems
- Apache APISIX
📦 What is this software?
Apisix by Apache
Apisix by Apache
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution with administrative privileges leading to complete system compromise, data theft, and lateral movement within the network.
Likely Case
Unauthorized access to Admin API allowing configuration changes, route manipulation, and potential privilege escalation to RCE.
If Mitigated
Limited impact if Admin API uses non-default keys and separate ports from data panel, though IP bypass risk remains.
🎯 Exploit Status
Multiple public exploit scripts available. Attack requires network access to APISIX instance.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Apache APISIX 2.13.0
Vendor Advisory: https://lists.apache.org/thread/lcdqywz8zy94mdysk7p3gfdgn51jmt94
Restart Required: Yes
Instructions:
1. Upgrade to Apache APISIX 2.13.0 or later. 2. Restart all APISIX services. 3. Verify the batch-requests plugin is properly configured.
🔧 Temporary Workarounds
Disable batch-requests plugin
allRemove or disable the vulnerable batch-requests plugin if not required
Edit APISIX configuration to remove batch-requests from plugins list
Restrict Admin API access
allApply strict network-level restrictions to Admin API endpoints
Use firewall rules to restrict Admin API port access to trusted IPs only
🧯 If You Can't Patch
- Change default admin API keys to strong, unique values
- Configure Admin API to run on separate port from data panel with strict IP whitelisting
🔍 How to Verify
Check if Vulnerable:
Check APISIX version: if running 2.12.1 or earlier with batch-requests plugin enabled, system is vulnerable.
Check Version:
apisix version
Verify Fix Applied:
Verify APISIX version is 2.13.0 or later and test batch-requests plugin functionality with IP restriction bypass attempts.
📡 Detection & Monitoring
Log Indicators:
- Unusual batch requests to Admin API endpoints
- Requests from unexpected IPs to restricted endpoints
- Configuration changes via Admin API from unauthorized sources
Network Indicators:
- HTTP requests containing X-Real-IP or X-Forwarded-For headers with batch-requests plugin calls
- Traffic to Admin API port from external IPs
SIEM Query:
source="apisix" AND (uri="/apisix/admin" OR uri="/apisix/batch-requests") AND NOT src_ip IN [trusted_ip_list]
🔗 References
- http://packetstormsecurity.com/files/166228/Apache-APISIX-Remote-Code-Execution.html
- http://packetstormsecurity.com/files/166328/Apache-APISIX-2.12.1-Remote-Code-Execution.html
- http://www.openwall.com/lists/oss-security/2022/02/11/3
- https://lists.apache.org/thread/lcdqywz8zy94mdysk7p3gfdgn51jmt94
- http://packetstormsecurity.com/files/166228/Apache-APISIX-Remote-Code-Execution.html
- http://packetstormsecurity.com/files/166328/Apache-APISIX-2.12.1-Remote-Code-Execution.html
- http://www.openwall.com/lists/oss-security/2022/02/11/3
- https://lists.apache.org/thread/lcdqywz8zy94mdysk7p3gfdgn51jmt94
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2022-24112