Ad Inserter <= 2.8.18 - Reflected Cross-Site Scripting via {search-query} Dynamic Tag (Referer Header)
Strategic Overview
- Status
- Patched in 2.8.19
- Affected Plugin
- Ad Inserter – Ad Manager & AdSense Ads
- Affected Version
<= 2.8.18- CVSS
- 6.1Medium
- Weakness type
- CWE-79 · Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
- CVE
CVE-2026-19902
At a glance
CVE-2026-19902 is a medium-severity Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') vulnerability in the Ad Inserter WordPress plugin, affecting versions <= 2.8.18. It carries a CVSS score of 6.1 (reachable over the network; low attack complexity). Exploitation requires no authentication. The issue is fixed in version 2.8.19; sites on affected versions should update now. Disclosed September 2026, reported by Yuto Hyakumoto.
Vulnerability Overview
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.
Technical Analysis
The vector marks this flaw as remotely reachable over the network, with low attack complexity — no special timing or configuration is needed, and no privileges on the target site.
CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Ad Inserter <= 2.8.18 carries this weakness at HTTP_REFERER, and reaching it takes a caller who can reach the endpoint. Cross-site scripting happens when input from a request is written into a page without being escaped for the context it lands in, so the browser parses attacker-supplied text as markup or script.
Injected script runs with the privileges of whoever views the affected page, which is how these flaws turn into administrator session theft, silent account creation or persistent backdoors in page content. For Ad Inserter the fix is 2.8.19: builds <= 2.8.18 are affected, anything from 2.8.19 onward is not.
Remediation
Update to version 2.8.19, or a newer patched version
How does WordSec protect against this?
The attempt arrives as an ordinary request to Ad Inserter: WordSec's web application firewall inspects request payloads before WordPress loads them. None of that substitutes for the fix: Ad Inserter 2.8.19 closes this, and updating the plugin is the step that ends it.
- Firewall
- Alerts
External References
Related records
Same weakness class
- 7.2CVE-2026-97077: Ad Inserter – Ad Manager & AdSense Ads Stored XSS
CVE-2026-97077 - 6.4CVE-2026-107864: Ad Inserter – Ad Manager & AdSense Ads Stored XSS
CVE-2026-107864 - 6.4CVE-2026-81655: Ad Inserter 2.8.12 - 2.8.18 Stored XSS
CVE-2026-81655 - 6.4CVE-2026-57693: Ad Inserter – Ad Manager & AdSense Ads Stored XSS
CVE-2026-57693
Other vulnerabilities in Ad Inserter – Ad Manager & AdSense Ads
- 8.8CVE-2019-15324: Ad Inserter <= 2.4.21 Remote Code Execution
CVE-2019-15324 - 8.8CVE-2015-9497: Ad Inserter CSRF to Cross-Site Scripting
CVE-2015-9497 - 7.5CVE-2019-15323: Ad Inserter <= 2.4.19 Path Traversal
CVE-2019-15323 - 7.2CVE-2023-1549: Ad Inserter <= 2.7.25 PHP Object Injection
CVE-2023-1549 - 7.2Ad Inserter < 2.7.11 Remote Code Execution
- 6.4CVE-2025-11745: Ad Inserter <= 2.8.7 Stored Cross-Site Scripting
CVE-2025-11745 - 6.1CVE-2026-89427: Ad Inserter <= 2.8.18 Reflected Cross-Site Scripting
CVE-2026-89427 - 6.1CVE-2026-9280: Ad Inserter <= 2.8.15 Reflected Cross-Site Scripting
CVE-2026-9280
Vulnerability data © Defiant, Inc., provided under the Wordfence Intelligence T&C