Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. getkirby/cms
  4. ›
  5. CVE-2025-31493

CVE-2025-31493: Kirby vulnerable to path traversal of collection names during file system lookup

May 13, 2025

The 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, for example:

  • it could allow the attacker to build a map of the server’s file system for subsequent attacks,
  • it could allow access to configuration files that may contain sensitive information like security tokens or
  • it could cause the unintended execution of PHP scripts.

References

  • github.com/advisories/GHSA-x275-h9j4-7p4h
  • github.com/getkirby/kirby
  • github.com/getkirby/kirby/commit/95a51480a426a8ed0df799cc017403be9b987ced
  • github.com/getkirby/kirby/releases/tag/3.10.1.2
  • github.com/getkirby/kirby/releases/tag/3.9.8.3
  • github.com/getkirby/kirby/releases/tag/4.7.1
  • github.com/getkirby/kirby/security/advisories/GHSA-x275-h9j4-7p4h
  • nvd.nist.gov/vuln/detail/CVE-2025-31493

Code Behaviors & Features

Detect and mitigate CVE-2025-31493 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 3.9.8.3, all versions starting from 3.10.0 before 3.10.1.2, all versions starting from 4.0.0 before 4.7.1

Fixed versions

  • 3.9.8.3
  • 3.10.1.2
  • 4.7.1

Solution

Upgrade to versions 3.10.1.2, 3.9.8.3, 4.7.1 or above.

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-23: Relative Path Traversal

Source file

packagist/getkirby/cms/CVE-2025-31493.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Wed, 14 May 2025 12:15:41 +0000.