PoC Monitor
← All CVEs
CVE-2022-24112published 11 Feb 2022 12:20 UTCData: JSON · API

Apache Software Foundation Apache APISIX

apisix/batch-requests plugin allows overwriting the X-REAL-IP header

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.

First public PoC 11 daysafter publication · 22 Feb 2022
Public PoCs1310 on GitHub · 3 Exploit-DB, Metasploit or nuclei
CVSS9.8critical · scored by CISA ADP · CWE-290
CISA KEV 25 Aug 2022195 days after publication

Timeline

Days relative to CVE publication
t=0+30+60+90+120+150+180CVE published11 Feb 2022 · t = 0First public PoC22 Feb 2022 · t+11dAdded to CISA KEV25 Aug 2022 · t+195d

First public PoC 11 days after publication; added to CISA KEV 195 days after publication. First PoC: Mr-xn/CVE-2022-24112 (created 22 Feb 2022, found by us: backfilled).

PoC repositories

Found on GitHub.

10 PoCs · 5 pending · 1 not a PoC

PoCs 10
RepositoryCreatedStarsAssessment
Mr-xn/CVE-2022-24112 22 Feb 2022 +11 d 43 Scanner
CrackerCat/CVE-2022-24112 22 Feb 2022 +11 d 0 PoC
Axx8/CVE-2022-24112 25 Feb 2022 +14 d 8 PoC
SecNN/CVE-2022-24112 25 Feb 2022 +14 d 8 PoC
Mah1ndra/CVE-2022-24112 8 Mar 2022 +25 d 7 PoC
kavishkagihan/CVE-2022-24112-POC 17 Mar 2022 +34 d 2 PoC
twseptian/cve-2022-24112 20 Mar 2022 +37 d 9 PoC
Acczdy/CVE-2022-24112_POC 3 Dec 2022 +295 d 5 PoC
btar1gan/exploit_CVE-2022-24112 3 Jun 2024 +2.3 y 1 PoC
fatkz/CVE-2022-24112 23 May 2025 +3.3 y 0 PoC
Pending 5
RepositoryCreatedStarsAssessment
34zY/APT-Backpack 13 Dec 2022 +305 d 3 Pending · repository exceeds size limit via PoC Index
M4xSec/Apache-APISIX-CVE-2022-24112 unknown 0 Pending · repository unavailable (HTTP 404)
Udyz/CVE-2022-24112 unknown 0 Pending · repository unavailable (HTTP 404)
shakeman8/CVE-2022-24112 unknown 0 Pending · repository unavailable (HTTP 404)
wshepherd0010/CVE-2022-24112-Lab unknown 0 Pending · repository unavailable (HTTP 404)
Not a PoC 1
RepositoryCreatedStarsAssessment
Mah1ndra/CVE-2022-244112 8 Mar 2022 +25 d 7 Not a PoC · unrelated

Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.

Other public exploits

Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.

PoC characteristics

What to hunt for in your logs · from 11 PoC repos

POST /apisix/batch-requests

Key headers
Accept: */* Accept-Language: zh-CN,zh;q=0.9 X-Api-Key: edd1c9f034335f136f87ad84b625c8f1
Body markers
"headers" "timeout" "pipeline" "X-Real-IP":"127.0.0.1" "Content-Type":"application/json" "method":"PUT" "path":"/apisix/admin/routes/index?api_key=edd1c9f034335f136f87ad84b625c8f1" "body" in application/json
Ports
2379, 2380, 9080, 9090
PoC User-Agent
Mozilla/5.0 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.81 Safari/537.36 Edg/97.0.1072.69
Seen in
5 repos: Acczdy/CVE-2022-24112_POC, CrackerCat/CVE-2022-24112, Mr-xn/CVE-2022-24112, fatkz/CVE-2022-24112, twseptian/cve-2022-24112
Evidence
Acczdy/CVE-2022-24112_POC/CVE-2022-24112_Linux_by_twseptian.py:86 Acczdy/CVE-2022-24112_POC/CVE-2022-24112_Windows_by_M4xSec.py:86 CrackerCat/CVE-2022-24112/exp.py:10 Mr-xn/CVE-2022-24112/CVE-2022-24112.yaml:24 fatkz/CVE-2022-24112/exploit.py:60 twseptian/cve-2022-24112/poc/poc2.py:84

GET /api/test

Key headers
Accept-Language: zh-CN,zh;q=0.9
Content-Type
application/json
PoC User-Agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0
Seen in
4 repos: Axx8/CVE-2022-24112, CrackerCat/CVE-2022-24112, Mr-xn/CVE-2022-24112, SecNN/CVE-2022-24112
Evidence
Axx8/CVE-2022-24112/Apache_APISIX_RCE(CVE-2022-24112).py:26 CrackerCat/CVE-2022-24112/exp.py:12 Mr-xn/CVE-2022-24112/CVE-2022-24112.yaml:33 SecNN/CVE-2022-24112/Apache_APISIX_RCE(CVE-2022-24112).py:26

GET /rms/fzxewh

Key headers
Accept: */* X-Api-Key: edd1c9f034335f136f87ad84b625c8f1
Content-Type
application/json
Ports
2379, 2380, 9080, 9090
PoC User-Agent
Mozilla/5.0 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.81 Safari/537.36 Edg/97.0.1072.69
Seen in
3 repos: Acczdy/CVE-2022-24112_POC, fatkz/CVE-2022-24112, twseptian/cve-2022-24112
Evidence
Acczdy/CVE-2022-24112_POC/CVE-2022-24112_Linux_by_twseptian.py:88 Acczdy/CVE-2022-24112_POC/CVE-2022-24112_Windows_by_M4xSec.py:88 fatkz/CVE-2022-24112/exploit.py:70 twseptian/cve-2022-24112/poc/poc2.py:88

