Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessLure victim to attacker-controlled page
-
DeliveryPage links to post with crafted Referer header
-
ExploitPlugin misclassifies referrer as search engine
-
Executionparse_str decodes malicious 'q' value
-
PersistUnescaped substitution into ad block via preg_replace
-
ImpactJavaScript runs in victim/admin session
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires the target site to have an ad block whose code embeds the '{search-query}' dynamic tag with automatic insertion enabled - an opt-in, non-default plugin feature; sites not using this tag are not exploitable. Given that configuration, exploitation is unauthenticated (PR:N) and remote, but needs victim interaction (UI:R): the victim must follow an attacker-controlled link/frame to any ordinary post so the malicious Referer is sent. Impact is maximized when the lured visitor is a signed-in administrator. The regex bypass itself is trivial (any Referer containing a '/google.com/'-style segment passes), so the only real limiter beyond the config precondition is the social-engineering step to make a target click. |
| Impact | The provided CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N, base 6.1) describes an unauthenticated, network-reachable reflected XSS that requires victim interaction (UI:R) and causes a scope change (S:C) with low confidentiality and integrity impact - a classic reflected-XSS profile. No EPSS score, no CISA KEV entry, and no public proof-of-concept are present in the input, so this is 'no public exploit identified at time of analysis.' The real-world risk is moderate and conditional rather than a drop-everything priority: although unauthenticated and remotely reachable, exploitation is gated by two factors not captured in the raw score - the target site must have configured an ad block that uses the '{search-query}' dynamic tag with automatic insertion enabled (a non-default, opt-in feature), and a victim (ideally a logged-in administrator) must be lured into clicking an attacker-controlled link. The flaw itself is technically sound and well-documented by Wordfence down to the exact source lines and the regex bypass, so the vulnerability is confirmed; the limiting factor is the required configuration rather than exploit difficulty. Net: a genuine but configuration-dependent reflected XSS in an otherwise very widely-deployed plugin - elevated interest due to install base, tempered by the feature-enablement precondition and need for user interaction. |
| Exploit ScenarioDerived | An attacker crafts a malicious page whose outbound link to an ordinary post on the target WordPress site carries a Referer such as 'https://evil.test/google.com/?q=<script>...' - the leading-slash regex bypass makes the plugin treat it as a legitimate search-engine referral. When a visitor (including a signed-in administrator) follows the link, replace_ai_tags() parses the referrer with parse_str(), extracts the 'q' value, and substitutes it unescaped into the ad block's output via preg_replace(), executing the attacker's JavaScript in the victim's session. No public proof-of-concept is identified in the provided data, but the Wordfence writeup documents the exact vulnerable code paths. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 01, 2026
Reflected cross-site scripting in the Ad Inserter - Ad Manager & AdSense Ads plugin for WordPress affects all versions up to and including 2.8.18, letting unauthenticated remote attackers run arbitrary JavaScript in a victim's browser session. The flaw lives in the '{search-query}' dynamic tag: when an ad block uses that tag, the plugin reads the Referer header, is trivially fooled by any referrer containing a '/google.com/'-style segment, and injects the decoded query string into the page without escaping. Because the request is cross-site and carries no authentication privilege (PR:N), the attacker must lure a victim - ideally a signed-in administrator - to an attacker-controlled page that frames or links to an ordinary post on the target site (UI:R); the configuration precondition is a site that uses the '{search-query}' tag with automatic insertion enabled, an opt-in, non-default feature. No public exploit code was identified at time of analysis, and no CISA KEV entry is associated with this CVE; the vulnerability is fixed in plugin version 2.8.19.
RemediationAI
Vendor-released patch: 2.8.19 - update the Ad Inserter - Ad Manager & AdSense Ads plugin to version 2.8.19 or later, which is the fix captured in the Trac changeset (https://plugins.trac.wordpress.org/changeset?reponame=&new=3709970%40ad-inserter%2Ftags%2F2.8.19&old=3624916%40ad-inserter%2Ftags%2F2.8.18) and referenced by the Wordfence advisory (https://www.wordfence.com/threat-intel/vulnerabilities/id/5d632cce-40a9-4969-b213-8370ae75287e?source=cve); because WordPress plugins are managed through the dashboard or WP-CLI, the upgrade is low-risk and should be applied as the primary action. If immediate patching is not possible, the most effective compensating control is to remove the '{search-query}' dynamic tag from every ad block and turn off automatic insertion for any block that still references it, since the injection path is only reachable when that tag is processed - the trade-off is that search-query-based ad targeting stops functioning for those blocks. A second option is to restrict who can trigger the vulnerable request by not clicking untrusted links or framed content while signed into wp-admin and by logging out between administrative tasks, which reduces the chance a privileged session is the one executing the injected script but does nothing for ordinary visitors. Web-application-firewall or reverse-proxy rules can be configured to strip or reject requests whose Referer header contains search-engine-shaped path segments such as '/google.com/', which blocks the trivial regex bypass at the edge at the cost of false positives on legitimate search-engine traffic and the need to tune rules per deployment. Note that this is a reflected XSS, so server-side hardening of the Referer alone is not a full substitute for the 2.8.19 update, and the strongest signal here is simply upgrading promptly.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
This is a classic CWE-79 (Improper Neutralization of Input During Web Page Generation) reflected XSS rooted in the plugin's dynamic-tag substitution engine. Ad Inserter's replace_ai_tags() handles the documented '{search-query}' tag by inspecting $_SERVER['HTTP_REFERER'] and validating it against the regex /[\.\/](google|yahoo|bing|ask)\.[a-z\.]{2,5}[\/]/i. The leading character class [\.\/] matches a literal dot OR a literal forward slash, which means a referrer path such as '/google.com/' satisfies the check even though it is not an actual search-engine referral; the validation is therefore a substring/shape check rather than a trusted-origin check. Once the referrer passes, the plugin percent-decodes the referring URL with parse_str() and extracts the q (or p) parameter, then substitutes that value into the ad block markup through preg_replace() with no HTML escaping or output encoding - references point to ad-inserter.php around lines 13018-13093 and class.php around line 3297 in tag 2.8.18. The resulting injection executes in the origin of the WordPress site, which is why the CVSS 3.1 vector is scored with a scope change (S:C) and low confidentiality/integrity impact (C:L/I:L/A:N) at base 6.1; the AV:N/AC:L/PR:N profile confirms the attack is network-reachable, low-complexity, and requires no authentication, while UI:R reflects the need to make a victim follow the crafted link or frame. The affected CPE is cpe:2.3:a:spacetime:ad_inserter_-_ad_manager_&_adsense_ads:*, covering the whole plugin line through 2.8.18.
Know when Wordpress Plugin gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Unauthenticated reflected XSS (PR:N) delivered via Referer requiring a victim click (UI:R); runs in the victim browser (S:C) with low C/I and no availability impact.
Primary rating from Vendor (Wordfence).
CVSS VectorVendor: Wordfence
DescriptionCVE.org
The Ad Inserter - Ad Manager & AdSense Ads plugin for WordPress is vulnerable to Reflected Cross-Site Scripting via the Referer header in all versions up to, and including, 2.8.18 due to insufficient input sanitization and output escaping on the '{search-query}' dynamic tag. When an ad block's code contains that tag, replace_ai_tags() reads $_SERVER['HTTP_REFERER'] and tests it with the regex /[\.\/](google|yahoo|bing|ask)\.[a-z\.]{2,5}[\/]/i. The leading [\.\/] class matches a literal slash, so any referrer merely containing a segment such as '/google.com/' passes as a search-engine referral; the plugin then percent-decodes the referring query with parse_str() and substitutes the resulting 'q' (or 'p') value into the block via preg_replace() with no escaping. This makes it possible for unauthenticated attackers to execute arbitrary JavaScript in the context of the site for any visitor, including a signed-in administrator, by luring them to an attacker-controlled page that frames or links to any ordinary post. Exploitation requires the site to have an ad block whose code uses the '{search-query}' tag with automatic insertion enabled - a documented plugin feature used as intended.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
More in Wordpress Plugin
View allThe Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
The Hash Form - Drag & Drop Form Builder plugin for WordPress is vulnerable to arbitrary file uploads due to missing fil
Authentication bypass in the LiteSpeed Cache WordPress plugin (versions prior to 6.5.0.1) allows unauthenticated remote
The Simple File List plugin for WordPress through version 4.2.2 contains an unauthenticated remote code execution vulner
The AI Engine WordPress plugin through version 3.1.3 exposes Bearer Token values through the /mcp/v1/ REST API endpoint
The SureTriggers WordPress plugin through version 1.0.82 contains a privilege escalation vulnerability that allows unaut
The Ninja Forms plugin before 2.9.42.1 for WordPress allows remote attackers to conduct PHP object injection attacks via
The Business Directory Plugin - Easy Listing Directories for WordPress plugin for WordPress is vulnerable to time-based
SQL injection in the NotificationX WordPress plugin (versions up to and including 2.8.2) allows unauthenticated remote a
The POST SMTP Mailer - Email log, Delivery Failure Notifications and Best Mail SMTP for WordPress plugin for WordPress i
The MasterStudy LMS WordPress Plugin - for Online Courses and Education plugin for WordPress is vulnerable to union base
The Email Subscribers by Icegram Express plugin for WordPress is vulnerable to SQL Injection via the ‘hash’ parameter in
EUVD-2026-90545
GHSA-298r-885r-pj27
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB