Skip to main content
Vulnerability Database/CVE-2026-83591

CVE-2026-83591: AMP for WP WordPress Plugin XSS Vulnerability

CVE-2026-83591 is a stored cross-site scripting vulnerability in the AMP for WP WordPress plugin that lets unauthenticated attackers inject malicious scripts through comment content. This article covers technical details, affected versions, potential impact, and recommended mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-83591 Overview

CVE-2026-83591 is a Stored Cross-Site Scripting [CWE-79] vulnerability in the AMP for WP – Accelerated Mobile Pages plugin for WordPress. The flaw affects all versions up to and including 1.1.16. Unauthenticated attackers can inject arbitrary JavaScript through comment content, which executes whenever a user views the affected page. The vulnerability stems from insufficient input sanitization and output escaping during a regex-based comment transformation. The AMP sanitizer pipeline fails to block the javascript: URI scheme, allowing the malicious payload to survive both the comment save filter and the AMP output stage.

Critical Impact

Unauthenticated attackers can store malicious JavaScript in blog comments that executes in every visitor's browser, enabling session theft, account takeover, and arbitrary actions in the context of logged-in users including administrators.

Affected Products

  • AMP for WP – Accelerated Mobile Pages plugin for WordPress
  • All plugin versions up to and including 1.1.16
  • Any WordPress site exposing comments through the AMP-rendered templates

Discovery Timeline

  • 2026-09-25 - CVE-2026-83591 published to the National Vulnerability Database
  • 2026-09-25 - Last updated in NVD database

Technical Details for CVE-2026-83591

Vulnerability Analysis

The vulnerability resides in the AMP for WP comments processing path, specifically in the components and functions referenced by components/comments/comments.php and includes/features/functions.php. The plugin performs a regex-based transformation on comment content as part of its AMP conversion pipeline. During this transformation, user-supplied values permitted by WordPress's default comment allowlist, specifically <a href="" title="">, are reinserted into the output without re-validating the href URI scheme.

Because the AMP sanitizer pipeline omits blocking of the javascript: protocol, an anchor tag containing a javascript: URL survives sanitization and reaches the rendered page. When a visitor clicks the crafted link, or in some payload variants when the page simply loads, the attacker's script executes in the victim's browser.

The stored nature of the flaw amplifies impact. A single posted comment affects every visitor to the comment thread until an administrator removes the entry.

Root Cause

The root cause is improper neutralization of input during web page generation [CWE-79]. The comment save filter accepts anchors with href and title attributes without stripping dangerous URI schemes. The subsequent AMP regex transformation reconstructs the markup without applying URI allowlisting, and the final AMP output stage does not re-sanitize the attribute. All three layers trust the preceding layer, which produces a cumulative sanitization gap.

Attack Vector

The attack is unauthenticated and network-reachable. An attacker submits a crafted comment on any post that renders through AMP for WP. The payload uses only WordPress-permitted tags, specifically an anchor element with href set to a javascript: URI and a title attribute. Once stored, the payload fires whenever a user interacts with the injected link in the AMP-rendered page, executing script in the user's session context. See the Wordfence Vulnerability Report and the WordPress AMP Changeset for the exact code paths involved.

Detection Methods for CVE-2026-83591

Indicators of Compromise

  • Comment rows in wp_comments where comment_content contains anchor tags with href values beginning with javascript:.
  • AMP-rendered pages that return HTML containing <a elements with non-http(s) or non-mailto URI schemes.
  • Unexpected outbound requests from visitor browsers to attacker-controlled domains originating from AMP comment pages.
  • Spikes in anonymous comment submissions containing encoded variants such as javascript: or mixed-case JaVaScRiPt:.

Detection Strategies

  • Scan the WordPress database for stored comments matching the pattern href\s*=\s*['\"]\s*j[\s]*a[\s]*v[\s]*a[\s]*s[\s]*c[\s]*r[\s]*i[\s]*p[\s]*t\s*:.
  • Crawl AMP endpoints such as /?amp or /amp/ and inspect returned markup for dangerous URI schemes in anchor attributes.
  • Correlate web server access logs for POST requests to wp-comments-post.php immediately followed by anomalous outbound traffic from client browsers.

Monitoring Recommendations

  • Enable Web Application Firewall rules that block comment submissions containing javascript: URIs in HTML attributes.
  • Alert on administrative actions originating from unusual IPs or user agents shortly after visits to AMP comment pages, which may indicate session hijacking.
  • Monitor file integrity for components/comments/comments.php and includes/features/functions.php to detect tampering or unauthorized rollback.

How to Mitigate CVE-2026-83591

Immediate Actions Required

  • Update the AMP for WP – Accelerated Mobile Pages plugin to a version later than 1.1.16 as soon as the vendor publishes a fix.
  • Audit existing comments for anchor tags containing javascript:, data:, or vbscript: URI schemes and delete or sanitize matching entries.
  • Rotate administrator and editor session cookies and reset credentials for any account that viewed infected AMP pages while authenticated.
  • Temporarily disable comments on AMP-rendered pages if a patched release is not yet available.

Patch Information

Reference the WordPress AMP Changeset for the committed source changes and the Wordfence Vulnerability Report for vendor remediation status. The vulnerable code paths are documented in the WordPress AMP Comments Component and WordPress AMP Functions File. Administrators should verify installed version via wp plugin list and apply the plugin update through the WordPress admin dashboard or wp-cli.

Workarounds

  • Deactivate the AMP for WP plugin until a patched version is installed.
  • Deploy a WAF rule that rejects comment POST bodies matching href\s*=\s*["']?\s*javascript: and encoded equivalents.
  • Set comment_registration to 1 in WordPress options to require account registration before commenting, reducing anonymous abuse.
  • Add a server-side filter hook on preprocess_comment to strip javascript: URIs from anchor attributes before the comment is saved.
bash
# Configuration example: enforce comment registration and disable AMP comments
wp option update comment_registration 1
wp option update default_comment_status closed
wp plugin deactivate accelerated-mobile-pages

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.