🔍 CVE-2026-18438

8.8
CVSS Score
HIGH
2026-08-15
2026-08-20 12:48
✅ 완료

🇰🇷 한글 설명

WordPress용 Templately 플러그인의 fetch_remote_file 함수에서 파일 이름 검증 및 저장 경로 불일치로 인해 원격 코드 실행(RCE) 취약점이 발생합니다. 공격자는 Content-Disposition 헤더를 조작하여 파일 확장자 검사를 우회하고 서버에 악성 PHP 파일을 업로드할 수 있습니다. 이 취약점은 기여자(Contributor) 이상의 권한을 가진 인증된 사용자에 의해 악용될 수 있습니다.

💡 쉬운 설명

플러그인이 파일의 종류를 확인할 때 엉뚱한 정보를 확인하여, 이미지 파일인 척하는 악성 프로그램을 서버에 몰래 설치할 수 있는 문제입니다. 이를 통해 해커는 웹사이트의 제어권을 완전히 탈취할 수 있습니다.

🇺🇸 원문 (English)

The Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 3.7.1 via the fetch_remote_file function. This is due to a filename validation/destination mismatch in fetch_remote_file, where file type validation is performed against the attacker-controlled Content-Disposition filename rather than the URL-path-derived destination filename. This makes it possible for authenticated attackers, with contributor-level access and above, to execute code on the server. A GIF+PHP polyglot file passes wp_check_filetype_and_ext validation as image/gif via the Content-Disposition filename, while the actual destination path is written with a .php extension derived from the URL path, bypassing the unfiltered_upload capability gate entirely. The affected endpoints are reachable at this privilege level because Templately's entire REST API — including the cloud import endpoints used in this attack (/templately/v1/clouds/upload and /templately/v1/insert) — is authorized only by a current_user_can('delete_posts') check, with no administrator or manage_options capability requirement. The same permission gate also allows a contributor to overwrite the site's global Templately cloud connection via the /templately/v1/login endpoint with global_signin set to true. A complete remediation should both correct fetch_remote_file to validate the file type against the actual destination filename rather than the Content-Disposition header (and avoid deriving the write path from the request URL), and restrict state-changing Templately REST routes to an appropriate administrator-level capability.

📍 영향받는 시스템

Templately – Elementor & Gutenberg Template Library 플러그인 3.7.1 이하 모든 버전

⚔️ 공격 벡터

기여자 권한 이상의 사용자가 조작된 Content-Disposition 헤더를 포함한 파일을 REST API 엔드포인트로 전송하여 PHP 파일 업로드

🛡️ 대응 방법

fetch_remote_file 함수의 파일 검증 로직을 실제 저장 경로 기준으로 수정하고, REST API 접근 권한을 관리자(Administrator) 수준으로 강화

🔧 검증 코드

출력된 버전 번호가 3.7.1 이하인지 확인하여 취약 여부를 판단합니다.

Shell / Script
wp plugin list --name=templately --format=csv | grep -E 'templately' | cut -d',' -f2

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

WordPress