id: unauth-spark-api

info:
  name: Unauthenticated Spark REST API
  author: princechaddha
  severity: critical
  description: The Spark product's REST API interface allows access to unauthenticated users.
  remediation: Restrict access the exposed API ports.
  reference:
    - https://xz.aliyun.com/t/2490
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
    cvss-score: 10
    cwe-id: CWE-77
  metadata:
    max-request: 1
  tags: spark,unauth

http:
  - method: GET
    path:
      - "{{BaseURL}}/v1/submissions"

    matchers-condition: and
    matchers:
      - type: status
        status:
          - 400

      - type: word
        words:
          - "Missing an action"
          - "serverSparkVersion"
        part: body
        condition: and
# digest: 490a0046304402202f92487a78834b093ac44d32716faba98e6e17c29fe02d69eac2ae2e7604a0e202202909c7781a68eccfafec436b38eb9196c6064933bd72020626ee2ffabd3683f7:922c64590222798bb761d5b6d8e72950