Description
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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Apache Software Foundation | Apache APISIX | Apache APISIX 2.12 – < 2.12.1, Apache APISIX 2.10 – < 2.10.4, 1.3 – < Apache APISIX 1* | 2.12.1 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
APISIX Admin API default access token RCE
exploit/multi/http/apache_apisix_api_default_token_rce
Exploit-DB 1
- Apache APISIX 2.12.1 - Remote Code Execution (RCE) EDB-50829 · remote · Mar 16, 2022
GitHub 9 repositories
-
Mr-xn/CVE-2022-24112 ★ 43 · Feb 22, 2022
CVE-2022-24112:Apache APISIX apisix/batch-requests RCE
-
twseptian/cve-2022-24112 ★ 9 · Mar 20, 2022
Apache APISIX < 2.12.1 Remote Code Execution and Docker Lab
-
SecNN/CVE-2022-24112 ★ 8 · Feb 25, 2022
Apache APISIX batch-requests RCE(CVE-2022-24112)
-
Mah1ndra/CVE-2022-24112 ★ 7 · Mar 8, 2022
CVE-2022-24112: Apache APISIX Remote Code Execution Vulnerability
-
Acczdy/CVE-2022-24112_POC ★ 5 · Dec 3, 2022
CVE-2022-24112_POC
-
kavishkagihan/CVE-2022-24112-POC ★ 2 · Mar 17, 2022
Apache APISIX 2.12.1 Remote Code Execution by IP restriction bypass and using default admin AIP token
-
btar1gan/exploit_CVE-2022-24112 ★ 1 · Jun 3, 2024
New exploit for Apache APISIX v2.12.1 - Remote code execution (RCE)
-
fatkz/CVE-2022-24112 ★ 0 · May 23, 2025
-
CrackerCat/CVE-2022-24112 ★ 0 · Feb 22, 2022
Apache APISIX apisix/batch-requests RCE
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Automated scanner template
A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.
- Apache APISIX - Remote Code Execution http/cves/2022/CVE-2022-24112.yaml
Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.
References
- https://lists.apache.org/thread/lcdqywz8zy94mdysk7p3gfdgn51jmt94
- [oss-security] 20220211 CVE-2022-24112: Apache APISIX: apisix/batch-requests plugin allows overwriting the X-REAL-IP header mailing-list
- 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