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

- Priority: **Prioritise**
- Reason: Severe, CVSS 9.8 (NVD); no exploitation reported by the 5 checked sources; EPSS 2% (FIRST, 04-12-2026)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2022-03-28 · Modified: 2024-08-03
- Record: https://cvemate.com/vulnerability/CVE-2022-25757 · JSON: https://cvemate.com/vulnerability/CVE-2022-25757/json

## Description

```text
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.
```

## Signals

- CVSS: 9.8 critical (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS: 2.481%, percentile 85.112%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- apache software foundation apache apisix: ≥ Apache APISIX, ≤ 2.12.1
- apache apisix: \< 2.13.0

## References

- <https://lists.apache.org/thread/03vd2j81krxmpz6xo8p1dl642flpo6fv>
- <http://www.openwall.com/lists/oss-security/2022/03/28/2>

---

Data as of 2026-12-05T07:50:55.684Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
