Skip to main content

CVE-2024-3368: Aioseo All In One Seo XSS Vulnerability

CVE-2024-3368 is a stored cross-site scripting flaw in Aioseo All In One Seo WordPress plugin allowing contributors to inject malicious scripts. This article covers technical details, affected versions, and mitigation.

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-2024-3368 Overview

CVE-2024-3368 is a stored Cross-Site Scripting (XSS) vulnerability in the All in One SEO (AIOSEO) WordPress plugin before version 4.6.1.1. The plugin fails to validate and escape certain Post fields before rendering them in the page output. Authenticated users with the Contributor role or higher can inject malicious JavaScript that executes in the browsers of other users viewing the affected content. The flaw is tracked under CWE-79 and documented in the WPScan Vulnerability Advisory.

Critical Impact

Contributor-level users can plant persistent JavaScript payloads that execute against site administrators and visitors, enabling session theft, account takeover, and content tampering.

Affected Products

  • All in One SEO (AIOSEO) WordPress plugin versions prior to 4.6.1.1
  • WordPress sites allowing Contributor or higher role registrations
  • Any WordPress installation running the vulnerable AIOSEO plugin

Discovery Timeline

  • 2024-05-20 - CVE-2024-3368 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-3368

Vulnerability Analysis

The vulnerability resides in how AIOSEO processes Post field inputs supplied through the plugin's SEO metadata interfaces. The plugin accepts user-controlled strings intended for title tags, meta descriptions, and related SEO Post fields. These values are stored in the WordPress database and later rendered without proper output encoding. When a browser requests a page containing the tainted field, the injected markup executes within the site's origin.

Because attackers need only Contributor privileges, the attack surface extends to any WordPress site that permits guest authoring, multi-author workflows, or open contributor registration. Stored XSS of this type typically targets administrators who review draft content, allowing session cookie theft, forced plugin installation, or administrative account creation.

Root Cause

The root cause is missing input validation and output escaping in the AIOSEO Post field handlers. The plugin does not apply WordPress sanitization helpers such as wp_kses, esc_html, or esc_attr before echoing stored Post field values into HTML contexts. This classifies the flaw as improper neutralization of input during web page generation [CWE-79].

Attack Vector

Exploitation requires network access to the WordPress site and an authenticated session with Contributor role or higher. The attacker edits a post, injects a JavaScript payload into a vulnerable AIOSEO Post field, and saves the post. When an administrator or editor previews or reviews the content, the payload executes in their authenticated browser session. User interaction is required, as reflected by the UI:R component of the CVSS vector.

No verified public exploit code is available for CVE-2024-3368. Technical details are described in the WPScan Vulnerability Advisory.

Detection Methods for CVE-2024-3368

Indicators of Compromise

  • Post metadata entries containing <script> tags, javascript: URIs, or event handlers such as onerror=, onload=, or onmouseover= in AIOSEO fields
  • Unexpected administrator account creation or privilege changes following content review activity
  • Outbound HTTP requests from administrator browser sessions to unknown external domains
  • Modifications to WordPress options, themes, or plugins immediately after a privileged user viewed contributor-authored content

Detection Strategies

  • Query the wp_postmeta table for AIOSEO-prefixed keys containing HTML tags or JavaScript syntax patterns
  • Deploy a Web Application Firewall rule to flag POST requests containing script payloads targeting AIOSEO endpoints
  • Audit WordPress user accounts to identify Contributor and Author accounts with recent post edits containing suspicious SEO metadata

Monitoring Recommendations

  • Enable WordPress audit logging to track post edits, user role changes, and plugin installations
  • Monitor browser Content Security Policy (CSP) violation reports for inline script execution attempts
  • Alert on administrator session activity that generates unusual API calls shortly after reviewing contributor drafts

How to Mitigate CVE-2024-3368

Immediate Actions Required

  • Update the All in One SEO plugin to version 4.6.1.1 or later through the WordPress admin dashboard
  • Review all existing posts and AIOSEO metadata for injected script content and sanitize affected entries
  • Audit Contributor and Author accounts, removing any that are inactive, unknown, or unnecessary
  • Rotate credentials and session tokens for administrators who may have reviewed malicious content

Patch Information

The vendor fixed the vulnerability in AIOSEO version 4.6.1.1 by applying proper validation and output escaping to the affected Post fields. Site operators should upgrade to the latest available release. Refer to the WPScan Vulnerability Advisory for version details.

Workarounds

  • Restrict Contributor role assignments and disable open user registration until patching is complete
  • Deploy a Content Security Policy that disallows inline script execution on WordPress admin pages
  • Place the WordPress site behind a Web Application Firewall configured to filter XSS payloads in POST parameters
  • Temporarily deactivate the AIOSEO plugin if an immediate update cannot be applied
bash
# Configuration example
# Update AIOSEO via WP-CLI
wp plugin update all-in-one-seo-pack --version=4.6.1.1

# Verify installed version
wp plugin get all-in-one-seo-pack --field=version

# Search postmeta for suspicious script content in AIOSEO fields
wp db query "SELECT post_id, meta_key FROM wp_postmeta WHERE meta_key LIKE '_aioseo_%' AND (meta_value LIKE '%<script%' OR meta_value LIKE '%onerror=%' OR meta_value LIKE '%javascript:%');"

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.