# CVE-2022-25757: Apache APISIX: the body_schema check in request-validation plugin can be bypassed

- Severity: Critical 9.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.48%, higher than 85% of CVEs (2026-12-01)
- Published: 2022-03-28T07:00:16.000Z
- Modified: 2026-09-08T08:45:31.063Z
- Also known as: BIT-APISIX-2022-25757
- Weaknesses: CWE-20
- Assigned by: apache

## Description

In Apache APISIX before 2.13.0, when decoding JSON with duplicate keys, lua-cjson will choose the last occurred value as the result. By passing a JSON with a duplicate key, the attacker can bypass the body_schema validation in the request-validation plugin. For example, `{"string_payload":"bad","string_payload":"good"}` can be used to hide the "bad" input. Systems satisfy three conditions below are affected by this attack: 1. use body_schema validation in the request-validation plugin 2. upstream application uses a special JSON library that chooses the first occurred value, like jsoniter or gojay 3. upstream application does not validate the input anymore. The fix in APISIX is to re-encode the validated JSON input back into the request body at the side of APISIX. Improper Input Validation vulnerability in __COMPONENT__ of Apache APISIX allows an attacker to __IMPACT__. This issue affects Apache APISIX Apache APISIX version 2.12.1 and prior versions.

(As written by CVE List.)

## Affected

- Apache Software Foundation Apache APISIX: from Apache APISIX up to 2.12.1
- apache apisix: before 2.13.0
- apisix (Bitnami): before 2.13.0

## Every score

- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 6.8 Medium `AV:N/AC:M/Au:N/C:P/I:P/A:P`
- Bitnami Vulnerability Database: rating Critical

## References

- <https://lists.apache.org/thread/03vd2j81krxmpz6xo8p1dl642flpo6fv> (advisory, mailing-list, vendor-advisory)
- <http://www.openwall.com/lists/oss-security/2022/03/28/2> (advisory, mailing-list, third-party-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-25757> (web)

## Sources

- CVE List: [CVE-2022-25757](https://www.cve.org/CVERecord?id=CVE-2022-25757), CVE Terms of Use, modified 2024-08-03
- NVD: [CVE-2022-25757](https://nvd.nist.gov/vuln/detail/CVE-2022-25757), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-APISIX-2022-25757](https://osv.dev/vulnerability/BIT-APISIX-2022-25757), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2022-25757 · Whole record: https://cve.day/CVE-2022-25757.json · Rebuilt by cve.day 2026-11-25T22:58:10.287Z
