CVE-2026-75594: Kirby: Access to image files and limited access to JSON files outside of the site root via path traversal in the media handling

Published Aug 31, 2026
·
Updated

TL;DR

This vulnerability affects all Kirby sites that are deployed to a server that allows requests for URLs with encoded slashes (%2f), such as nginx, PHP's built-in server or Apache setups that have the option AllowEncodedSlashes enabled. It was possible to create and access thumbnails from media files in arbitrary accessible directories on the server that have a valid thumbnail configuration (JSON job file). It was also possible to detect the presence of files with the .json file extension anywhere on the server. This vulnerability is of high severity for affected sites. Server setups using Apache's default configuration or other servers that have been hardened against encoded slashes in URLs are not affected.

----

Introduction

A path traversal (also known as directory traversal) vulnerability occurs when untrusted input is used to build a filesystem path without properly confining the result to an intended base directory. By injecting sequences such as ../, an attacker can escape that directory and reach files elsewhere on the server.

Affected components

Kirby's media handler processes requests for files in the media directory that have not been generated yet. It parses the provided path and finds the correct file or asset from which to generate a thumbnail. Each thumbnail needs to have a prepared job file (a metadata file with file extension .json) in order to allow the media handler to generate it. Each parent (such as a page) has its own media directory, which in turn contains the individual files. Kirby's media handler searches for the file within the parent's media directory.

Impact

In affected releases, Kirby did not prevent path traversal in the filenames that were searched within the parent directory. In affected server setups where the attacker can provide encoded slashes (%2f) in the request, Kirby allowed the request to traverse away from the parent's media directory. Because the response differs between existing and non-existing thumbnail configurations, attackers were able to tell whether an arbitrary JSON file exists on the server (addressed by a relative path from the media directory of an arbitrary existing parent, including a relative path that points outside of the site's index root). For existing files with the file extension .json and a valid filename key (resulting in a valid job file), it was possible to generate thumbnails of the referenced media files, deleting the job file in the process. Patches

The problem has been patched in Kirby 4.9.5 and Kirby 5.5.2. Please update to one of these or a later version to fix the vulnerability.

In all of the mentioned releases, Kirby\Cms\Media::thumb() now rejects any filename that contains path information (anything other than a plain filename) before it is appended to the validated root. We have also hardened the file::version component to block paths that contain the ../ sequence.

Credits

Thanks to Jorge González Milla (@Pig-Tail) for responsibly reporting the identified issue.

Other sources

Kirby is an open-source content management system. Prior to 4.9.5 and 5.5.2, depending on the release line, Kirby's media handler in src/Cms/Media.php allowed Kirby\Cms\Media::thumb() to append a path-bearing filename to a validated parent media directory. On nginx, PHP's built-in server, or Apache with AllowEncodedSlashes enabled, a remote attacker could submit encoded slash characters such as %2f in the filename and traverse outside the parent's media directory. Differences between responses for existing and nonexistent thumbnail configurations disclosed whether an arbitrary .json file existed, and a .json file containing a valid filename key could cause the referenced image to be returned and the job file to be deleted. The related file::version path in src/Filesystem/Asset.php also accepted ../ sequences outside the intended index root. This issue is fixed in versions 4.9.5 and 5.5.2.

— MITRE

Affected Software

3 affected componentsFixes available
Kirby Kirby CMS>=4.9.0<4.9.5, >=5.0.0<5.5.2
composer/getkirby/cms>=5.0.0<5.5.2
5.5.2
composer/getkirby/cms<=4.9.4
4.9.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/getkirby/cms to a version that resolves this vulnerability.

    Fixed in 5.5.2
  2. Upgrade

    Upgrade composer/getkirby/cms to a version that resolves this vulnerability.

    Fixed in 4.9.5
  3. Upgrade

    Upgrade Kirby to a version that resolves this vulnerability.

    Fixed in 4.9.5Patch Kirby 4.9.5
  4. Upgrade

    Upgrade Kirby to a version that resolves this vulnerability.

    Fixed in 5.5.2Patch Kirby 5.5.2

Event History

Aug 31, 2026
CVE Published
via MITRE·08:53 PM
Data Sourced
via MITRE·08:53 PM
DescriptionWeakness
Data Sourced
via NVD·09:17 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·10:12 PM
Data Sourced
via GitHub·10:12 PM
DescriptionWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are exposed to remote exploitation?

Deployments running a vulnerable Kirby release are exposed when hosted on nginx, PHP's built-in server, or Apache with AllowEncodedSlashes enabled. These environments can pass encoded slash characters in a filename to the affected media handler.

2

What does an attacker need to send to exploit the media-handler issue?

The attacker needs to submit a filename containing encoded slash characters, such as %2f, so that the filename traverses outside the validated parent media directory. No authentication requirement is specified in the available information.

3

What information or files could be exposed or altered?

Response differences can reveal whether arbitrary .json files exist. If a reachable .json file contains a valid filename key, Kirby can return the image referenced by that key and delete the job file; the related file::version path also accepts ../ traversal outside its intended index root.

4

Which versions contain the fix?

Update to Kirby 4.9.5 on the 4.x release line or 5.5.2 on the 5.x release line. Versions prior to those releases are affected.

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