Medium

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

  • Disclosed: 07.07.2026
  • Updated: 11.10.2026 10:22

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

php
// api/src/Mail.php  
foreach($images[2] as $i => $url)
			{
				//$isData = false;
				$basedir = $data = '';
				$needTempFile = true;
				$attachmentData = ['name' => '', 'type' => '', 'file' => '', 'tmp_name' => ''];
				try
				{
					// do not change urls for absolute images (thanks to corvuscorax)
					if (!str_starts_with($url, 'data:'))
					{
						$attachmentData['name'] = basename($url); // need to resolve all sort of url
						if (($directory = dirname($url)) == '.') $directory = '';
						$ext = pathinfo($attachmentData['name'], PATHINFO_EXTENSION);
						$attachmentData['type'] = MimeMagic::ext2mime($ext);
						if ( strlen($directory) > 1 && !str_ends_with($directory, '/')) { $directory .= '/'; }
..
...
....
// processURL2InlineImages function
if ( $myUrl[0]!='/' && strlen($basedir) > 1 && !str_ends_with($basedir, '/')) { $basedir .= '/'; }
						if ($needTempFile && empty($attachment) && !str_starts_with($myUrl, "http"))
						{
							try {
								$data = file_get_contents($basedir.urldecode($myUrl));
							}
							catch (\Throwable $e) {
								_egw_log_exception($e);
							}
						}
					}
					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.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Composer package egroupware/egroupware >= 26.0.20251208, < 26.5.20260507, < 23.1.20260601 26.5.20260507, 23.1.20260601

References

CVSS score 6.5/10
CVSS vector
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Weakness (CWE)
CWE-73
Platform
Composer
Package
egroupware/egroupware
Disclosed
07.07.2026
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-c8m7-r2jv-rw63 - CC BY 4.0

Vulnerability history: egroupware/egroupware

All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
7
First → latest
05.2022 07.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 1
  • High 4
  • Medium 2

Disclosures per year

  1. 2022: 2
  2. 2023: 0
  3. 2024: 1
  4. 2025: 0
  5. 2026: 4
  1. EGroupware Vulnerable to Local File Inclusion via file:// URI in Mail Compose this entry
    Medium · 6.5 CVE-2026-45016 >= 26.0.20251208, < 26.5.20260507, < 23.1.20260601 26.5.20260507, 23.1.20260601
  2. High CVE-2026-40187 >= 26.0.20251208, < 26.4.20260413, < 23.1.20260601 26.4.20260413, 23.1.20260601
  3. Critical CVE-2026-27823 >= 26.0.20251208, < 26.2.20260224, < 23.1.20260224 26.2.20260224, 23.1.20260224
  4. High CVE-2026-22243 < 23.1.20260113, >= 26.0.20251208, < 26.0.20260113 23.1.20260113, 26.0.20260113
  5. High · 6.5 CVE-2024-40614 < 23.1.20240624 23.1.20240624
  6. High CVE-2010-3313 < 1.6.003, >= 9.1, < 9.1.20100309, >= 9.2, < 9.2.20100309 1.6.003, 9.1.20100309, 9.2.20100309
  7. Medium · 6.1 CVE-2017-14920 < 16.1.20170922 16.1.20170922

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.