Skip to main content
Mallory
CriticalExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2022-24112: Apache APISIX batch-requests IP restriction bypass and RCE

Published Feb 11, 2022 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS9.8Critical · v3.1
EPSS96.1%100th percentile
CISA KEVYesAdded Aug 25, 2022
In the wildActivePer CISA KEV
Vendor
Apache Software Foundation
IdentifiersCVE-2022-24112CWE-290 · Authentication Bypass by Spoofing

CVE-2022-24112 is an IP restriction bypass vulnerability in the Apache APISIX batch-requests plugin. A faulty check intended to override the client IP with the actual remote IP can be bypassed, allowing attackers to submit requests that circumvent Admin API IP restrictions. Default configurations using the default API key are vulnerable to remote code execution. Changing the admin key or separating the Admin API port from the data panel reduces the impact, but data-panel IP restrictions can remain bypassable.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can bypass Admin API IP-based access controls and enable remote code execution in a default Apache APISIX configuration using the default API key. Deployments with a changed admin key or a separate Admin API port have reduced impact but may still permit bypass of data-panel IP restrictions. Apache APISIX CVE-2022-24112 has been identified among vulnerabilities exploited by PRC state-sponsored cyber actors.

Mitigation

If you can’t patch tonight, do this now.

Replace the default admin API key and configure the Admin API on a port different from the data panel. These changes reduce impact but do not eliminate the residual risk of bypassing data-panel IP restrictions.

Remediation

Patch, then assume compromise.

Update Apache APISIX to a release that fixes CVE-2022-24112, prioritizing remediation because the vulnerability has been exploited. A specific fixed release is not identified in the available information.

Public exploits

Exploits

6 exploits validated by Mallory's analysis. Hidden: 1 rejected by Mallory's analysis as not a working exploit; 1 not yet analyzed, such as Exploit-DB entries.

