BIT-apisix-2022-25757

See a problem?
Import Source
https://github.com/bitnami/vulndb/tree/main/data/apisix/BIT-apisix-2022-25757.json
JSON Data
https://api.osv.dev/v1/vulns/BIT-apisix-2022-25757
Aliases
Published
2024-03-06T10:50:56.297Z
Modified
2025-04-03T14:40:37.652Z
Summary
[none]
Details

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

Database specific
{
    "cpes": [
        "cpe:2.3:a:apache:apisix:*:*:*:*:*:*:*:*"
    ],
    "severity": "Critical"
}
References

Affected packages

Bitnami / apisix

Package

Name
apisix
Purl
pkg:bitnami/apisix

Severity

  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.13.0