{
  "id": "CVE-2022-24112",
  "url": "https://poc.griffinguard.io/cve/CVE-2022-24112",
  "published_at": "2022-02-11T12:20:13Z",
  "title": "apisix/batch-requests plugin allows overwriting the X-REAL-IP header",
  "vendor": "Apache Software Foundation",
  "product": "Apache APISIX",
  "cvss": {
    "score": 9.8,
    "source": "cisa-adp",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": true,
    "added_at": "2022-08-25",
    "known_ransomware_campaign_use": "Unknown",
    "days_after_publication": 195
  },
  "first_poc": {
    "created_at": "2022-02-22T14:09:49Z",
    "first_seen_at": "2026-11-14T11:25:11.578Z",
    "days_after_publication": 11.1,
    "repo": "Mr-xn/CVE-2022-24112",
    "source": "github"
  },
  "poc_repo_count": 10,
  "exploit_count": 3,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "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.",
  "cwe": "CWE-290",
  "cvss_by_source": {
    "cisa-adp": 9.8
  },
  "repos": [
    {
      "repo": "M4xSec/Apache-APISIX-CVE-2022-24112",
      "url": "https://github.com/M4xSec/Apache-APISIX-CVE-2022-24112",
      "created_at": null,
      "first_seen_at": "2026-11-14T22:17:34.881Z",
      "stars": 0,
      "is_poc": "unknown",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "skipped"
    },
    {
      "repo": "Udyz/CVE-2022-24112",
      "url": "https://github.com/Udyz/CVE-2022-24112",
      "created_at": null,
      "first_seen_at": "2026-11-14T22:17:34.881Z",
      "stars": 0,
      "is_poc": "unknown",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "skipped"
    },
    {
      "repo": "shakeman8/CVE-2022-24112",
      "url": "https://github.com/shakeman8/CVE-2022-24112",
      "created_at": null,
      "first_seen_at": "2026-11-14T22:17:34.881Z",
      "stars": 0,
      "is_poc": "unknown",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "skipped"
    },
    {
      "repo": "wshepherd0010/CVE-2022-24112-Lab",
      "url": "https://github.com/wshepherd0010/CVE-2022-24112-Lab",
      "created_at": null,
      "first_seen_at": "2026-11-14T22:17:34.881Z",
      "stars": 0,
      "is_poc": "unknown",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "skipped"
    },
    {
      "repo": "Mr-xn/CVE-2022-24112",
      "url": "https://github.com/Mr-xn/CVE-2022-24112",
      "created_at": "2022-02-22T14:09:49Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 43,
      "is_poc": "yes",
      "kind": "scanner",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2016-04-04T10:07:20Z"
    },
    {
      "repo": "CrackerCat/CVE-2022-24112",
      "url": "https://github.com/CrackerCat/CVE-2022-24112",
      "created_at": "2022-02-22T23:21:26Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 0,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2016-03-22T00:36:44Z"
    },
    {
      "repo": "Axx8/CVE-2022-24112",
      "url": "https://github.com/Axx8/CVE-2022-24112",
      "created_at": "2022-02-25T15:17:28Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 8,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2017-12-19T13:37:27Z"
    },
    {
      "repo": "SecNN/CVE-2022-24112",
      "url": "https://github.com/SecNN/CVE-2022-24112",
      "created_at": "2022-02-25T15:17:28Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 8,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2017-12-19T13:37:27Z"
    },
    {
      "repo": "Mah1ndra/CVE-2022-24112",
      "url": "https://github.com/Mah1ndra/CVE-2022-24112",
      "created_at": "2022-03-08T17:08:52Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 7,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2017-10-05T16:48:02Z"
    },
    {
      "repo": "Mah1ndra/CVE-2022-244112",
      "url": "https://github.com/Mah1ndra/CVE-2022-244112",
      "created_at": "2022-03-08T17:08:52Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 7,
      "is_poc": "no",
      "kind": "unrelated",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2017-10-05T16:48:02Z"
    },
    {
      "repo": "kavishkagihan/CVE-2022-24112-POC",
      "url": "https://github.com/kavishkagihan/CVE-2022-24112-POC",
      "created_at": "2022-03-17T08:22:54Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 2,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2021-06-06T19:36:38Z"
    },
    {
      "repo": "twseptian/cve-2022-24112",
      "url": "https://github.com/twseptian/cve-2022-24112",
      "created_at": "2022-03-20T16:35:55Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 9,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2014-10-05T11:02:20Z"
    },
    {
      "repo": "Acczdy/CVE-2022-24112_POC",
      "url": "https://github.com/Acczdy/CVE-2022-24112_POC",
      "created_at": "2022-12-03T14:31:28Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 5,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2022-06-07T07:05:36Z"
    },
    {
      "repo": "34zY/APT-Backpack",
      "url": "https://github.com/34zY/APT-Backpack",
      "created_at": "2022-12-13T08:41:44Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 3,
      "is_poc": "unknown",
      "kind": "listed by PoC Index",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "skipped",
      "owner_created_at": "2019-09-15T10:00:51Z"
    },
    {
      "repo": "btar1gan/exploit_CVE-2022-24112",
      "url": "https://github.com/btar1gan/exploit_CVE-2022-24112",
      "created_at": "2024-06-03T17:33:59Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 1,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2021-10-18T11:48:10Z"
    },
    {
      "repo": "fatkz/CVE-2022-24112",
      "url": "https://github.com/fatkz/CVE-2022-24112",
      "created_at": "2025-05-23T22:09:27Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 0,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2020-07-14T21:42:18Z"
    }
  ],
  "remediation": null,
  "exploit_refs": [
    {
      "url": "https://www.exploit-db.com/exploits/50829",
      "source": "exploitdb",
      "title": "Apache APISIX 2.12.1 - Remote Code Execution (RCE)",
      "published_at": "2022-03-16T00:00:00Z",
      "first_seen_at": "2026-11-14T10:26:36.149Z"
    },
    {
      "url": "https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/apache_apisix_api_default_token_rce.rb",
      "source": "metasploit",
      "title": "Metasploit exploit: APISIX Admin API default access token RCE (exploit/multi/http/apache_apisix_api_default_token_rce)",
      "published_at": "2022-03-02T00:43:04Z",
      "first_seen_at": "2026-11-14T10:26:36.149Z"
    },
    {
      "url": "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2022/CVE-2022-24112.yaml",
      "source": "nuclei",
      "title": "nuclei template: Apache APISIX - Remote Code Execution",
      "published_at": "2023-04-27T04:28:59Z",
      "first_seen_at": "2026-11-14T10:26:36.149Z"
    }
  ],
  "hunt_profile": [
    {
      "method": "POST",
      "path_template": "/apisix/batch-requests",
      "headers": [
        {
          "name": "Accept",
          "value": "*/*"
        },
        {
          "name": "Accept-Language",
          "value": "zh-CN,zh;q=0.9"
        },
        {
          "name": "X-Api-Key",
          "value": "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\""
      ],
      "content_type": "application/json",
      "ports": [
        2379,
        2380,
        9080,
        9090
      ],
      "user_agents": [
        "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"
      ],
      "protocol": "http",
      "repos": [
        "Acczdy/CVE-2022-24112_POC",
        "CrackerCat/CVE-2022-24112",
        "Mr-xn/CVE-2022-24112",
        "fatkz/CVE-2022-24112",
        "twseptian/cve-2022-24112"
      ],
      "repo_count": 5,
      "confidence": 0.85,
      "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"
      ]
    },
    {
      "method": "GET",
      "path_template": "/api/test",
      "headers": [
        {
          "name": "Accept-Language",
          "value": "zh-CN,zh;q=0.9"
        }
      ],
      "content_type": "application/json",
      "user_agents": [
        "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0"
      ],
      "protocol": "http",
      "repos": [
        "Axx8/CVE-2022-24112",
        "CrackerCat/CVE-2022-24112",
        "Mr-xn/CVE-2022-24112",
        "SecNN/CVE-2022-24112"
      ],
      "repo_count": 4,
      "confidence": 0.85,
      "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"
      ]
    },
    {
      "method": "GET",
      "path_template": "/rms/fzxewh",
      "headers": [
        {
          "name": "Accept",
          "value": "*/*"
        },
        {
          "name": "X-Api-Key",
          "value": "edd1c9f034335f136f87ad84b625c8f1"
        }
      ],
      "content_type": "application/json",
      "ports": [
        2379,
        2380,
        9080,
        9090
      ],
      "user_agents": [
        "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"
      ],
      "protocol": "http",
      "repos": [
        "Acczdy/CVE-2022-24112_POC",
        "fatkz/CVE-2022-24112",
        "twseptian/cve-2022-24112"
      ],
      "repo_count": 3,
      "confidence": 0.7,
      "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"
      ]
    },
    {
      "method": "POST",
      "path_template": "/apisix/batch-requests'.strip()",
      "content_type": "application/json",
      "user_agents": [
        "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0"
      ],
      "protocol": "http",
      "repos": [
        "Axx8/CVE-2022-24112",
        "SecNN/CVE-2022-24112"
      ],
      "repo_count": 2,
      "confidence": 0.7,
      "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"
      ]
    },
    {
      "method": "GET",
      "path_template": "/apisix/admin/routes",
      "query_markers": [
        "api_key=edd1c9f034335f136f87ad84b625c8f1"
      ],
      "ports": [
        9080
      ],
      "protocol": "http",
      "repos": [
        "twseptian/cve-2022-24112"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "twseptian/cve-2022-24112/README.md:14",
        "twseptian/cve-2022-24112/README.md:119"
      ]
    },
    {
      "method": "GET",
      "path_template": "/apisix/admin/routes/",
      "ports": [
        9080
      ],
      "protocol": "http",
      "repos": [
        "twseptian/cve-2022-24112"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "twseptian/cve-2022-24112/apisix-docker/docs/en/latest/manual.md:88"
      ]
    },
    {
      "method": "GET",
      "path_template": "/apisix/batch-requests/apisix/batch-requests/apisix/batch-requests",
      "protocol": "http",
      "repos": [
        "Mah1ndra/CVE-2022-24112"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "Mah1ndra/CVE-2022-24112/apisix-exploit.go:39"
      ]
    },
    {
      "method": "GET",
      "path_template": "/hello",
      "ports": [
        9080
      ],
      "protocol": "http",
      "repos": [
        "twseptian/cve-2022-24112"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "twseptian/cve-2022-24112/apisix-docker/docs/en/latest/example.md:90",
        "twseptian/cve-2022-24112/apisix-docker/docs/en/latest/example.md:92"
      ]
    },
    {
      "method": "POST",
      "path_template": "/apisix/batch-requests/apisix/batch-requests/apisix/batch-requests",
      "protocol": "http",
      "repos": [
        "Mah1ndra/CVE-2022-24112"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "Mah1ndra/CVE-2022-24112/apisix-exploit.go:50"
      ]
    },
    {
      "method": "PUT",
      "path_template": "/apisix/admin/routes/12",
      "headers": [
        {
          "name": "X-Api-Key",
          "value": "edd1c9f034335f136f87ad84b625c8f1"
        }
      ],
      "content_type": "application/x-www-form-urlencoded",
      "ports": [
        9080
      ],
      "protocol": "http",
      "repos": [
        "twseptian/cve-2022-24112"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "twseptian/cve-2022-24112/apisix-docker/docs/en/latest/example.md:55"
      ]
    },
    {
      "method": "PUT",
      "path_template": "/apisix/admin/routes/22",
      "headers": [
        {
          "name": "X-Api-Key",
          "value": "edd1c9f034335f136f87ad84b625c8f1"
        }
      ],
      "content_type": "application/x-www-form-urlencoded",
      "ports": [
        9080
      ],
      "protocol": "http",
      "repos": [
        "twseptian/cve-2022-24112"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "twseptian/cve-2022-24112/apisix-docker/docs/en/latest/example.md:62"
      ]
    },
    {
      "method": "PUT",
      "path_template": "/apisix/admin/services/1",
      "headers": [
        {
          "name": "X-Api-Key",
          "value": "edd1c9f034335f136f87ad84b625c8f1"
        }
      ],
      "content_type": "application/x-www-form-urlencoded",
      "ports": [
        9080
      ],
      "protocol": "http",
      "repos": [
        "twseptian/cve-2022-24112"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "twseptian/cve-2022-24112/apisix-docker/docs/en/latest/example.md:35"
      ]
    },
    {
      "method": "PUT",
      "path_template": "/apisix/admin/services/2",
      "headers": [
        {
          "name": "X-Api-Key",
          "value": "edd1c9f034335f136f87ad84b625c8f1"
        }
      ],
      "content_type": "application/x-www-form-urlencoded",
      "ports": [
        9080
      ],
      "protocol": "http",
      "repos": [
        "twseptian/cve-2022-24112"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "twseptian/cve-2022-24112/apisix-docker/docs/en/latest/example.md:45"
      ]
    },
    {
      "method": "PUT",
      "path_template": "/apisix/admin/ssl/1",
      "headers": [
        {
          "name": "X-Api-Key",
          "value": "edd1c9f034335f136f87ad84b625c8f1"
        }
      ],
      "content_type": "application/x-www-form-urlencoded",
      "ports": [
        9080
      ],
      "protocol": "http",
      "repos": [
        "twseptian/cve-2022-24112"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "twseptian/cve-2022-24112/apisix-docker/docs/en/latest/example.md:69"
      ]
    },
    {
      "method": "PUT",
      "path_template": "/apisix/admin/ssl/2",
      "headers": [
        {
          "name": "X-Api-Key",
          "value": "edd1c9f034335f136f87ad84b625c8f1"
        }
      ],
      "content_type": "application/x-www-form-urlencoded",
      "ports": [
        9080
      ],
      "protocol": "http",
      "repos": [
        "twseptian/cve-2022-24112"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "twseptian/cve-2022-24112/apisix-docker/docs/en/latest/example.md:76"
      ]
    }
  ],
  "rules": []
}
