Kestrel
대시보드로 돌아가기
CVE-2026-45016MEDIUM· 6.5GHSA대응게시일: 2026. 07. 07.수정일: 2026. 07. 07.

EGroupware Vulnerable to Local File Inclusion via file:// URI in Mail Compose

위협 신호 · CVSS · EPSS · KEV

정기 패치· 높은 악용 신호 없음
CVSS
6.5medium

이론적 심각도 점수

EPSS

예측 데이터 없음

KEV
미등재

실측 악용 기록 없음

권장 대응 기한60일 이내CISA SSVC 기준

계획된 패치 주기 내 조치(60일 이내)

외부 노출· KEV 미등재 · 자동화 어려움 · 부분 영향 · 외부 노출

CVSS 벡터 · 메트릭

악용 경로
공격 벡터네트워크
공격 복잡도낮음
필요 권한낮음
사용자 상호작용불필요
범위불변
영향
기밀성 영향높음
무결성 영향없음
가용성 영향없음
버전별 점수
CVSS 3.06.5MODERATE
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

상세 설명

Summary

The function processes image URLs embedded in an HTML email body without validating or restricting URI schemes. The check !str_starts_with($myUrl, 'http') evaluates to true for file:// URIs, causing file_get_contents($basedir . urldecode($myUrl)) to read arbitrary files from the server filesystem and embed them as inline MIME attachments in outgoing email.

str_starts_with('file:///etc/passwd', 'http') → false
!false → true

bash
1// api/src/Mail.php
2foreach($images[2] as $i => $url)
3 {
4 //$isData = false;
5 $basedir = $data = '';
6 $needTempFile = true;
7 $attachmentData = ['name' => '', 'type' => '', 'file' => '', 'tmp_name' => ''];
8 try
9 {
10 // do not change urls for absolute images (thanks to corvuscorax)
11 if (!str_starts_with($url, 'data:'))
12 {
13 $attachmentData['name'] = basename($url); // need to resolve all sort of url
14 if (($directory = dirname($url)) == '.') $directory = '';
15 $ext = pathinfo($attachmentData['name'], PATHINFO_EXTENSION);
16 $attachmentData['type'] = MimeMagic::ext2mime($ext);
17 if ( strlen($directory) > 1 && !str_ends_with($directory, '/')) { $directory .= '/'; }
18..
19...
20....
21// processURL2InlineImages function
22if ( $myUrl[0]!='/' && strlen($basedir) > 1 && !str_ends_with($basedir, '/')) { $basedir .= '/'; }
23 if ($needTempFile && empty($attachment) && !str_starts_with($myUrl, "http"))
24 {
25 try {
26 $data = file_get_contents($basedir.urldecode($myUrl));
27 }
28 catch (\Throwable $e) {
29 _egw_log_exception($e);
30 }
31 }
32 }
33 if (str_starts_with($url, 'data:'))

PoC

  1. Log in as any authenticated EGroupware user with mail access and open the mail compose window.
  2. Switch to HTML body mode and insert: <img src="file:///etc/passwd">.
  3. The server executes file_get_contents('file:///etc/passwd'), writes the content to a temp file, and attaches it as an inline MIME part.

Impact

An authenticated attacker can read arbitrary files accessible by the web server process, including /etc/passwd, application configuration files containing database credentials, private TLS keys, and environment files.

Remediation

Enforce a strict URI scheme allowlist before calling file_get_contents(). Replace the check !str_starts_with($myUrl, 'http') with if (!preg_match('#^https?://#i', $myUrl)) { continue; } to reject file://, ftp://, php://, data://, and any other non-HTTP scheme.

AI 심층 분석

공격 시나리오 · 재현 가능한 PoC 페이로드 · 즉시 적용 가능한 차단 패치를 한 번에 받아 보세요. 보안 운영팀이 그대로 점검·티켓팅에 쓸 수 있는 형태로 정리해 드립니다.