# AMP for WP <= 1.1.19 - Unauthenticated Stored Cross-Site Scripting via AMP Content Filter Attribute-Boundary Shift

- **ID:** WPSEC-2026-2691
- **Plugin:** AMP for WP – Accelerated Mobile Pages (`accelerated-mobile-pages`), https://wordpress.org/plugins/accelerated-mobile-pages/
- **Affected versions:** from 0.9.33 before 1.1.20
- **Fixed in:** 1.1.20 (Update to 1.1.20 or later.)
- **Severity:** High 7.2 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N)
- **Weakness:** CWE-79
- **Usage among sites WPSec scans:** plugin Medium, affected versions Low (as of 2026-11-07)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/accelerated-mobile-pages
- **Fix released:** 2026-11-06
- **Published:** 2026-11-07
- **URL:** https://wpsec.com/vuln/WPSEC-2026-2691/

## Description

The AMP for WP – Accelerated Mobile Pages plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the AMP output buffer filter (ampforwp_the_content_filter_full) in all versions up to, and including, 1.1.19, due to quote-unaware regular-expression rewriting of the fully rendered AMP page. The filter removes 'onclick=' sequences up to the next '>' and '<g...>' sequences, among others. When that text appears inside an attribute value that passed kses filtering, such as the title of a link in a comment, the closing quote is removed and the text that follows becomes live attributes. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected AMP page.

## References

- https://wpsec.com/vuln/WPSEC-2026-2691/
- https://plugins.svn.wordpress.org/accelerated-mobile-pages/tags/1.1.20/
- https://wordpress.org/plugins/accelerated-mobile-pages/

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

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.
