Apache APISIX < 2.13.0 Input Validation

critical Nessus Plugin ID 161977

Synopsis

An application installed on the remote host is missing a vendor-supplied update.

Description

The version of Apache APISIX installed on the remote host is prior to 2.13.0. It is, therefore, potentially affected by an input validation vulnerability. 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. 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.

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.

Solution

Upgrade to Apache APISIX version 2.13.0 or later.

See Also

https://github.com/apache/apisix/blob/release/2.13/CHANGELOG.md#2130

https://lists.apache.org/thread/03vd2j81krxmpz6xo8p1dl642flpo6fv

Plugin Details

Severity: Critical

ID: 161977

File Name: apache_apisix_cve-2022-25757.nasl

Version: 1.2

Type: remote

Family: Misc.

Published: 6/9/2022

Updated: 6/13/2022

Configuration: Enable paranoid mode

Supported Sensors: Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 5.9

CVSS v2

Risk Factor: Medium

Base Score: 6.8

Temporal Score: 5

Vector: CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P

CVSS Score Source: CVE-2022-25757

CVSS v3

Risk Factor: Critical

Base Score: 9.8

Temporal Score: 8.5

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:U/RL:O/RC:C

Vulnerability Information

CPE: cpe:/a:apache:apisix

Required KB Items: Settings/ParanoidReport, installed_sw/Apache APISIX

Exploit Ease: No known exploits are available

Patch Publication Date: 3/28/2022

Vulnerability Publication Date: 3/28/2022

Reference Information

CVE: CVE-2022-25757