🇰🇷 한글 설명
WordPress용 BetterDocs 플러그인 4.8.1 이하 버전에서 제목(Heading)의 'id' 속성을 통한 저장형 XSS 취약점이 발견되었습니다. 입력값 검증 및 출력 이스케이프 미흡으로 인해, 기여자(Contributor) 이상의 권한을 가진 공격자가 악성 스크립트를 삽입할 수 있습니다. 삽입된 페이로드는 목차(TOC) 생성 과정에서 디코딩되어 사용자 브라우저에서 실행됩니다.
💡 쉬운 설명
글을 작성할 수 있는 권한이 있는 사람이 글 제목에 몰래 악성 코드를 숨겨둘 수 있는 문제입니다. 다른 사용자가 해당 글을 읽을 때 숨겨진 코드가 실행되어 개인정보를 탈취하거나 사이트를 조작할 수 있습니다.
🇺🇸 원문 (English)
The BetterDocs – AI Documentation, Knowledge Base, Docs, Wikis, FAQ with Chatbot plugin for WordPress is vulnerable to Stored Cross-Site Scripting via Heading 'id' Attribute in Post Content in all versions up to, and including, 4.8.1 due to insufficient input sanitization and output escaping. This makes it possible for authenticated attackers, with contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page. The exploit survives wp_kses_post because entity-encoded quotes in a heading id attribute are treated as a single legitimate attribute value at save time; the dangerous payload only materialises after process_content_for_toc() calls html_entity_decode() on the stored content and the broken id is extracted by a lazy regex before being echoed unescaped into the Table of Contents output.
📍 영향받는 시스템
BetterDocs 플러그인 4.8.1 및 그 이전의 모든 버전
⚔️ 공격 벡터
기여자 이상의 권한을 가진 공격자가 게시물 제목의 id 속성에 인코딩된 악성 스크립트를 삽입
🛡️ 대응 방법
BetterDocs 플러그인을 최신 버전으로 업데이트하여 보안 패치를 적용하십시오.
🔧 검증 코드
출력된 버전 번호가 4.8.1보다 높으면 안전하며, 4.8.1 이하이면 취약합니다.
wp plugin list --name betterdocs --format=json | grep -oP '(?<=version":")[^"]+'