# CVE-2025-31493: Path traversal of collection names during file system lookup

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.3
- **CVSS:** 6.3 (v4.0, CNA) `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: Present; Privileges required: None; User interaction: None; Confidentiality impact: Low; Integrity impact: Low; Availability impact: None; Confidentiality impact on other systems: Low; Integrity impact on other systems: Low; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.94% (percentile 59, 2026-11-26)
- **CWE:** CWE-22, CWE-23
- **Aliases:** GHSA-x275-h9j4-7p4h
- **Published:** 2025-05-13T15:24:40.178Z
- **Modified:** 2026-06-17T09:10:29.913Z

## Who should check

- Projects that depend on Packagist package getkirby/cms (\< 3.9.8.3)
- Anyone running getkirby kirby \< 3.9.8.3; \>= 3.10.0, \< 3.10.1.2; \>= 4.0.0, \< 4.7.1

## Description

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.

## Affected and fixed versions

- Packagist `getkirby/cms`: affected \< 3.9.8.3; fixed 3.9.8.3, 3.10.1.2, 4.7.1 (osv)
- getkirby kirby: \< 3.9.8.3; \>= 3.10.0, \< 3.10.1.2; \>= 4.0.0, \< 4.7.1 (cvelist)

## Mitigation

- Upgrade getkirby/cms to one of 3.9.8.3, 3.10.1.2, 4.7.1 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-31493. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-31493.md
Affected: getkirby/cms < 3.9.8.3
Fixed in: 3.9.8.3, 3.10.1.2, 4.7.1

Steps:
1. Search this machine and project for getkirby/cms (Packagist), getkirby kirby: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-31493 being exploited?

There is no confirmed exploitation: CVE-2025-31493 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.94% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-31493?

Medium: CVSS 6.3 (v4.0, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2025-31493?

getkirby/cms \< 3.9.8.3.

### Is there a fix for CVE-2025-31493?

Yes. Fixed in 3.9.8.3, 3.10.1.2, 4.7.1. Upgrade getkirby/cms to one of 3.9.8.3, 3.10.1.2, 4.7.1 (or later in the same release line).

### How do I check if I'm affected by CVE-2025-31493?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/getkirby/kirby/security/advisories/GHSA-x275-h9j4-7p4h>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2025-31493>
- patch: <https://github.com/getkirby/kirby/commit/95a51480a426a8ed0df799cc017403be9b987ced>
- other: <https://github.com/getkirby/kirby/releases/tag/3.10.1.2>
- other: <https://github.com/getkirby/kirby/releases/tag/3.9.8.3>
- other: <https://github.com/getkirby/kirby/releases/tag/4.7.1>
- other: <https://github.com/getkirby/kirby>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-31493>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-x275-h9j4-7p4h> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2025-31493> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-31493>
