CVE-2025-31493
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedKirby 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceA path traversal vulnerability in Kirby CMS allows attackers to access arbitrary files on the server via the collection() helper/method when using dynamic collection names (e.g., collection('tags-' . get('tags'))). The missing path validation permits navigation outside the collections root, enabling file reads and PHP code execution. Fixed collection name calls are not affected.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data< 3.9.8.3>= 3.10.0, < 3.10.1.2>= 4.0.0, < 4.7.1CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify Kirby CMS versionCheck the composer.json file in the project root for the 'getkirby/kirby' package version, or look for version comments in index.php or site/config/config.phpAffected if The installed version is < 3.9.8.3, OR >= 3.10.0 and < 3.10.1.2, OR >= 4.0.0 and < 4.7.1
-
Locate collection() helper usageSearch the codebase (specifically in site/ folder, controllers, and templates) for occurrences of the collection() function callAffected if The collection() helper is used in the codebase
-
Identify dynamic collection namesExamine each collection() call for dynamic name construction using string concatenation with user input, such as collection('prefix-' . get('param')) or collection($variable)Affected if Any collection() call uses a collection name constructed from user input (GET/POST parameters, URL segments, or user-controlled variables)
-
Verify path traversal riskConfirm the dynamic collection name is not using fixed strings - the vulnerability only applies when collection names incorporate unvalidated external inputAffected if The collection name contains user-controlled data concatenated with strings, allowing traversal like 'collections/../../file'
You are affected if your Kirby version is in the vulnerable ranges AND your codebase uses the collection() helper with dynamic collection names that incorporate user input.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped3.9.8.33.10.1.24.7.1
Upgrade Kirby to versions 3.9.8.3, 3.10.1.2, or 4.7.1 or later. Audit all uses of the collection() helper to identify dynamic collection names that incorporate user input and either upgrade or remove vulnerable patterns.
Kirby 3.9.8.3, 3.10.1.2, or 4.7.1 (or latest in respective branch)
- Identify the current Kirby version by checking the kirby/composer.json file or the site's composer.lock
- For Kirby 3.9.x: upgrade to version 3.9.8.3 or later
- For Kirby 3.10.x: upgrade to version 3.10.1.2 or later
- For Kirby 4.x: upgrade to version 4.7.1 or later
- Run composer update to apply the version changes
- Test the collection() functionality to ensure the site still works correctly
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation2.0 h
- Implementation1.0 h
- Testing2.0 h
- Review / QA1.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,696.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2025-31493 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2025-31493 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data