# WP AutoTerms <= 3.0.7 - Unauthenticated DOM-Based Cross-Site Scripting via Cookie Consent Preview postMessage Handler

- **ID:** WPSEC-2026-1236
- **Plugin:** TermsFeed AutoTerms: Privacy Policy Generator, Cookie Consent, GDPR, CCPA, Terms & Conditions, Disclaimers, Cookies Policy, EULA (`auto-terms-of-service-and-privacy-policy`), https://wordpress.org/plugins/auto-terms-of-service-and-privacy-policy/
- **Affected versions:** from 3.0.0 before 3.0.8
- **Fixed in:** 3.0.8 (Update to 3.0.8 or later.)
- **Severity:** Medium 6.1 (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N)
- **Weakness:** CWE-79
- **Usage among sites WPSec scans:** plugin Medium, affected versions Medium (as of 2026-10-18)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/auto-terms-of-service-and-privacy-policy
- **Fix released:** 2026-10-17
- **Published:** 2026-10-18
- **URL:** https://wpsec.com/vuln/WPSEC-2026-1236/

## Description

The TermsFeed AutoTerms plugin for WordPress is vulnerable to DOM-Based Cross-Site Scripting via the Cookie Consent preview page (preview/cookie-consent.php) in versions 3.0.0 up to, and including, 3.0.7. This is due to the directly accessible preview page accepting postMessage data from any origin, without checking the message origin or source, and passing it to the Cookie Consent library, which inserts the configuration text into the page. This makes it possible for unauthenticated attackers to inject arbitrary web scripts that run in the context of the site if they can trick a user into visiting a malicious page that frames or opens the preview page and sends it a crafted message.

## References

- https://wpsec.com/vuln/WPSEC-2026-1236/
- https://plugins.svn.wordpress.org/auto-terms-of-service-and-privacy-policy/tags/3.0.8/
- https://wordpress.org/plugins/auto-terms-of-service-and-privacy-policy/

Source: WPSec, https://wpsec.com/vuln/WPSEC-2026-1236/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Free to use, share and adapt, also commercially, if you credit WPSec and link to this advisory.