POST /apisix/batch-requests'.strip()

Content-Type
application/json
PoC User-Agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0
Seen in
2 repos: Axx8/CVE-2022-24112, SecNN/CVE-2022-24112
Evidence
Axx8/CVE-2022-24112/Apache_APISIX_RCE(CVE-2022-24112).py:24 SecNN/CVE-2022-24112/Apache_APISIX_RCE(CVE-2022-24112).py:24

GET /apisix/admin/routes

Query
api_key=edd1c9f034335f136f87ad84b625c8f1
Ports
9080
Seen in
1 repo: twseptian/cve-2022-24112
Evidence
twseptian/cve-2022-24112/README.md:14 twseptian/cve-2022-24112/README.md:119

GET /apisix/admin/routes/

Ports
9080
Seen in
1 repo: twseptian/cve-2022-24112
Evidence
twseptian/cve-2022-24112/apisix-docker/docs/en/latest/manual.md:88

GET /apisix/batch-requests/apisix/batch-requests/apisix/batch-requests

Seen in
1 repo: Mah1ndra/CVE-2022-24112
Evidence
Mah1ndra/CVE-2022-24112/apisix-exploit.go:39

POST /apisix/batch-requests/apisix/batch-requests/apisix/batch-requests

Seen in
1 repo: Mah1ndra/CVE-2022-24112
Evidence
Mah1ndra/CVE-2022-24112/apisix-exploit.go:50

PUT /apisix/admin/routes/12

Key headers
X-Api-Key: edd1c9f034335f136f87ad84b625c8f1
Content-Type
application/x-www-form-urlencoded
Ports
9080
Seen in
1 repo: twseptian/cve-2022-24112
Evidence
twseptian/cve-2022-24112/apisix-docker/docs/en/latest/example.md:55

PUT /apisix/admin/routes/22

Key headers
X-Api-Key: edd1c9f034335f136f87ad84b625c8f1
Content-Type
application/x-www-form-urlencoded
Ports
9080
Seen in
1 repo: twseptian/cve-2022-24112
Evidence
twseptian/cve-2022-24112/apisix-docker/docs/en/latest/example.md:62

PUT /apisix/admin/services/1

Key headers
X-Api-Key: edd1c9f034335f136f87ad84b625c8f1
Content-Type
application/x-www-form-urlencoded
Ports
9080
Seen in
1 repo: twseptian/cve-2022-24112
Evidence
twseptian/cve-2022-24112/apisix-docker/docs/en/latest/example.md:35

PUT /apisix/admin/services/2

Key headers
X-Api-Key: edd1c9f034335f136f87ad84b625c8f1
Content-Type
application/x-www-form-urlencoded
Ports
9080
Seen in
1 repo: twseptian/cve-2022-24112
Evidence
twseptian/cve-2022-24112/apisix-docker/docs/en/latest/example.md:45

PUT /apisix/admin/ssl/1

Key headers
X-Api-Key: edd1c9f034335f136f87ad84b625c8f1
Content-Type
application/x-www-form-urlencoded
Ports
9080
Seen in
1 repo: twseptian/cve-2022-24112
Evidence
twseptian/cve-2022-24112/apisix-docker/docs/en/latest/example.md:69

PUT /apisix/admin/ssl/2

Key headers
X-Api-Key: edd1c9f034335f136f87ad84b625c8f1
Content-Type
application/x-www-form-urlencoded
Ports
9080
Seen in
1 repo: twseptian/cve-2022-24112
Evidence
twseptian/cve-2022-24112/apisix-docker/docs/en/latest/example.md:76

Regex

Generated from PoC characteristics; not yet reviewed. Matches the request path and query.

