REDHAT-BUG-2440301: SQL Injection

Published Feb 16, 2026
·
Updated

Description

The addressbook file backend implementation in e-book-backend-file.c manages contact photo and logo files stored on disk. When a contact is created or modified, inline image data is converted to a file on disk and the vCard is updated with a file URI pointing to the stored file. When a contact is deleted or its image changes, the old file is removed from disk. Both the PHOTO and LOGO vCard fields go through this same code path. Two different functions implement security checks on these URIs, using inconsistent comparison logic. During contact creation and modification, maybetransformvcardfieldforphoto() calls isbackendowneduri() to determine whether an incoming URI belongs to the backend. This function extracts the directory component with gpathgetdirname() and performs an exact match against the photo directory using strcmp():

dirname = gpathgetdirname (filename); owneduri = bf->priv->photodirname && (strcmp (dirname, bf->priv->photodirname) == 0);

A URI containing ../ sequences will not match, so isbackendowneduri() returns FALSE. The URI is then stored verbatim in the SQLite database without transformation. During contact deletion, bookbackendfileremovecontactssync() calls maybedeleteunuseduris(), which retrieves the stored URIs for both the ECONTACTPHOTO and ECONTACTLOGO fields via checkremoveuriforfield() and passes each to maybedeleteuri(). This function performs a prefix match on the raw, unresolved path using strncmp():

if (bf->priv->photodirname && !strncmp (bf->priv->photodirname, filename, strlen (bf->priv->photodirname))) { d (gprint ("Deleting uri file: %s\n", filename)); / Deleting uris should not cause the backend to fail to update a contact so the best we can do from here is log warnings when we fail to unlink a file from the disk. / if (!removefile (filename, &error)) { gwarning ("Unable to cleanup photo uri: %s", error->message); gerrorfree (error); } }

Since strncmp() only checks that the path starts with the photo directory, a URI containing ../ sequences after the prefix will pass this check. The removefile() function then calls gunlink(), which resolves the ../ sequences, deleting the traversed target file. Because maybedeleteunuseduris() processes both fields independently, a single contact can be used to delete two arbitrary files in one operation. The Evolution backend server exposes the D-Bus service org.gnome.evolution.dataserver.AddressBook, that can be used in order to manage contacts. A Flatpak application with access to this D-Bus service can exploit this issue in order to gain arbitrary file deletion on the host filesystem. A simple proof of concept script shhowcasing this issue can be found in the attached file. Impact

A Flatpak application with D-Bus access to the addressbook service can delete arbitrary files on the host, potentially including Flatpak override files, which are typically used to remove permissions at varying levels of granularity, from app-specific to user- or system-wide. Recommended solution

Canonicalize the file path in maybedeleteuri() using realpath() before performing the prefix comparison, ensuring that ../ sequences are resolved.

Affected Software

1 affected component
Gnome Evolution Data Server

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    In maybe_delete_uri(), canonicalize the incoming file path with realpath() before performing the prefix comparison (so any ../ sequences are resolved and cannot bypass the photo directory check via strncmp()).

    Evolution addressbook file backend (e-book-backend-file.c) URI canonicalization before prefix comparison = Use realpath() in maybe_delete_uri()
  2. Compensating control

    Restrict access to the org.gnome.evolution.dataserver.AddressBook D-Bus service so only trusted processes/users can manage contacts (to prevent a Flatpak app with D-Bus access from deleting arbitrary host files, including Flatpak override files).

Event History

Feb 16, 2026
Data Sourced
via Red Hat·09:29 PM
DescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of REDHAT-BUG-2440301?

The severity of REDHAT-BUG-2440301 is categorized as medium with a score of 4.

2

What type of vulnerability is associated with REDHAT-BUG-2440301?

REDHAT-BUG-2440301 is associated with SQL Injection vulnerabilities.

3

How do I fix REDHAT-BUG-2440301?

To fix REDHAT-BUG-2440301, users should apply the latest patches or updates provided by the Gnome Evolution Data Server.

4

What software is affected by REDHAT-BUG-2440301?

The software affected by REDHAT-BUG-2440301 is the Gnome Evolution Data Server.

5

What can exploit REDHAT-BUG-2440301?

Exploiting REDHAT-BUG-2440301 can allow attackers to manipulate contact photo and logo files through improper handling of vCard URI.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203