CVE-2026-19902 Details
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.
A reflected cross-site scripting vulnerability has been identified in the Ad Inserter – Ad Manager & AdSense Ads plugin for WordPress, affecting all versions through 2.8.18. The issue arises from inadequate input sanitization and output escaping on the '{search-query}' dynamic tag. When an ad block includes this tag, the function replace_ai_tags() accesses the Referer header, checks it against a regex pattern to identify search engine referrals, and then decodes the query. The decoded 'q' or 'p' value is inserted into the ad block without proper escaping. This vulnerability allows unauthenticated attackers to execute arbitrary JavaScript in the context of the site, potentially affecting visitors with administrator privileges, by directing them to a controlled page that links to a regular post. Successful exploitation requires an ad block with the '{search-query}' tag and automatic insertion enabled.
Users are advised to update the Ad Inserter plugin to version 2.8.19 or a newer patched version.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Oct 1, 2026CISA-ADP
Assessed Oct 3, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Ad Inserter | <= 2.8.18 (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 3, 2026 | CVE Modified | CISA-ADP |
| Oct 1, 2026 | New CVE Received | [email protected] |
Volerion