CVE-2022-39315: Getkirby/cms Remote Code Execution Vulnerability
MODERATECVE-2022-39315 is a MODERATE (CVSS 6.5) remote code execution vulnerability (CWE-668: Exposure of Resource to Wrong Sphere) affecting Getkirby/cms libraries in the Packagist ecosystem. The issue involves kirby cms vulnerable to user enumeration in the brute force protection. Remediation is available by upgrading affected packages to version 3.5.8.2, 3.6.6.2, 3.7.5.1, 3.8.1.
CVE-2022-39315 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N).
How to Fix CVE-2022-39315
To remediate this vulnerability, upgrade all affected Getkirby/cms dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade getkirby/cms to 3.5.8.2
Upgrade getkirby/cms to 3.6.6.2
Upgrade getkirby/cms to 3.7.5.1
Upgrade getkirby/cms to 3.8.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for getkirby/cms
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-39315, inspect your project dependencies for Getkirby/cms:
inspect dependencies for getkirby/cms
Analyze the terminal output to locate any version of Getkirby/cms in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.5.8.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-668: Exposure of Resource to Wrong Sphere, where the product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. In Getkirby/cms, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-39315 Affected Getkirby/cms Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
getkirby/cms
|
Packagist |
< 3.5.8.2
|
3.5.8.2
|
|
getkirby/cms
|
Packagist |
≥ 3.6.0
< 3.6.6.2
|
3.6.6.2
|
|
getkirby/cms
|
Packagist |
≥ 3.7.0
< 3.7.5.1
|
3.7.5.1
|
|
getkirby/cms
|
Packagist |
≥ 3.8.0
< 3.8.1
All 1 versions
3.8.0
|
3.8.1
|
References
Frequently Asked Questions
What is CVE-2022-39315?
Which Getkirby/cms versions are affected?
What version fixes CVE-2022-39315?
Is getkirby/cms affected?
What is the CVSS score of CVE-2022-39315?
What CWE is associated with CVE-2022-39315?
How can I check Packagist dependencies for CVE-2022-39315?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c27j-76xg-6x4f",
"modified" : "2022-10-18T21:16:27Z",
"published" : "2022-10-18T21:16:27Z",
"aliases" : [ "CVE-2022-39315" ],
"summary" : "Kirby CMS vulnerable to user enumeration in the brute force protection",
"details" : "### TL;DR\n\nThis vulnerability affects all Kirby sites with user accounts (unless Kirby's API and Panel are disabled in the config). It can only be exploited for targeted attacks because the attack does not scale to brute force.\n\n----\n\n### Introduction\n\nUser enumeration is a type of vulnerability that allows attackers to confirm which users are registered in a Kirby installation. This information can be abused for social engineering attacks against users of the site or to find out the organizational structure of the company.\n\nUser enumeration attacks are performed by entering an existing and a non-existing user into the email address field of the login form. If the system returns a different response or behaves differently depending on whether the user exists, the attacker can enter unknown email addresses and use the different behavior as a clue for the (non-)existing user.\n\n### Impact\n\nKirby comes with a built-in brute force protection. By default, it will prevent further login attempts after 10 failed logins from a single IP address or of a single existing user. After every failed login attempt, Kirby inserts a random delay between one millisecond and two seconds to make automated attacks harder and to avoid leaking whether the user exists. Unfortunately, this random delay was not inserted after the brute force limit was reached.\n\nBecause Kirby only tracks failed login attempts per email address for existing users but always tracks failed login attempts per IP address, this behavior could be abused by attackers for user enumeration. For this to work, an attacker would need to create login requests beyond the trials limit (which is 10 by default) from two or more IP addresses. After the trials limit was reached, the login form immediately blocked further requests for existing users, but not for invalid users.\n\nThis exploit does not scale to brute force attacks because of the delay during the first 10 requests per user, the faint difference between the responses for valid and invalid users and the fact that code-based logins would send an email for every login attempt, which makes the attack easy to spot. The vulnerability is therefore only relevant for targeted attacks.\n\n### Patches\n\nThe problem has been patched in [Kirby 3.5.8.2](https://github.com/getkirby/kirby/releases/tag/3.5.8.2), [Kirby 3.6.6.2](https://github.com/getkirby/kirby/releases/tag/3.6.6.2), [Kirby 3.7.5.1](https://github.com/getkirby/kirby/releases/tag/3.7.5.1) and [Kirby 3.8.1](https://github.com/getkirby/kirby/releases/tag/3.8.1). Please update to one of these or a [later version](https://github.com/getkirby/kirby/releases) to fix the vulnerability.\n\nIn all of the mentioned releases, we have rewritten the affected code so that the delay is also inserted after the brute force limit is reached.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "getkirby/cms"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.5.8.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "getkirby/cms"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.6.0"
}, {
"fixed" : "3.6.6.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "getkirby/cms"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.7.0"
}, {
"fixed" : "3.7.5.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "getkirby/cms"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.8.0"
}, {
"fixed" : "3.8.1"
} ]
} ],
"versions" : [ "3.8.0" ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/getkirby/kirby/security/advisories/GHSA-c27j-76xg-6x4f"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-39315"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/getkirby/kirby"
}, {
"type" : "WEB",
"url" : "https://github.com/getkirby/kirby/releases/tag/3.5.8.2"
}, {
"type" : "WEB",
"url" : "https://github.com/getkirby/kirby/releases/tag/3.6.6.2"
}, {
"type" : "WEB",
"url" : "https://github.com/getkirby/kirby/releases/tag/3.7.5.1"
}, {
"type" : "WEB",
"url" : "https://github.com/getkirby/kirby/releases/tag/3.8.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-204", "CWE-209", "CWE-668" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-10-18T21:16:27Z",
"nvd_published_at" : "2022-10-25T17:15:00Z"
}
}