Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2024-13361

CVE-2024-13361: AI Power WordPress Auth Bypass Vulnerability

CVE-2024-13361 is an authorization bypass flaw in AI Power WordPress plugin that lets authenticated subscribers upload images and inject malicious shortcodes. This article covers technical details, affected versions, and mitigation.

Updated:

CVE-2024-13361 Overview

CVE-2024-13361 affects the AI Power: Complete AI Pack plugin for WordPress in all versions up to and including 1.8.96. The vulnerability stems from a missing capability check on the wpaicg_save_image_media function. Authenticated attackers with Subscriber-level access or above can upload image files and embed shortcode attributes in the image_alt value. These shortcodes execute when a POST request is sent to the attachment page. The flaw maps to [CWE-862] Missing Authorization and impacts confidentiality, integrity, and availability of affected WordPress installations.

Critical Impact

Low-privileged authenticated users can inject and execute WordPress shortcodes through image metadata, enabling unauthorized actions on the site.

Affected Products

  • AI Power: Complete AI Pack plugin for WordPress
  • All versions up to and including 1.8.96
  • WordPress sites permitting Subscriber-level or higher registrations

Discovery Timeline

  • 2025-01-22 - CVE-2024-13361 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-13361

Vulnerability Analysis

The AI Power plugin exposes the wpaicg_save_image_media function without a proper capability check. WordPress uses capability checks such as current_user_can() to gate privileged actions. The plugin omits this gate, allowing any authenticated user, including Subscribers, to invoke the function. The function accepts arbitrary image_alt input and stores it as image attachment metadata. When the attachment page later processes this metadata, embedded WordPress shortcodes are rendered and executed. Shortcodes in WordPress can trigger server-side actions, invoke plugin functionality, and disclose or modify data. This turns a metadata field into an execution primitive available to the lowest-privileged authenticated role.

Root Cause

The root cause is broken access control [CWE-862]. The wpaicg_save_image_media handler in classes/wpaicg_image.php lacks both a capability check and input sanitization for the image_alt parameter. WordPress AJAX and admin-post endpoints require explicit authorization logic per action. The absence of this check collapses the boundary between Subscribers and privileged roles.

Attack Vector

An attacker registers or uses a Subscriber-level account on the target WordPress site. The attacker sends a crafted request to the vulnerable handler, uploading an image with a malicious image_alt value containing shortcodes. The attacker then triggers a POST request to the attachment page. The stored shortcodes execute in the site context, enabling further unauthorized actions consistent with an authenticated network attack.

No verified public exploit code is available. See the Wordfence Vulnerability Report for technical details.

Detection Methods for CVE-2024-13361

Indicators of Compromise

  • Unexpected image attachments created by Subscriber-level accounts with unusual image_alt metadata containing bracketed shortcode syntax such as [shortcode_name ...].
  • POST requests to /wp-admin/admin-ajax.php referencing the wpaicg_save_image_media action from low-privileged users.
  • New or modified attachment posts followed by POST requests to attachment permalinks within a short window.

Detection Strategies

  • Review WordPress access logs for authenticated requests to admin-ajax.php invoking wpaicg_save_image_media originating from non-administrative users.
  • Query the wp_postmeta table for _wp_attachment_image_alt values containing shortcode markers ([ and ]) and correlate with the uploading user role.
  • Alert on newly registered Subscriber accounts that upload media within minutes of registration on sites running the AI Power plugin.

Monitoring Recommendations

  • Ingest WordPress and web server logs into a centralized log platform and build detections for the wpaicg_save_image_media action name.
  • Monitor the plugin directory wp-content/plugins/gpt3-ai-content-generator/ for version strings at or below 1.8.96.
  • Track HTTP response anomalies on attachment pages, such as unexpected redirects or content changes after image uploads.

How to Mitigate CVE-2024-13361

Immediate Actions Required

  • Update the AI Power: Complete AI Pack plugin to a version above 1.8.96 that includes the fix from WordPress Plugin Changeset 3224162.
  • Audit existing image attachments for shortcode content in image_alt fields and remove suspicious entries.
  • Review Subscriber-level accounts created before patching and disable any that show anomalous upload activity.

Patch Information

The vendor addressed the missing capability check in the plugin source file classes/wpaicg_image.php. Site administrators should install the patched release via the WordPress plugin updater. Verify the deployed version is greater than 1.8.96 after upgrade. Reference the WordPress Plugin Changeset for the code change.

Workarounds

  • Disable the AI Power plugin until the patched version can be deployed.
  • Restrict new user registrations or set the default role below Subscriber where feasible.
  • Deploy a web application firewall rule to block admin-ajax.php requests with action=wpaicg_save_image_media from non-administrator sessions.
bash
# Configuration example: disable open registration in wp-config.php constants
# and confirm plugin version via WP-CLI
wp plugin get gpt3-ai-content-generator --field=version
wp plugin update gpt3-ai-content-generator

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

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.