Kirby Panel users could upload PHP Phar archives as content files before v2.5.14 and v3.4.5
The advisory, in context
Impact
An editor with full access to the Kirby Panel can upload a PHP .phar file and execute it on the server. This vulnerability is critical if you might have potential attackers in your group of authenticated Panel users, as they can gain access to the server with such a Phar file.
Visitors without Panel access cannot use this attack vector.
Patches
The problem has been patched in Kirby 2.5.14 and Kirby 3.4.5. Please update to one of these or a later version to fix the vulnerability.
Note: Kirby 2 reaches end of life on December 31, 2020. We therefore recommend to upgrade your Kirby 2 sites to Kirby 3. If you cannot upgrade, we still recommend to update to Kirby 2.5.14.
Workarounds
Kirby 2 sites on older releases can also be patched by applying the changes from this commit.
Credits
Thanks to Thore Imhof of Accenture for reporting the problem.
Affected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
Earlier releases before 2.5.14
Fixed in 2.5.14
24 explicitly affected versions
2.4.0, 2.4.1, 2.4.2, 2.5.0, 2.5.1, 2.5.10, 2.5.11, 2.5.11-RC-1, 2.5.12, 2.5.13, 2.5.2, 2.5.3, 2.5.4, 2.5.5, 2.5.5-RC-1, 2.5.6, 2.5.6-RC-1, 2.5.7, 2.5.7-RC-1, 2.5.8, 2.5.8-RC-1, 2.5.9, 2.5.9-RC-1, 2.5.9-RC-2
View affected-version evidence
{
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.5.14"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.4.0",
"2.4.1",
"2.4.2",
"2.5.0",
"2.5.1",
"2.5.10",
"2.5.11",
"2.5.11-RC-1",
"2.5.12",
"2.5.13",
"2.5.2",
"2.5.3",
"2.5.4",
"2.5.5",
"2.5.5-RC-1",
"2.5.6",
"2.5.6-RC-1",
"2.5.7",
"2.5.7-RC-1",
"2.5.8",
"2.5.8-RC-1",
"2.5.9",
"2.5.9-RC-1",
"2.5.9-RC-2"
]
}From 3.0.0 before 3.4.5
Fixed in 3.4.5
61 explicitly affected versions
3.0.0, 3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.2",
"3.3.0",
"3.3.0-rc.1",
"3.3.0-rc.2",
"3.3.0-rc.3",
"3.3.0-rc.4",
"3.3.0-rc.5",
"3.3.1",
"3.3.1-rc.1",
"3.3.2",
"3.3.2-rc.1",
"3.3.3",
"3.3.3-rc.1",
"3.3.4",
"3.3.4-rc.1",
"3.3.5",
"3.3.5-rc.1",
"3.3.6",
"3.4.0",
"3.4.0-rc.1",
"3.4.0-rc.2",
"3.4.0-rc.3",
"3.4.1",
"3.4.1-rc.1",
"3.4.2",
"3.4.3",
"3.4.3-rc.1",
"3.4.4",
"3.4.4-rc.1"
]
}References
- https://github.com/getkirby/kirby/security/advisories/GHSA-g3h8-cg9x-47qw
- https://nvd.nist.gov/vuln/detail/CVE-2020-26255
- https://github.com/getkirby-v2/panel/commit/5a569d4e3ddaea2b6628d7ec1472a3e8bc410881
- https://github.com/getkirby/kirby/commit/db8f371b13036861c9cc5ba3e85e27f73fce5e09
- https://github.com/getkirby/kirby
- https://github.com/getkirby/kirby/releases/tag/3.4.5
- https://packagist.org/packages/getkirby/cms
- https://packagist.org/packages/getkirby/panel