CVE-2022-24112: Apache APISIX Authentication Bypass Vulnerability
An attacker can abuse the batch-requests plugin to send requests to bypass the IP restriction of Admin API. A default configuration of Apache APISIX (with default API key) is vulnerable to remote code execution. When the admin key was changed or the port of Admin API was changed to a port different from the data panel, the impact is lower. But there is still a risk to bypass the IP restriction of Apache APISIX's data panel. There is a check in the batch-requests plugin which overrides the client IP with its real remote IP. But due to a bug in the code, this check can be bypassed.
Other sources
Apache APISIX contains an authentication bypass vulnerability that allows for remote code execution.
— CISA
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Change the default admin API key to a non-default, strong key in the APISIX configuration to avoid using the default API key.
Apache APISIX (Admin API) admin API key / default API key = replace default with a non-default value - Configuration
Configure the Admin API to listen on a port different from the data panel/data plane port (i.e., change the Admin API port so it is not the same as the data panel port).
Apache APISIX (Admin API) Admin API port = use a port different from the data panel port - Configuration
Disable the batch-requests plugin's ability to overwrite the X-REAL-IP header or configure the plugin so it does not override the client IP.
apisix/batch-requests plugin X-REAL-IP header overwrite = disabled - Compensating control
Restrict access to the Admin API and data panel to trusted IP addresses using firewall rules, network ACLs or similar network-based controls to mitigate IP-restriction bypass.
Event History
Frequently Asked Questions
What is the vulnerability ID for the Apache APISIX Authentication Bypass Vulnerability?
The vulnerability ID for the Apache APISIX Authentication Bypass Vulnerability is CVE-2022-24112.
What is the severity of CVE-2022-24112?
The severity of CVE-2022-24112 is critical with a CVSS score of 9.8.
How can an attacker exploit CVE-2022-24112?
An attacker can abuse the batch-requests plugin to send requests to bypass the IP restriction of Admin API, leading to remote code execution.
Which software is affected by CVE-2022-24112?
Apache APISIX versions up to 2.10.4 and versions between 2.11.0 and 2.12.1 are affected by CVE-2022-24112.
Are there any references for CVE-2022-24112?
Yes, you can find references for CVE-2022-24112 at the following links: [Link 1](https://lists.apache.org/thread/lcdqywz8zy94mdysk7p3gfdgn51jmt94), [Link 2](http://packetstormsecurity.com/files/166228/Apache-APISIX-Remote-Code-Execution.html), [Link 3](http://packetstormsecurity.com/files/166328/Apache-APISIX-2.12.1-Remote-Code-Execution.html)