{
  "containers": {
    "cna": {
      "affected": [
        {
          "product": "Apache APISIX",
          "vendor": "Apache Software Foundation",
          "versions": [
            {
              "lessThan": "2.12.1",
              "status": "affected",
              "version": "Apache APISIX 2.12",
              "versionType": "custom"
            },
            {
              "lessThan": "2.10.4",
              "status": "affected",
              "version": "Apache APISIX 2.10",
              "versionType": "custom"
            },
            {
              "lessThan": "Apache APISIX 1*",
              "status": "affected",
              "version": "1.3",
              "versionType": "custom"
            }
          ]
        }
      ],
      "credits": [
        {
          "lang": "en",
          "value": "Original discovery by Real World CTF at Chaitin Tech. Reported by Sauercloud."
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "An attacker can abuse the batch-requests plugin to send requests to bypass the IP restriction of Admin API.\nA default configuration of Apache APISIX (with default API key) is vulnerable to remote code execution.\nWhen the admin key was changed or the port of Admin API was changed to a port different from the data panel, the impact is lower. But there is still a risk to bypass the IP restriction of Apache APISIX's data panel.\n\nThere is a check in the batch-requests plugin which overrides the client IP with its real remote IP. But due to a bug in the code, this check can be bypassed."
        }
      ],
      "metrics": [
        {
          "other": {
            "content": {
              "other": "high"
            },
            "type": "unknown"
          }
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-290",
              "description": "CWE-290 Authentication Bypass by Spoofing",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "orgId": "Not found",
        "shortName": "Not found"
      },
      "references": [
        {
          "tags": [
            "x_refsource_CONFIRM"
          ],
          "url": "https://lists.apache.org/thread/lcdqywz8zy94mdysk7p3gfdgn51jmt94"
        }
      ],
      "source": {
        "discovery": "UNKNOWN"
      },
      "title": "apisix/batch-requests plugin allows overwriting the X-REAL-IP header",
      "workarounds": [
        {
          "lang": "en",
          "value": "1. explicitly configure the enabled plugins in `conf/config.yaml`, ensure `batch-requests` is disabled. (Or just comment out `batch-requests` in `conf/config-default.yaml`)\nOr\n1. upgrade to 2.10.4 or 2.12.1."
        }
      ],
      "x_ValidationErrors": [
        "$.cveMetadata.assignerOrgId -- validator = pattern",
        "$.containers.cna.providerMetadata.orgId -- validator = pattern"
      ],
      "x_generator": {
        "engine": "Vulnogram 0.0.9"
      },
      "x_legacyV4Record": {
        "CNA_private": {
          "CVE_list": [],
          "CVE_table_description": [],
          "email": "",
          "emailed": "",
          "internal_comments": "",
          "owner": "apisix",
          "publish": {
            "month": "",
            "year": "",
            "ym": ""
          },
          "share_with_CVE": true,
          "todo": [],
          "userslist": "dev@apisix.apache.org"
        },
        "CVE_data_meta": {
          "AKA": "",
          "ASSIGNER": "security@apache.org",
          "DATE_PUBLIC": "",
          "ID": "CVE-2022-24112",
          "STATE": "PUBLIC",
          "TITLE": "apisix/batch-requests plugin allows overwriting the X-REAL-IP header"
        },
        "affects": {
          "vendor": {
            "vendor_data": [
              {
                "product": {
                  "product_data": [
                    {
                      "product_name": "Apache APISIX",
                      "version": {
                        "version_data": [
                          {
                            "platform": "",
                            "version_affected": "<",
                            "version_name": "Apache APISIX 2.12",
                            "version_value": "2.12.1"
                          },
                          {
                            "platform": "",
                            "version_affected": "<",
                            "version_name": "Apache APISIX 2.10",
                            "version_value": "2.10.4"
                          },
                          {
                            "platform": "",
                            "version_affected": ">=",
                            "version_name": "Apache APISIX 1",
                            "version_value": "1.3"
                          }
                        ]
                      }
                    }
                  ]
                },
                "vendor_name": "Apache Software Foundation"
              }
            ]
          }
        },
        "configuration": [],
        "credit": [
          {
            "lang": "eng",
            "value": "Original discovery by Real World CTF at Chaitin Tech. Reported by Sauercloud."
          }
        ],
        "data_format": "MITRE",
        "data_type": "CVE",
        "data_version": "4.0",
        "description": {
          "description_data": [
            {
              "lang": "eng",
              "value": "An attacker can abuse the batch-requests plugin to send requests to bypass the IP restriction of Admin API.\nA default configuration of Apache APISIX (with default API key) is vulnerable to remote code execution.\nWhen the admin key was changed or the port of Admin API was changed to a port different from the data panel, the impact is lower. But there is still a risk to bypass the IP restriction of Apache APISIX's data panel.\n\nThere is a check in the batch-requests plugin which overrides the client IP with its real remote IP. But due to a bug in the code, this check can be bypassed."
            }
          ]
        },
        "exploit": [],
        "generator": {
          "engine": "Vulnogram 0.0.9"
        },
        "impact": [
          {
            "other": "high"
          }
        ],
        "problemtype": {
          "problemtype_data": [
            {
              "description": [
                {
                  "lang": "eng",
                  "value": "CWE-290 Authentication Bypass by Spoofing"
                }
              ]
            }
          ]
        },
        "references": {
          "reference_data": [
            {
              "name": "",
              "refsource": "CONFIRM",
              "url": "https://lists.apache.org/thread/lcdqywz8zy94mdysk7p3gfdgn51jmt94"
            }
          ]
        },
        "solution": [],
        "source": {
          "advisory": "",
          "defect": [],
          "discovery": "UNKNOWN"
        },
        "timeline": [],
        "work_around": [
          {
            "lang": "en",
            "value": "1. explicitly configure the enabled plugins in `conf/config.yaml`, ensure `batch-requests` is disabled. (Or just comment out `batch-requests` in `conf/config-default.yaml`)\nOr\n1. upgrade to 2.10.4 or 2.12.1."
          }
        ]
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "Not found",
    "assignerShortName": "Not found",
    "cveId": "CVE-2022-24112",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.0"
}