cbcvebase.
CVE-2022-24112
published 2022-02-11

CVE-2022-24112: 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…

PriorityP198critical9.8CVSS 3.1
AVNACLPRNUINSUCHIHAH
KEVITWEXPLOITInitial access
CISA Known Exploited Vulnerabilitydue 2022-09-15
Exploited in the wild
EPSS
96.18%
99.9th percentile
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

5 ranges
VendorProductVersion rangeFixed in
apacheapisix< 2.10.42.10.4
apacheapisix>= 2.11.0 < 2.12.12.12.1
apache_software_foundationapache_apisix>= 1.3 < Apache APISIX 1*Apache APISIX 1*
apache_software_foundationapache_apisix>= Apache APISIX 2.10 < 2.10.42.10.4
apache_software_foundationapache_apisix>= Apache APISIX 2.12 < 2.12.12.12.1

Detection & IOCsextracted from sources · hover to see the quote

  • Exploit chain requires two HTTP requests: (1) POST to /apisix/batch-requests with X-Real-IP: 127.0.0.1 header and api_key in pipeline path to bypass IP restriction, then (2) GET to the newly created route to trigger the filter_func RCE payload.
  • The nuclei template confirms exploitation by matching both '"reason":"OK"' and '"status":200' in the batch-requests response body, plus an out-of-band HTTP callback via interactsh.
  • Shodan/FOFA queries can identify exposed Apache APISIX Dashboard instances as pre-exploitation reconnaissance targets.
  • The Snort/ET rule (SID 2035272) fires on POST to /apisix/batch-requests containing both X-Real-IP and api_key=edd1c9f034335f136f87ad84b625c8f1 and filter_func in the request body — all three must be present.
  • ·The default API key edd1c9f034335f136f87ad84b625c8f1 is only exploitable if it has NOT been changed from the default. Changing the admin key significantly reduces impact.
  • ·Even with a changed admin key or non-default Admin API port, the IP restriction bypass in the batch-requests plugin still poses a risk to the data panel.
  • ·Disabling the batch-requests plugin in conf/config.yaml fully mitigates the vulnerability; it should be explicitly removed if not needed.

CVSS provenance

nvdv3.19.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvdv2.07.5HIGHAV:N/AC:L/Au:N/C:P/I:P/A:P
vulncheck9.8CRITICAL
cisa9.8CRITICAL
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.