🇰🇷 한글 설명
WordPress용 Ad Inserter 플러그인 2.8.18 이하 버전에서 Referer 헤더를 통한 반사형 XSS 취약점이 발견되었습니다. '{search-query}' 태그를 사용하는 광고 블록이 Referer 헤더의 쿼리 매개변수를 적절한 검증 없이 처리하여 발생합니다. 공격자는 이를 통해 관리자를 포함한 방문자의 브라우저에서 임의의 자바스크립트를 실행할 수 있습니다.
💡 쉬운 설명
광고를 보여주는 플러그인이 외부에서 들어오는 주소 정보를 제대로 검사하지 않아 발생하는 문제입니다. 해커가 만든 특수한 링크를 클릭하면 웹사이트의 권한을 탈취하거나 정보를 훔칠 수 있습니다.
🇺🇸 원문 (English)
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.
📍 영향받는 시스템
Ad Inserter – Ad Manager & AdSense Ads plugin for WordPress (버전 2.8.18 및 그 이하 모든 버전)
⚔️ 공격 벡터
조작된 Referer 헤더를 포함한 링크를 통해 사용자를 유인하여 스크립트 실행
🛡️ 대응 방법
플러그인을 최신 버전으로 업데이트하거나, 광고 블록 내에서 '{search-query}' 태그 사용을 중단하십시오.
🔧 검증 코드
출력된 결과에서 ad-inserter의 버전이 2.8.18 이하인지 확인하십시오.
wp plugin list --status=active | grep -i 'ad-inserter' && wp plugin list --all | grep -E 'ad-inserter' | awk '{print $2, $3}'