Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. egroupware/egroupware
  4. ›
  5. CVE-2026-45016

CVE-2026-45016: EGroupware Vulnerable to Local File Inclusion via file:// URI in Mail Compose

July 7, 2026

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

// 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:'))

References

  • github.com/EGroupware/egroupware/security/advisories/GHSA-c8m7-r2jv-rw63
  • github.com/advisories/GHSA-c8m7-r2jv-rw63
  • nvd.nist.gov/vuln/detail/CVE-2026-45016

Code Behaviors & Features

Detect and mitigate CVE-2026-45016 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 23.1.20260601, all versions starting from 26.0.20251208 before 26.5.20260507

Fixed versions

  • 23.1.20260601
  • 26.5.20260507

Solution

Upgrade to versions 23.1.20260601, 26.5.20260507 or above.

Impact 6.5 MEDIUM

CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-73: External Control of File Name or Path

Source file

packagist/egroupware/egroupware/CVE-2026-45016.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 11 Jul 2026 00:18:50 +0000.