SureCookie <= 1.6.1 - Authenticated (Contributor+) Stored Cross-Site Scripting via 'data-surecookie-restore' Attribute
- ID
- WPSEC-2026-1297
- Plugin
- SureCookie – GDPR Cookie Consent Banner, Cookie Scanner & Script Blocking (surecookie)
- Affected
- from 1.5.0 before 1.7.0
- Remediation
- Update to 1.7.0 or later.
- CVSS 3.1
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Weakness
- CWE-79
- Usage
- Plugin Low · Affected versions Low among sites WPSec scans, 2026-10-21
- Attack surface
- SureCookie on WPSec AttackSurface
- Fix released
- Published
Description
The SureCookie plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'data-surecookie-restore' HTML attribute of Presto Player placeholder elements in all versions up to, and including, 1.6.1. This is due to the plugin's front-end script trusting any element with the 'surecookie-placeholder-presto' class and a consent category: it parses the element's 'data-surecookie-restore' value as HTML, inserts it into the page and re-creates any script elements it contains as executable scripts. WordPress's KSES filtering allows class and data-* attributes on div elements in post content, so this markup survives. This makes it possible for authenticated attackers with contributor-level access and above, who lack the unfiltered_html capability, to inject arbitrary web scripts into pages that will execute whenever a user accesses an injected page.
References
- https://wpsec.com/vuln/WPSEC-2026-1297/
- https://plugins.svn.wordpress.org/surecookie/tags/1.7.0/
- https://wordpress.org/plugins/surecookie/
Published by WPSec. Provided as is, without warranty. Corrections: contact us.
This advisory as JSON or Markdown · All advisories: JSON, RSS