# CVE-2022-24112: apisix/batch-requests plugin allows overwriting the X-REAL-IP header

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.8
- **CVSS:** 9.8 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Yes: in CISA KEV since 2022-08-25; federal due date 2022-09-15
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 95.45% (percentile 100, 2026-11-26)
- **CWE:** CWE-290
- **Aliases:** EDB-50829
- **Published:** 2022-02-11T12:20:13.000Z
- **Modified:** 2026-06-17T04:31:18.883Z

## Who should check

- Anyone running Apache Software Foundation Apache APISIX \>= Apache APISIX 2.12, \< 2.12.1; \>= Apache APISIX 2.10, \< 2.10.4; \>= 1.3, \< Apache APISIX 1\*

## 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.

## Affected and fixed versions

- Apache Software Foundation Apache APISIX: \>= Apache APISIX 2.12, \< 2.12.1; \>= Apache APISIX 2.10, \< 2.10.4; \>= 1.3, \< Apache APISIX 1\* (cvelist)

## Mitigation

- Vendor 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.

## Timeline

- 2022-02-11: Published
- 2022-08-25: Added to CISA KEV (exploited in the wild)
- 2022-09-15: CISA remediation due date for US federal agencies
- 2026-06-17: Last modified

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-24112. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-24112.md
Affected: Apache Software Foundation Apache APISIX >= Apache APISIX 2.12, < 2.12.1; >= Apache APISIX 2.10, < 2.10.4; >= 1.3, < Apache APISIX 1*
Fixed in: Apache Software Foundation Apache APISIX 2.12.1, Apache Software Foundation Apache APISIX 2.10.4

Steps:
1. Search this machine and project for Apache Software Foundation Apache APISIX: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-24112 being exploited?

Yes. CISA lists CVE-2022-24112 in its Known Exploited Vulnerabilities catalog since 2022-08-25, which means attacks have been seen. Public exploit code or a proof of concept is available. EPSS estimates a 95.45% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-24112?

Critical: CVSS 9.8 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2022-24112?

Apache Software Foundation Apache APISIX \>= Apache APISIX 2.12, \< 2.12.1; \>= Apache APISIX 2.10, \< 2.10.4; \>= 1.3, \< Apache APISIX 1\*.

### Is there a fix for CVE-2022-24112?

Yes. Fixed in Apache Software Foundation Apache APISIX 2.12.1, Apache Software Foundation Apache APISIX 2.10.4. Vendor 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.

### How do I check if I'm affected by CVE-2022-24112?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://lists.apache.org/thread/lcdqywz8zy94mdysk7p3gfdgn51jmt94>
- exploit: <http://packetstormsecurity.com/files/166228/Apache-APISIX-Remote-Code-Execution.html>
- exploit: <http://packetstormsecurity.com/files/166328/Apache-APISIX-2.12.1-Remote-Code-Execution.html>
- exploit: <https://www.exploit-db.com/exploits/50829>
- other: <http://www.openwall.com/lists/oss-security/2022/02/11/3>
- other: <https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2022-24112>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-24112>
- Exploit-DB: Exploit metadata (ID and link only) from the Exploit Database <https://www.exploit-db.com/exploits/50829>
- CISA KEV: CISA Known Exploited Vulnerabilities Catalog <https://www.cisa.gov/known-exploited-vulnerabilities-catalog>

HTML: <https://flawdb.com/CVE-2022-24112> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-24112>
