CVE-2022-39314: Kirby CMS vulnerable to user enumeration in the code-based login and password reset forms

Published Oct 18, 2022
·
Updated

TL;DR

This vulnerability only affects you if you are using the code or password-reset auth method with the auth.methods option. It can only be successfully exploited under server configuration conditions outside of the attacker's control.

----

Introduction

User 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.

User 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.

Impact

Under normal circumstances, entering an invalid email address results in a "fake" login code form that looks exactly like the one of an existing user (unless debugging is enabled). However, the code that handles the creation of a code challenge (for code-based login or password reset) didn't catch errors that occurred while the challenge request was processed:

- If the challenge itself runs into an error (e.g. if the email could not be sent), attackers could tell existing users (where the challenge code is called) from non-existing users (where the challenge code is not called and therefore does not output an error). - If you are using the user.login:failed hook and any exception is thrown within the hook, attackers could see that the user does not exist.

As long as no error occurs during challenge creation and during the processing of the user.login:failed hook, your Kirby sites are not affected by this vulnerability.

Patches

The problems have been patched in Kirby 3.5.8.2, Kirby 3.6.6.2, Kirby 3.7.5.1 and Kirby 3.8.1. Please update to one of these or a later version to fix the vulnerability.

All of the mentioned releases contain two patches for this vulnerability:

- All errors that occur during the creation of an auth challenge (code-based login or password reset) are swallowed by the backend and only displayed to the user if debugging is enabled. - We added a new auth.debug option that can be enabled separately from the debug option. If disabled, auth errors are only printed to the PHP error log. This ensures that security-critical errors are only displayed if they are really necessary for debugging.

Workarounds

We recommend to update to one of the patch releases. If you cannot update immediately, you can work around the issue by setting the auth.methods option to password, which disables the code-based login and password reset forms.

However please note that your site will still be vulnerable against another user enumeration issue that was also fixed in the same patch releases.

Credits

Thanks to Florian Merz (@florianmrz) of hatchery.io for responsibly reporting the identified issue.

Other sources

Kirby CMS vulnerable to user enumeration in the code-based login and password reset forms

— Packagist

Kirby is a flat-file CMS. In versions prior to 3.5.8.2, 3.6.6.2, 3.7.5.1, and 3.8.1, Kirby is subject to user enumeration due to Improper Restriction of Excessive Authentication Attempts. This vulnerability affects you only if you are using the code or password-reset auth method with the auth.methods option or if you have enabled the debug option in production. By using two or more IP addresses and multiple login attempts, valid user accounts will lock, but invalid accounts will not, leading to account enumeration. This issue has been patched in versions 3.5.8.2, 3.6.6.2, 3.7.5.1, and 3.8.1. If you cannot update immediately, you can work around the issue by setting the auth.methods option to password, which disables the code-based login and password reset forms.

— MITRE

Affected Software

15 affected componentsFixes available
getkirby Kirby<3.5.8.2
getkirby Kirby>=3.6.0<3.6.6.2
getkirby Kirby>=3.7.0<3.7.5.1
getkirby Kirby=3.8.0
getkirby Kirby=3.8.0-rc1
getkirby Kirby=3.8.0-rc2
getkirby Kirby=3.8.0-rc3
composer/getkirby/cms=3.8.0
composer/getkirby/cms>=3.7.0, <3.7.5.1
3.7.5.1
composer/getkirby/cms>=3.6.0, <3.6.6.2
3.6.6.2
composer/getkirby/cms>=3.5.0, <3.5.8.2
3.5.8.2
composer/getkirby/cms=3.8.0
3.8.1
composer/getkirby/cms>=3.7.0<3.7.5.1
3.7.5.1
composer/getkirby/cms>=3.6.0<3.6.6.2
3.6.6.2
composer/getkirby/cms>=3.5.0<3.5.8.2
3.5.8.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/getkirby/cms to a version that resolves this vulnerability.

    Fixed in 3.7.5.1
  2. Upgrade

    Upgrade composer/getkirby/cms to a version that resolves this vulnerability.

    Fixed in 3.6.6.2
  3. Upgrade

    Upgrade composer/getkirby/cms to a version that resolves this vulnerability.

    Fixed in 3.5.8.2
  4. Upgrade

    Upgrade composer/getkirby/cms to a version that resolves this vulnerability.

    Fixed in 3.8.1
  5. Upgrade

    Upgrade Kirby to a version that resolves this vulnerability.

    Fixed in 3.8.1
  6. Configuration

    Set auth.methods to password to disable code-based login and password reset forms until Kirby is updated.

    Kirby auth.methods = password

Event History

Oct 18, 2022
Advisory Published
via GitHub·09:14 PM
Data Sourced
via GitHub·09:14 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via Packagist·09:14 PM
DescriptionSeverityAffected Software
Oct 24, 2022
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:15 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2022-39314?

CVE-2022-39314 has been classified as a high severity vulnerability due to improper restriction of excessive authentication attempts.

2

How do I fix CVE-2022-39314?

To fix CVE-2022-39314, update Kirby to version 3.5.8.2, 3.6.6.2, 3.7.5.1, or 3.8.1 or later.

3

What versions of Kirby are affected by CVE-2022-39314?

CVE-2022-39314 affects Kirby versions prior to 3.5.8.2, between 3.6.0 and 3.6.6.2, between 3.7.0 and 3.7.5.1, and 3.8.0.

4

Who is affected by CVE-2022-39314?

Users of Kirby who employ the 'code' or 'password-reset' authentication methods are affected by CVE-2022-39314.

5

What type of vulnerability is CVE-2022-39314?

CVE-2022-39314 is categorized as a user enumeration vulnerability due to improper restriction of excessive authentication attempts.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203