CVE-2026-104883: contao/core-bundle: Non-admin users can self-grant permissions that implicitly make them administrators
Contao core-bundle lets a non-admin backend user who manages users or groups give themselves the theme_import permission, which allows PHP code execution on the server. It bypasses the template editor protection added in 5.7.3. Upgrade contao/core-bundle to 5.3.50 on the 5.3 line, or 5.7.12 on 5.4 to 5.7.
Published Nov 20, 2026 · Analysis Nov 21, 2026
What an attacker can do
Contao 5.7.3 added TemplateEditorModuleVoter and CheckTemplateEditorSaveListener so a non-admin cannot grant themselves the tpl_editor module, because editable PHP-capable templates give server-side code execution. That voter only covers the modules field and the value tpl_editor.
The theme_import capability is just as dangerous but sits in the themes checkbox field of tl_user and tl_user_group. That field has no save_callback and no voter, and the template editor voter is the only one registered for tl_user_group. The reporter reproduced it on Contao 5.7.9: a delegated user manager edits a group or account, adds themes to the modules field and theme_import to the themes field, and both are accepted. After logging in again the account can import themes.
The attacker needs a backend account with the user or group module, a role the administrator meant to keep away from code access. The CVSS vector reflects high privileges. The result is arbitrary PHP execution and full compromise of the installation, so sites with delegated user managers should treat it as urgent.
Who is affected
contao/core-bundle from 5.0.0 up to but not including 5.3.50, and from 5.4.0-RC1 up to but not including 5.7.12. Installations are only at risk if a non-admin backend user holds the user or group module.
composer show contao/core-bundlecontao/core-bundle
- Ecosystem
- Composer (PHP)
- Affected
- >= 5.0.0, < 5.3.50
- Fixed in
- 5.3.50
- Check
composer show contao/core-bundle
contao/core-bundle
- Ecosystem
- Composer (PHP)
- Affected
- >= 5.4.0-RC1, < 5.7.12
- Fixed in
- 5.7.12
- Check
composer show contao/core-bundle
How to fix it
Upgrade to 5.3.50 if you run the 5.3 line, or to 5.7.12 for 5.4 through 5.7.
composer update contao/core-bundleThe advisory names no workaround. Until you upgrade, remove the user and group modules from non-admin backend groups.
How to tell if you were hit
Open the backend groups and users and look for the themes module or the theme_import option on accounts that are not administrators. Compare with an earlier database backup of tl_user and tl_user_group. Look in the Contao system log for changes to groups or users made by delegated managers, and for unexpected theme imports or new PHP files after them.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Commit 2b83a60f7763 (5.7.3) hardened the template editor: it added TemplateEditorModuleVoter + CheckTemplateEditorSaveListener so a non-admin cannot self-grant the tpl_editor backend module (editable PHP-capable templates permit server-side code execution). That voter supports only the modules field and the literal value tpl_editor.
The equally RCE-capable theme_import capability lives in a different field - the themes checkbox field (tl_user_group.php:98-105 options include theme_import; identical on tl_user.php:248-253) - which has no save_callback and no voter. TemplateEditorModuleVoter is the only DC voter registered for tl_user_group, and it does not cover the themes field. So a delegated user manager can add theme_import to their own (or a managed) account.
Live repro (Contao 5.7.9):
- As admin, create a non-admin backend group with the
user(orgroup) module (a delegated user manager), and a user in it. Confirm the user cannot accesstpl_editor(blocked by the 5.7.3 voter). - As that non-admin, edit a group/account: add
themesto the modules field andtheme_importto the themes field (both accepted - onlytpl_editoris blocked). Re-authenticate.
Impact
A delegated user/group manager (a role explicitly not trusted with template/code access) escalates to arbitrary PHP execution on the server, fully compromising the installation. This bypasses the exact protection the 5.7.3 tpl_editor fix introduced.
Credits
This security vulnerability was found by @HDWSec
Credited to HDWSec.
Questions
- Does GHSA-r9qp-pqx5-8369 need an administrator account?
No. It needs a non-admin backend account with the user or group module. That account can then grant itself theme_import, which gives code execution.
- Does the 5.7.3 template editor fix protect me?
Not fully. That fix blocks only the tpl_editor value in the modules field. The theme_import value in the themes field was not covered until 5.3.50 and 5.7.12.
- Which versions are fixed?
5.3.50 for the 5.3 line and 5.7.12 for versions from 5.4.0-RC1 to 5.7.
- Is it exploited in the wild?
The sources do not report exploitation and the entry has no CISA KEV record.
References
Read for this analysis:
- https://github.com/contao/contao/security/advisories/GHSA-r9qp-pqx5-8369
- https://github.com/contao/contao/pull/10153
- https://github.com/contao/contao/commit/211498f28d4c86484b96eb0612c1193105b79e51
- https://github.com/contao/contao/commit/a58eb71ef5a7a87da9d90980579dbeb6688448b4
- https://github.com/FriendsOfPHP/security-advisories/blob/master/contao/contao/CVE-2026-104883.yaml
- https://github.com/FriendsOfPHP/security-advisories/blob/master/contao/core-bundle/CVE-2026-104883.yaml
- https://github.com/contao/contao/blob/a11109b60dedcbd99e32a4e8550afdadb500f2c5/CHANGELOG.md
- https://github.com/contao/contao/blob/a6543f49a92187a7368f51b290179c4795386e23/CHANGELOG.md
- https://github.com/contao/contao/tree/5.3.50
- https://github.com/contao/contao/tree/5.7.12
- https://github.com/advisories/GHSA-r9qp-pqx5-8369
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Composer (PHP) vulnerabilities
All Composer (PHP) entriesCVE-2026-104882
contao/core-bundle: Improper access control in the CSV import wizard
medium6.5Nov 20, 2026CVE-2026-104884
contao/core-bundle: Cross-site scripting in the frontend search results
medium5.4Nov 20, 2026CVE-2026-107842
Contao: Protected page content is disclosed to anonymous visitors after contao.search.index_protected is disabled
medium5.3Oct 9, 2026CVE-2026-107843
Contao: The registration module re-sends activation mails
medium5.3Oct 9, 2026CVE-2026-107844
Contao: Path traversal in the images controller
medium5.3Oct 9, 2026CVE-2026-107848
Contao: Cross-site request forgery in custom backend actions
low3.5Oct 9, 2026
