Kirby CMS Authorization Bypass via Blueprint Injection
An authorization bypass vulnerability in Kirby CMS allows authenticated users to perform actions they should not be allowed to perform based on their configured permissions by injecting custom dynamic blueprint configuration into the model data, leading to privilege escalation.
Triage facts
Revision 2- Applicability
- Kirby CMS
- Evidence
- Unknown
- Severity
- High
- Sources
- 4 public sources
- Freshness
- Revision 2Apr 25, 12:00 UTC
- Detection
- 2 rules
Revision history 1 entry · Revision 2
- Revision 2
Repaired a legacy canonical identity collision
Changed: slug
A high-severity authorization bypass vulnerability has been identified in Kirby CMS versions prior to 4.9.0 and between 5.0.0 and 5.4.0. The vulnerability allows authenticated users to perform actions they should not be authorized to perform, such as creating pages, files, or users, even if their roles lack the necessary permissions (pages.create, files.create, or users.create). This bypass occurs due to the injection of custom dynamic blueprint configurations into the model data during the creation process. By manipulating the options parameter, an attacker can override intended permissions and options configured by the site developer in the user and model blueprints. The vulnerability was reported by @offset and patched in Kirby 4.9.0 and 5.4.0.
Attack Chain
- An attacker authenticates to the Kirby CMS with a valid user account that lacks the
pages.create,files.create, orusers.createpermissions. - The attacker crafts a malicious HTTP request to create a new page, file, or user.
- The malicious request injects a custom dynamic blueprint configuration into the model data via the
optionsparameter. This injected configuration includes'create' => true, effectively overriding the default permission settings. - Kirby CMS processes the request without properly sanitizing or validating the injected blueprint configuration.
- The injected
optionsparameter overrides the permissions configured in the user blueprint and/or the blueprint of the target model. - The system incorrectly authorizes the user to create the page, file, or user, despite their role not having the necessary permissions.
- The new page, file, or user is successfully created with the attacker's injected configuration.
- The attacker has successfully escalated their privileges and can now perform actions they were not intended to perform.
Impact
Successful exploitation of this vulnerability allows authenticated users to bypass intended permission controls and perform unauthorized actions within the Kirby CMS. This can lead to unauthorized content creation, modification, or deletion, potentially compromising the integrity and confidentiality of the website. An attacker could create administrative accounts, modify critical pages, or upload malicious files, leading to a full compromise of the Kirby CMS instance. The severity is high because any authenticated user can exploit it if the site is misconfigured.
Recommendation
- Upgrade to Kirby CMS version 4.9.0 or 5.4.0 or later to apply the patch that filters the
blueprintproperty during the creation of pages, files, and users. - Review user and model blueprints to ensure permissions are correctly configured, specifically for
pages.create,files.create, andusers.create. - Monitor web server logs for suspicious POST requests to endpoints responsible for creating pages, files, or users.
- Implement the Sigma rule
Detect Kirby CMS Blueprint Injectionto detect attempts to inject dynamic blueprint configurations via HTTP requests.
Detection coverage 2
Detect Kirby CMS Blueprint Injection
highDetects attempts to inject dynamic blueprint configurations into Kirby CMS during page, file, or user creation by monitoring POST requests with suspicious parameters.
Detect Kirby CMS Unauthorized User Creation
mediumDetects attempts to create new users when the logged in user shouldn't have the permission to do so.
Detection queries are available on the platform. Get full rules →