🔍 CVE-2026-106512

0.0
CVSS Score
UNKNOWN
2026-10-06
2026-10-07 17:16
✅ 완료

🇰🇷 한글 설명

CakeResponse::download() 메서드가 파일명을 적절히 검증하지 않고 Content-Disposition 헤더를 생성하여 발생하는 취약점입니다. 공격자가 특수 문자가 포함된 파일명을 업로드하면 HTTP 헤더 조작을 통해 브라우저에서 악성 스크립트가 실행되는 저장형 XSS 공격이 가능합니다.

💡 쉬운 설명

파일 이름에 특수 문자를 넣어 올리면, 웹사이트가 이 이름을 처리하는 과정에서 오류를 일으켜 해커가 심어놓은 악성 코드를 실행하게 만듭니다. 이를 통해 사용자의 로그인 정보를 훔치거나 계정을 탈취할 수 있습니다.

🇺🇸 원문 (English)

The CakeResponse::download() method in lib/Cake/Network/CakeResponse.php constructs a Content-Disposition header by directly interpolating a caller-supplied filename into a quoted-string value without sanitization. Two distinct injection vectors exist in the unpatched code. First, if the filename contains C0 control characters (CR or LF), PHP refuses to emit the entire Content-Disposition header, silently dropping the attachment disposition. The response body is then served with its own Content-Type (for example text/html for an .html attachment) and renders inline in the browser on the application origin, creating a stored cross-site scripting condition. The commit message notes this is reachable even when the download_attachments_on_load setting is enabled, meaning a victim merely needs to view a page that triggers the download. Second, a double-quote character in the filename terminates the quoted-string value early, permitting injection of additional Content-Disposition parameters. The affected code path covers all callers of CakeResponse::download(), including attribute downloads, proposal downloads, and restSearch exports. An authenticated user who can create or upload an attachment with a crafted filename (for example through MISP attribute naming or proposal attachment naming) can store the malicious filename. When any other authenticated user views the affected page, the unsanitized filename is reflected into the HTTP response header, resulting in header manipulation and potential execution of arbitrary HTML or JavaScript in the context of the application origin. The security impact is equivalent to a stored cross-site scripting vulnerability, allowing session hijacking, data exfiltration, and unauthorized actions on behalf of the victim.

📍 영향받는 시스템

CakePHP framework (lib/Cake/Network/CakeResponse.php를 사용하는 버전)

⚔️ 공격 벡터

악의적으로 조작된 파일명을 업로드하거나 생성하여 HTTP 응답 헤더에 주입 (Stored XSS)

🛡️ 대응 방법

CakeResponse::download() 메서드 내 파일명에 대한 입력값 검증 및 특수 문자(CR, LF, 따옴표 등) 필터링 적용

🔧 검증 코드

해당 파일 내에 문제가 되는 메서드가 존재하는지 확인하고, 파일명 처리 로직에 sanitization 코드가 있는지 검토합니다.

Shell / Script
grep -r "CakeResponse::download()" /path/to/cakephp/lib/Cake/Network/CakeResponse.php

💻 영향받는 소프트웨어

PHP