CVE-2022-25757
CVE-2022-25757 is a critical-severity vulnerability in Apache Apisix with a CVSS 3.x base score of 9.8. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-20.
Key facts
- Severity: Critical (CVSS 3.x base score 9.8)
- CVSS v2: 6.8
- EPSS exploit prediction: 2% (82nd percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-20
- Affected product: Apache Apisix
- Published:
- Last modified:
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.
Frequently asked questions
- What is CVE-2022-25757?
- 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.
- How severe is CVE-2022-25757?
- CVE-2022-25757 has a CVSS 3.x base score of 9.8, rated critical severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
- Is CVE-2022-25757 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 2% (82nd percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2022-25757?
- CVE-2022-25757 affects Apache Apisix. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2022-25757?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its critical severity, prioritise patching exposed systems.
- When was CVE-2022-25757 published?
- CVE-2022-25757 was published on 2022-03-28 and last updated on 2026-06-17.
References
- http://www.openwall.com/lists/oss-security/2022/03/28/2
- https://lists.apache.org/thread/03vd2j81krxmpz6xo8p1dl642flpo6fv
Affected products (1)
- cpe:2.3:a:apache:apisix:*:*:*:*:*:*:*:*
More vulnerabilities in Apache Apisix
- CVE-2022-24112 — Critical (CVSS 9.8): An attacker can abuse the batch-requests plugin to send requests to bypass the IP restriction of Admin API. A default…
- CVE-2026-49871 — Critical (CVSS 9.3): Cross-Site Request Forgery (CSRF) vulnerability in the cas-auth plugin under default configurations. This defect…
- CVE-2026-49230 — Critical (CVSS 9.1): Improper Validation of Integrity Check Value vulnerability in Apache APISIX. The jwe-decrypt plugin under default…
- CVE-2026-44087 — Critical (CVSS 9.1): Insufficient Verification of Data Authenticity vulnerability in Apache APISIX. The openid-connect plugin under default…
- CVE-2026-39999 — Critical (CVSS 9.1): Authentication Bypass by Spoofing vulnerability in Apache APISIX. The attacker can completely bypass authentication…
- CVE-2026-31908 — Critical (CVSS 9.1): Header injection vulnerability in Apache APISIX. The attacker can take advantage of certain configuration in…
All CVEs affecting Apache Apisix →
Other CWE-20 (Improper Input Validation) vulnerabilities
- CVE-2026-48316 — Critical (CVSS 10.0): ColdFusion versions 2025.9, 2023.20 and earlier are affected by an Improper Input Validation vulnerability that could…
- CVE-2026-48281 — Critical (CVSS 10.0): ColdFusion versions 2025.9, 2023.20 and earlier are affected by an Improper Input Validation vulnerability that could…
- CVE-2026-48277 — Critical (CVSS 10.0): ColdFusion versions 2025.9, 2023.20 and earlier are affected by an Improper Input Validation vulnerability that could…
- CVE-2026-48055 — Critical (CVSS 10.0): Streambert is a cross-platform Electron Desktop App to stream and download any video media. In versions 2.4.0 and…
- CVE-2026-34910 — Critical (CVSS 10.0): A malicious actor with access to the network could exploit an Improper Input Validation vulnerability found in UniFi OS…
- CVE-2026-33587 — Critical (CVSS 10.0): Lack of user input sanitisation in Open Notebook v1.8.3 allows the application user to execute Python code (and…
Browse all CWE-20 (Improper Input Validation) vulnerabilities →