CVE-2022-24112apisix/batch-requests plugin allows overwriting the X-REAL-IP header
- 9.8CriticalCVSS base score
- 96.1%Exploitation in 30 daysEPSS · top 0.1% of all CVEs
- YesKnown exploitedin CISA's KEV since 25 Aug 2022
- 3Public exploitsMetasploit, Nuclei and Exploit-DB
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.
Exploited in the wild
CISA lists this vulnerability in its Known Exploited Vulnerabilities catalog as Apache APISIX Authentication Bypass Vulnerability.
- Added
- 25 Aug 2022
- Fix due (US federal)
- 15 Sept 2022
- Used by ransomware
- Not known
Apply updates per vendor instructions.
ENISA's EU Vulnerability Database lists it as exploited, from CISA's KEV, since 25 Aug 2022.
Public exploit
An exploit or proof of concept is public: anyone can try it against an unpatched system. The public collections list a Metasploit module, a Nuclei template and an Exploit-DB entry for it. CISA's SSVC rates its exploitation: it is being exploited.
Show the exploits3
Metasploit modules1 module
- APISIX Admin API default access token RCE (Metasploit module) (opens in a new tab)
exploit/multi/http/apache_apisix_api_default_token_rceRank excellentdisclosed 7 Dec 2020
Nuclei templates1 template
- Apache APISIX - Remote Code Execution (Nuclei template) (opens in a new tab)
http/cves/2022/CVE-2022-24112.yamlSeverity critical
Exploit-DB1 entry
- Apache APISIX 2.12.1 - Remote Code Execution (RCE) (Exploit-DB entry) (opens in a new tab)
EDB-ID 50829remote, multiplepublished 16 Mar 2022Not verified
Modules, templates and exploits as listed by the Metasploit Framework (BSD-3-Clause), ProjectDiscovery's Nuclei templates (MIT) and the Exploit Database (GPLv2), read once a day. Where the data comes from
Timeline
ID reserved
By apache
- 14 days later
· 14 days later
Published
- 7 months later
· 7 months later
Added to CISA KEV
Known exploited in the wild
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| CISA-ADPADP (enrichment) | 3.1 | Critical9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVDNVD · Analyzed | 3.1 | Critical9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 96.1% · top 0.1% of all CVEs (14 Nov 2026)
- CISA SSVC
- Exploitation: active · Automatable: yes · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: Critical 9.8.
Affected products
Apache Software Foundation · Apache APISIX
- affected Apache APISIX 2.12 – < 2.12.1
- affected Apache APISIX 2.10 – < 2.10.4
- affected 1.3 – < Apache APISIX 1*
What to do
Workaround: 1. explicitly configure the enabled plugins in `conf/config.yaml`, ensure `batch-requests` is disabled. (Or just comment out `batch-requests` in `conf/config-default.yaml`) Or 1. upgrade to 2.10.4 or 2.12.1.
References
References5
- https://lists.apache.org/thread/lcdqywz8zy94mdysk7p3gfdgn51jmt94 (opens in a new tab)x_refsource_MISCx_transferred
- [oss-security] 20220211 CVE-2022-24112: Apache APISIX: apisix/batch-requests plugin allows overwriting the X-REAL-IP header (opens in a new tab)mailing-listx_refsource_MLISTx_transferred
- http://packetstormsecurity.com/files/166228/Apache-APISIX-Remote-Code-Execution.html (opens in a new tab)x_refsource_MISCx_transferred
- http://packetstormsecurity.com/files/166328/Apache-APISIX-2.12.1-Remote-Code-Execution.html (opens in a new tab)x_refsource_MISCx_transferred
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2022-24112 (opens in a new tab)government-resource
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- CISA KEV catalog (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2022-29024 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2022-24112)Record last updated .