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-2025-11799 Overview
CVE-2025-11799 is a Stored Cross-Site Scripting [CWE-79] vulnerability in the Affiliate AI Lite plugin for WordPress. The flaw resides in the asin shortcode attribute of the affiai_img shortcode. Insufficient input sanitization and output escaping allow authenticated attackers with contributor-level access or higher to inject arbitrary JavaScript. The injected scripts execute whenever a user loads an affected page. All plugin versions up to and including 1.0.1 are affected.
Critical Impact
Contributor-level accounts can plant persistent JavaScript payloads that execute in the browsers of site visitors and administrators, enabling session theft, account takeover, or redirection attacks.
Affected Products
- Affiliate AI Lite plugin for WordPress — all versions through 1.0.1
- Vulnerable file: includes/afx-img.php
- Vulnerable component: affiai_img shortcode handler
Discovery Timeline
- 2025-11-21 - CVE-2025-11799 published to NVD
- 2026-10-07 - Last updated in NVD database
Technical Details for CVE-2025-11799
Vulnerability Analysis
The Affiliate AI Lite plugin registers a shortcode named affiai_img that renders product imagery based on an Amazon Standard Identification Number (ASIN) supplied through the asin attribute. The handler, defined in includes/afx-img.php, passes the attribute value into the rendered HTML without applying WordPress sanitization helpers such as esc_attr() or sanitize_text_field(). Any contributor who can author posts or pages can embed a malicious shortcode such as [affiai_img asin="..."] containing script-breaking characters that terminate the surrounding attribute and inject arbitrary markup.
Because the payload is persisted in post content, it executes every time an authenticated reviewer, editor, administrator, or site visitor renders the page. The scope change in the vector reflects that script runs in the browser context of other users, enabling cookie theft, forced actions through the WordPress REST API, or administrative account hijacking when a privileged user previews the submission.
Root Cause
The root cause is missing input validation and output escaping on the asin shortcode attribute. WordPress shortcode attributes are not automatically escaped on output; developers must apply context-appropriate escaping. The plugin concatenates the attacker-controlled value directly into HTML attributes, which is the canonical pattern for stored XSS [CWE-79].
Attack Vector
An attacker needs a WordPress account with at least contributor privileges. The attacker creates or edits a post containing the affiai_img shortcode with a crafted asin value that breaks out of the HTML attribute context. When a privileged user previews or publishes the content, or when any visitor loads a published page containing the shortcode, the injected JavaScript executes under the site's origin.
No verified exploitation code is published. See the Wordfence Vulnerability Report and the WordPress Plugin Image File for the vulnerable source reference.
Detection Methods for CVE-2025-11799
Indicators of Compromise
- Post or page content containing [affiai_img asin=...] with characters such as ", <, >, or onerror= inside the attribute value.
- Unexpected <script> tags, inline event handlers, or external script src references in posts authored by contributor-tier accounts.
- Outbound requests from site visitors or administrators to attacker-controlled domains originating from rendered post pages.
Detection Strategies
- Audit the wp_posts table for shortcode usage of affiai_img and inspect each asin attribute for non-alphanumeric characters.
- Enable Content Security Policy reporting to surface inline script executions and unauthorized script origins.
- Review contributor and author account activity for recently submitted or edited posts containing the affected shortcode.
Monitoring Recommendations
- Log all shortcode rendering through a server-side filter and alert on affiai_img invocations with suspicious attribute payloads.
- Monitor WordPress administrative sessions for anomalous REST API calls, user creation, or role modifications that may indicate successful XSS exploitation.
- Track plugin version inventory and alert when Affiliate AI Lite instances remain at version 1.0.1 or earlier.
How to Mitigate CVE-2025-11799
Immediate Actions Required
- Deactivate the Affiliate AI Lite plugin until a patched release above 1.0.1 is installed.
- Review all posts and pages for the affiai_img shortcode and remove or sanitize any suspicious asin values.
- Rotate credentials and session tokens for administrator accounts that may have previewed attacker-submitted content.
Patch Information
The vendor committed a fix in WordPress Changeset 3399153. Upgrade to a version newer than 1.0.1 as published on the WordPress Plugin Directory. Verify the installed version in wp-admin under Plugins after upgrade.
Workarounds
- Restrict contributor-level account creation and audit existing low-privilege accounts for legitimacy.
- Remove the affiai_img shortcode registration by disabling the plugin or filtering the shortcode through remove_shortcode('affiai_img') in a mu-plugin until patched.
- Deploy a web application firewall rule that blocks POST requests containing affiai_img shortcode attributes with HTML metacharacters.
# Temporary mitigation: disable the shortcode via a must-use plugin
# Save as wp-content/mu-plugins/disable-affiai-img.php
<?php
add_action('init', function () {
if (shortcode_exists('affiai_img')) {
remove_shortcode('affiai_img');
}
}, 100);
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

