CVE-2025-31493

Kirby is an open-source content management system. A vulnerability in versions prior to 3.9.8.3, 3.10.1.2, and 4.7.1 affects all Kirby sites that use the `collection()` helper or `$kirby->collection()` method with a dynamic collection name (such as a collection name that depends on request or user data). Sites that only use fixed calls to the `collection()` helper/`$kirby->collection()` method (i.e. calls with a simple string for the collection name) are *not* affected. A missing path traversal check allowed attackers to navigate and access all files on the server that were accessible to the PHP process, including files outside of the collections root or even outside of the Kirby installation. PHP code within such files was executed. Such attacks first require an attack vector in the site code that is caused by dynamic collection names, such as `collection('tags-' . get('tags'))`. It generally also requires knowledge of the site structure and the server's file system by the attacker, although it can be possible to find vulnerable setups through automated methods such as fuzzing. In a vulnerable setup, this could cause damage to the confidentiality and integrity of the server. The problem has been patched in Kirby 3.9.8.3, Kirby 3.10.1.2, and Kirby 4.7.1. In all of the mentioned releases, the maintainers of Kirby have added a check for the collection path that ensures that the resulting path is contained within the configured collections root. Collection paths that point outside of the collections root will not be loaded.
Configurations

Configuration 1 (hide)

OR cpe:2.3:a:getkirby:kirby:*:*:*:*:*:*:*:*
cpe:2.3:a:getkirby:kirby:*:*:*:*:*:*:*:*
cpe:2.3:a:getkirby:kirby:*:*:*:*:*:*:*:*

History

26 Aug 2025, 14:33

Type Values Removed Values Added
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 9.1
CPE cpe:2.3:a:getkirby:kirby:*:*:*:*:*:*:*:*
First Time Getkirby
Getkirby kirby
References () https://github.com/getkirby/kirby/releases/tag/3.10.1.2 - () https://github.com/getkirby/kirby/releases/tag/3.10.1.2 - Release Notes
References () https://github.com/getkirby/kirby/releases/tag/3.9.8.3 - () https://github.com/getkirby/kirby/releases/tag/3.9.8.3 - Release Notes
References () https://github.com/getkirby/kirby/releases/tag/4.7.1 - () https://github.com/getkirby/kirby/releases/tag/4.7.1 - Release Notes
References () https://github.com/getkirby/kirby/security/advisories/GHSA-x275-h9j4-7p4h - () https://github.com/getkirby/kirby/security/advisories/GHSA-x275-h9j4-7p4h - Vendor Advisory
Summary
  • (es) Kirby es un sistema de gestión de contenido de código abierto. Una vulnerabilidad en versiones anteriores a 3.9.8.3, 3.10.1.2 y 4.7.1 afecta a todos los sitios de Kirby que usan el asistente `collection()` o el método `$kirby->collection()` con un nombre de colección dinámico (como un nombre de colección que depende de la solicitud o los datos del usuario). Los sitios que solo usan llamadas fijas al asistente `collection()`/método `$kirby->collection()` (es decir, llamadas con una cadena simple para el nombre de la colección) *no* se ven afectados. La falta de una comprobación de path traversal permitió a los atacantes navegar y acceder a todos los archivos en el servidor a los que tenía acceso el proceso PHP, incluyendo archivos fuera del root de las colecciones o incluso fuera de la instalación de Kirby. Se ejecutó el código PHP dentro de dichos archivos. Dichos ataques primero requieren un vector de ataque en el código del sitio que es causado por nombres de colecciones dinámicos, como `collection('tags-' . get('tags'))`. Generalmente, también requiere que el atacante conozca la estructura del sitio y el sistema de archivos del servidor, aunque es posible encontrar configuraciones vulnerables mediante métodos automatizados como el fuzzing. En una configuración vulnerable, esto podría dañar la confidencialidad e integridad del servidor. El problema se ha corregido en Kirby 3.9.8.3, Kirby 3.10.1.2 y Kirby 4.7.1. En todas las versiones mencionadas, los desarrolladores de Kirby han añadido una comprobación de la ruta de la colección que garantiza que la ruta resultante esté dentro del root de las colecciones configurada. Las rutas de colección que apunten fuera del root de las colecciones no se cargarán.

13 May 2025, 16:15

Type Values Removed Values Added
New CVE

Information

Published : 2025-05-13 16:15

Updated : 2025-08-26 14:33


NVD link : CVE-2025-31493

Mitre link : CVE-2025-31493

CVE.ORG link : CVE-2025-31493


JSON object : View

Products Affected

getkirby

  • kirby
CWE
CWE-22

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

CWE-23

Relative Path Traversal