View more in app →
apache_apisix_api_default_token_rce.rbThis repository contains a single Metasploit module targeting Apache APISIX's admin API. The exploit leverages the default API token (edd1c9f034335f136f87ad84b625c8f1) to authenticate and interact with the admin API, exploiting two CVEs (CVE-2020-13945 and CVE-2022-24112). The module can bypass IP restrictions using the batch-requests plugin and achieves remote code execution by injecting Lua code via the 'script' or 'filter_func' parameters in route definitions. The default payload is a Unix reverse shell, but any Metasploit-compatible payload can be used. The module is operational and weaponized, providing reliable RCE against vulnerable APISIX deployments. The main endpoints targeted are '/apisix/admin/routes' and '/apisix/batch-requests'. The code is well-structured, with clear separation of checking, exploitation, and cleanup logic, and is intended for use within the Metasploit framework.Disclosed Dec 7, 2020 · Framework: metasploit · ruby · networkWeaponizedApache-APISIX-CVE-2022-24112This repository contains a Python exploit script (apisix-exploit.py) targeting Apache APISIX instances vulnerable to CVE-2022-24112. The exploit abuses the batch-requests plugin and a misconfiguration in the Admin API (default API key and accessible port) to achieve remote code execution. The script sends a crafted batch request to the /apisix/batch-requests endpoint, creating a new route with a malicious filter_func that executes a reverse shell payload via os.execute in Lua. The attacker must supply the target URL, their own host, and port for the reverse shell. The exploit then triggers the payload by accessing the newly created route. The repository also includes a README.md that explains the vulnerability, its impact, and remediation steps. The exploit is operational and provides a working reverse shell if the target is vulnerable and misconfigured.M4xSec · Disclosed Mar 16, 2022 · python · networkOperationalCVE-2022-24112-POCThis repository contains a proof-of-concept exploit (poc.py) for CVE-2022-24112, a remote code execution vulnerability in Apache APISIX versions 1.3 through 2.12.1. The exploit abuses the default admin API key and an IP restriction bypass to inject a malicious route via the /apisix/batch-requests endpoint. The injected route contains a Lua filter function that executes a bash reverse shell, connecting back to an attacker-controlled host and port (lhost:lport). The exploit is operational, requiring the attacker to provide the target URL, their own host, and port for the reverse shell. The README provides a brief description and a link to a full walkthrough. The main code file is poc.py, written in Python, and the exploit is not part of a larger framework. The exploit targets network-exposed APISIX admin APIs with default credentials and demonstrates a practical remote code execution scenario.kavishkagihan · Disclosed Mar 17, 2022 · python · networkOperationalCVE-2022-24112_POCThis repository contains two Python exploit scripts targeting CVE-2022-24112, a remote code execution vulnerability in Apache APISIX versions 1.3 through 2.12.1. The vulnerability arises from insufficient restrictions in the batch-requests plugin, allowing attackers to bypass Admin API IP restrictions and inject routes with malicious Lua code. Both scripts (one for Linux, one for Windows) automate the exploitation process: they send a crafted POST request to the '/apisix/batch-requests' endpoint to create a new route with a filter_func that executes a reverse shell payload. The payload connects back to an attacker-controlled host and port, granting remote shell access. The exploit then triggers the payload by sending a GET request to the newly created route ('/rms/fzxewh'). The repository also includes a README.md with usage instructions and background on the vulnerability. The scripts require the attacker to provide the target's address, their own host, and port for the reverse shell. The exploit is operational and provides a working reverse shell if the target is vulnerable and accessible.Acczdy · Disclosed Dec 3, 2022 · python · networkOperationalexploit_CVE-2022-24112This repository provides a working exploit for CVE-2022-24112, a remote code execution vulnerability in Apache APISIX. The exploit consists of two Python scripts: - 50829_1.py: Sends a crafted POST request to the APISIX admin API, injecting a new route with a malicious Lua filter function. This function executes a bash reverse shell, connecting back to the attacker's machine (192.168.45.175:1234). - 50829_2.py: Triggers the injected route via a GET request, causing the malicious code to execute and establish the reverse shell. The exploit targets APISIX instances with exposed and unprotected admin APIs. The payload is a reverse shell, and the scripts are operational, requiring only minor modifications (such as target and attacker IPs) to use in a real attack. The repository is structured simply, with clear separation between the injection and trigger phases, and includes a README with basic usage instructions.btar1gan · Disclosed Jun 3, 2024 · python · networkOperationalCVE-2022-24112This repository contains a Python proof-of-concept exploit (exploit.py) targeting a remote code execution vulnerability in Apache APISIX versions 2.12.0 and 2.12.1. The exploit abuses the admin API's 'filter_func' Lua field to inject arbitrary Lua code, which is used to execute system commands on the server via io.popen. The exploit works by sending a crafted HTTP POST request to the /apisix/batch-requests endpoint, injecting a new route with the malicious filter_func. The attacker then triggers this route via a GET request to /rms/fzxewh, causing the server to execute the supplied command and return its output. The exploit requires the admin API to be accessible and the default API key to be valid. The repository consists of a single exploit script and a README with usage instructions. No detection or fake code is present; the exploit is functional and demonstrates the vulnerability.fatkz · Disclosed May 23, 2025 · python · networkPoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Apache Software FoundationApisixapplication
FAQ

Frequently asked questions

Is CVE-2022-24112 exploited in the wild?
Yes. As of Oct 16, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Aug 25, 2022.
Is there a public exploit for CVE-2022-24112?
Yes. Mallory tracks 6 public exploits or proofs of concept for CVE-2022-24112, the earliest disclosed Dec 7, 2020.
Is there a patch for CVE-2022-24112?
Update Apache APISIX to a release that fixes CVE-2022-24112, prioritizing remediation because the vulnerability has been exploited. A specific fixed release is not identified in the available information.
What products are affected by CVE-2022-24112?
Apache Software Foundation Apisix.
How severe is CVE-2022-24112?
CVE-2022-24112 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 96.1% (100th percentile) as of Oct 16, 2026.
Activity feed

Recent activity

2 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malware1Malware families linked to this CVE, with evidence and IOCs.
Detection signatures4YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activityCommunity discussion across Reddit, Mastodon, and other social sources.