Miggo Logo

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

6.3

CVSS Score
4.0

Basic Information

EPSS Score
0.26718%
Published
5/13/2025
Updated
5/13/2025
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Package NameEcosystemVulnerable VersionsFirst Patched Version
getkirby/cmscomposer< 3.9.8.33.9.8.3
getkirby/cmscomposer>= 3.10.0, < 3.10.1.23.10.1.2
getkirby/cmscomposer>= 4.0.0, < 4.7.14.7.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability description clearly states that the collection() helper or $kirby->collection() method is vulnerable due to improper path traversal handling when loading collection files. The provided commit 95a51480a426a8ed0df799cc017403be9b987ced directly modifies the load method within the Kirby\Cms\Collections class. The patch changes the file existence check from a simple is_file($file) to F::exists($file, $root). This change indicates that the load function was the point where the path traversal occurred, as it was responsible for constructing the file path from user input ($name) and loading it. The F::exists function, when provided with a root directory, is designed to prevent traversal outside that root. Therefore, Kirby\Cms\Collections::load is the vulnerable function that processes the malicious input (the collection name) and attempts to load a file based on it.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### TL;*R T*is vuln*r**ility *****ts *ll Kir*y sit*s t**t us* t** `*oll**tion()` **lp*r or `$kir*y->*oll**tion()` m*t*o* wit* * *yn*mi* *oll**tion n*m* (su** *s * *oll**tion n*m* t**t **p*n*s on r*qu*st or us*r **t*). Sit*s t**t only us* *ix** **ll

Reasoning

T** vuln*r**ility **s*ription *l**rly st*t*s t**t t** `*oll**tion()` **lp*r or `$kir*y->*oll**tion()` m*t*o* is vuln*r**l* *u* to improp*r p*t* tr*v*rs*l **n*lin* w**n lo**in* *oll**tion *il*s. T** provi*** *ommit `***********************************