CVE-2026-19902: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in spacetime Ad Inserter – Ad Manager & AdSense Ads
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.
AI Analysis
Technical Summary
CVE-2026-19902 is a reflected cross-site scripting vulnerability in the spacetime Ad Inserter – Ad Manager & AdSense Ads WordPress plugin. The vulnerability arises from insufficient input sanitization and output escaping of the '{search-query}' dynamic tag, which reads the HTTP Referer header and attempts to detect search engine referrals using a regex. The regex incorrectly matches any segment containing '/google.com/' or similar, allowing an attacker to inject malicious query parameters. The plugin then decodes and inserts these parameters into ad blocks without escaping, enabling arbitrary JavaScript execution in the victim's browser. This affects all versions up to and including 2.8.18.
Potential Impact
Successful exploitation allows unauthenticated attackers to execute arbitrary JavaScript in the context of the vulnerable site for any visitor, including signed-in administrators. This can lead to session hijacking, privilege escalation, or other malicious actions within the user's browser session. The vulnerability requires the site to have an ad block using the '{search-query}' tag with automatic insertion enabled, which is a documented feature of the plugin.
Mitigation Recommendations
No official patch or fix is currently documented. Users should verify if their site uses the '{search-query}' dynamic tag in ad blocks with automatic insertion enabled and consider disabling this feature or removing the tag until a fix is available. Monitor the vendor's advisory channels for updates. Since this is a reflected XSS, avoiding use of the vulnerable tag or restricting access to ad blocks may reduce risk.
CVE-2026-19902: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in spacetime Ad Inserter – Ad Manager & AdSense Ads
Description
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.
CVSS v3.1
Score 6.1medium
Affected software
spacetime
Ad Inserter – Ad Manager & AdSense Ads
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-19902 is a reflected cross-site scripting vulnerability in the spacetime Ad Inserter – Ad Manager & AdSense Ads WordPress plugin. The vulnerability arises from insufficient input sanitization and output escaping of the '{search-query}' dynamic tag, which reads the HTTP Referer header and attempts to detect search engine referrals using a regex. The regex incorrectly matches any segment containing '/google.com/' or similar, allowing an attacker to inject malicious query parameters. The plugin then decodes and inserts these parameters into ad blocks without escaping, enabling arbitrary JavaScript execution in the victim's browser. This affects all versions up to and including 2.8.18.
Potential Impact
Successful exploitation allows unauthenticated attackers to execute arbitrary JavaScript in the context of the vulnerable site for any visitor, including signed-in administrators. This can lead to session hijacking, privilege escalation, or other malicious actions within the user's browser session. The vulnerability requires the site to have an ad block using the '{search-query}' tag with automatic insertion enabled, which is a documented feature of the plugin.
Mitigation Recommendations
No official patch or fix is currently documented. Users should verify if their site uses the '{search-query}' dynamic tag in ad blocks with automatic insertion enabled and consider disabling this feature or removing the tag until a fix is available. Monitor the vendor's advisory channels for updates. Since this is a reflected XSS, avoiding use of the vulnerable tag or restricting access to ad blocks may reduce risk.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- Wordfence
- Date Reserved
- 2026-08-14T19:15:32.388Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6abe749ca43b0b3b89bd1d59
Added to database: 10/01/2026, 14:56:28 UTC
Last enriched: 10/01/2026, 15:27:37 UTC
Last updated: 10/02/2026, 03:04:48 UTC
Views: 10
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.