🔍 CVE-2026-40878

0.0
CVSS Score
UNKNOWN
2026-04-21
2026-10-26 22:10
✅ 완료

🇰🇷 한글 설명

mailcow 웹 인터페이스가 REQUEST_URI를 JavaScript 문맥에서 안전하게 escape하지 않아 XSS 취약점이 발생합니다. 또한 $_GET 파라미터가 로그인 페이지의 언어 전환 링크에 그대로 병합되어 공격자가 악의적인 쿼리를 주입할 수 있습니다.

💡 쉬운 설명

mailcow 이메일 시스템의 웹페이지가 사용자 입력을 안전하게 처리하지 않아, 해커가 웹페이지에 악의적인 코드를 삽입할 수 있습니다. 로그인 페이지의 링크를 통해 이 공격을 수행할 수 있습니다.

🇺🇸 원문 (English)

mailcow: dockerized is an open source groupware/email suite based on docker. In versions prior to 2026-03b, the mailcow web interface passes the raw `$_SERVER['REQUEST_URI']` to Twig as a global template variable and renders it inside a JavaScript string literal in the `setLang()` helper of `base.twig`, relying on Twig's default HTML auto-escaping instead of the context-appropriate `js` escaping strategy. In addition, the `query_string()` Twig helper merges all current `$_GET` parameters into the language-switching links on the login page, so attacker-supplied parameters are reflected and preserved across navigation. Version 2026-03b fixes the vulnerability.

📍 영향받는 시스템

mailcow: dockerized 버전 2026-03b 이전

⚔️ 공격 벡터

URL의 REQUEST_URI와 $_GET 파라미터에 JavaScript 코드를 주입하여 XSS 공격 수행

🛡️ 대응 방법

mailcow를 버전 2026-03b 이상으로 업그레이드

🔧 검증 코드

2026-03b 이상의 버전이 출력되면 패치됨; 그 이하면 취약함

Shell / Script
grep -r 'VERSION\|version' /opt/mailcow-dockerized/.mailcow 2>/dev/null | grep -oE '202[0-9]-[0-9]{2}[a-z]' | head -1

💻 영향받는 소프트웨어

Docker