POST /apisix/batch-requests
(?i)^/apisix/batch-requests(?:[?#].*)?$
GET /api/test
(?i)^/api/test(?:[?#].*)?$
GET /rms/fzxewh
(?i)^/rms/fzxewh(?:[?#].*)?$
POST /apisix/batch-requests'.strip()
(?i)^/apisix/batch-requests'\.strip\(\)(?:[?#].*)?$
GET /apisix/admin/routes
(?i)^/apisix/admin/routes\?(?:.*&)?api_key=edd1c9f034335f136f87ad84b625c8f1

Suricata

Template generated from PoC characteristics. Review before deploying.

POST /apisix/batch-requests
alert http any any -> $HOME_NET [2379,2380,9080,9090] (msg:"GG PoC-Monitor CVE-2022-24112 Apache Software Foundation Apache APISIX exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/apisix/batch-requests"; http.header; content:"Accept: */*"; nocase; http.header; content:"Accept-Language: zh-CN,zh|3b|q=0.9"; nocase; http.header; content:"X-Api-Key: edd1c9f034335f136f87ad84b625c8f1"; nocase; http.request_body; content:"|22|headers|22|"; http.request_body; content:"|22|timeout|22|"; http.request_body; content:"|22|pipeline|22|"; http.request_body; content:"|22|X-Real-IP|22|:|22|127.0.0.1|22|"; http.request_body; content:"|22|Content-Type|22|:|22|application/json|22|"; http.request_body; content:"|22|method|22|:|22|PUT|22|"; http.request_body; content:"|22|path|22|:|22|/apisix/admin/routes/index?api_key=edd1c9f034335f136f87ad84b625c8f1|22|"; http.request_body; content:"|22|body|22|"; reference:url,poc.griffinguard.io/cve/CVE-2022-24112; classtype:web-application-attack; sid:9324994; rev:1;)
GET /api/test
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2022-24112 Apache Software Foundation Apache APISIX exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/api/test"; http.header; content:"Accept-Language: zh-CN,zh|3b|q=0.9"; nocase; reference:url,poc.griffinguard.io/cve/CVE-2022-24112; classtype:web-application-attack; sid:9582387; rev:1;)
GET /rms/fzxewh
alert http any any -> $HOME_NET [2379,2380,9080,9090] (msg:"GG PoC-Monitor CVE-2022-24112 Apache Software Foundation Apache APISIX exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/rms/fzxewh"; http.header; content:"Accept: */*"; nocase; http.header; content:"X-Api-Key: edd1c9f034335f136f87ad84b625c8f1"; nocase; reference:url,poc.griffinguard.io/cve/CVE-2022-24112; classtype:web-application-attack; sid:9890333; rev:1;)
POST /apisix/batch-requests'.strip()
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2022-24112 Apache Software Foundation Apache APISIX exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/apisix/batch-requests'.strip()"; reference:url,poc.griffinguard.io/cve/CVE-2022-24112; classtype:web-application-attack; sid:9445696; rev:1;)
GET /apisix/admin/routes
alert http any any -> $HOME_NET [9080] (msg:"GG PoC-Monitor CVE-2022-24112 Apache Software Foundation Apache APISIX exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/apisix/admin/routes"; http.uri; content:"api_key=edd1c9f034335f136f87ad84b625c8f1"; reference:url,poc.griffinguard.io/cve/CVE-2022-24112; classtype:web-application-attack; sid:9385073; rev:1;)

Sigma

Template generated from PoC characteristics. Review before deploying.

POST /apisix/batch-requests
title: Apache Software Foundation Apache APISIX exploit attempt (CVE-2022-24112)
id: gg-pocmon-cve-2022-24112-9324994
status: experimental
description: Request pattern taken from public PoCs for CVE-2022-24112. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2022-24112
logsource:
  category: webserver
detection:
  selection:
    cs-method: POST
    cs-uri-stem|contains|all:
      - '/apisix/batch-requests'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2022.24112
GET /api/test
title: Apache Software Foundation Apache APISIX exploit attempt (CVE-2022-24112)
id: gg-pocmon-cve-2022-24112-9582387
status: experimental
description: Request pattern taken from public PoCs for CVE-2022-24112. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2022-24112
logsource:
  category: webserver
detection:
  selection:
    cs-method: GET
    cs-uri-stem|contains|all:
      - '/api/test'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2022.24112
GET /rms/fzxewh
title: Apache Software Foundation Apache APISIX exploit attempt (CVE-2022-24112)
id: gg-pocmon-cve-2022-24112-9890333
status: experimental
description: Request pattern taken from public PoCs for CVE-2022-24112. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2022-24112
logsource:
  category: webserver
detection:
  selection:
    cs-method: GET
    cs-uri-stem|contains|all:
      - '/rms/fzxewh'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2022.24112
POST /apisix/batch-requests'.strip()
title: Apache Software Foundation Apache APISIX exploit attempt (CVE-2022-24112)
id: gg-pocmon-cve-2022-24112-9445696
status: experimental
description: Request pattern taken from public PoCs for CVE-2022-24112. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2022-24112
logsource:
  category: webserver
detection:
  selection:
    cs-method: POST
    cs-uri-stem|contains|all:
      - '/apisix/batch-requests''.strip()'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2022.24112
GET /apisix/admin/routes
title: Apache Software Foundation Apache APISIX exploit attempt (CVE-2022-24112)
id: gg-pocmon-cve-2022-24112-9385073
status: experimental
description: Request pattern taken from public PoCs for CVE-2022-24112. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2022-24112
logsource:
  category: webserver
detection:
  selection:
    cs-method: GET
    cs-uri-stem|contains|all:
      - '/apisix/admin/routes'
    cs-uri-query|contains|all:
      - 'api_key=edd1c9f034335f136f87ad84b625c8f1'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2022.24112