🔍 CVE-2025-13035

8.0
CVSS Score
HIGH
2025-11-19
2026-10-18 20:10
✅ 완료

🇰🇷 한글 설명

WordPress의 Code Snippets 플러그인이 extract() 함수의 부정적 사용으로 PHP 코드 인젝션 취약점을 가지고 있습니다. Contributor 권한 이상의 인증된 사용자가 [code_snippet] shortcode를 통해 $filepath 변수를 덮어써서 임의의 PHP 코드를 실행할 수 있습니다.

💡 쉬운 설명

WordPress 플러그인에서 사용자 입력을 제대로 검증하지 않아, 블로그 작성 권한이 있는 사용자가 악의적인 코드를 서버에서 실행할 수 있습니다. 특수한 shortcode 문법을 이용하면 웹 서버의 모든 권한으로 명령어를 실행할 수 있습니다.

🇺🇸 원문 (English)

The Code Snippets plugin for WordPress is vulnerable to PHP Code Injection in all versions up to, and including, 3.9.1. This is due to the plugin's use of extract() on attacker-controlled shortcode attributes within the `evaluate_shortcode_from_flat_file` method, which can be used to overwrite the `$filepath` variable and subsequently passed to require_once. This makes it possible for authenticated attackers, with Contributor-level access and above, to execute arbitrary PHP code on the server via the `[code_snippet]` shortcode using PHP filter chains granted they can trick an administrator into enabling the "Enable file-based execution" setting and creating at least one active Content snippet.

📍 영향받는 시스템

Code Snippets plugin for WordPress version 3.9.1 and below

⚔️ 공격 벡터

Authenticated Contributor+ users inject PHP via [code_snippet] shortcode with filter chains when 'Enable file-based execution' is active

🛡️ 대응 방법

Upgrade to version 3.9.2 or later and disable 'Enable file-based execution' setting in plugin configuration

🔧 검증 코드

Output showing 3.9.1 or lower indicates vulnerability; empty result means plugin not installed at default path

Shell / Script
grep -r 'Version:' /var/www/html/wp-content/plugins/code-snippets/ 2>/dev/null | head -1 | grep -oE '[0-9]+\.[0-9]+\.[0-9]+'

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H

💻 영향받는 소프트웨어

PHP