CVE-2026-107845: Contao: Cross-site scripting in the comments bundle
An unauthenticated front end visitor can post a comment containing a XSS injection. The victim is any back end user who opens the Comments module, and moderation makes exposure certain rather than preventing it. No Content-Security-Policy header is sent on the Contao back end, so nothing mitigates the inline handler.
Impact
Anyone on the internet can inject script that executes in the Contao back end origin, under the session of whichever user opens the Comments module, with no click and no hover. From there the payload acts as that user through the back end: reading any module they can reach, creating a new administrator, or editing a template, which on Contao is a documented path from back end write access to code execution. Moderation does not help and in fact guarantees exposure, since unpublished comments are still inserted and a moderator has to open the list to act on them.
Other sources
Contao is an Open Source CMS. From version 4.0.0 until 5.3.50 and 5.7.12, an unauthenticated visitor can submit a comment whose email or website metadata is rendered without sufficient attribute and URL encoding by listComments() in comments-bundle/contao/dca/tlcomments.php. When a backend user opens the Comments module, attacker-controlled script can execute in the Contao backend origin under that user's session. Unpublished comments remain visible to moderators, so moderation does not prevent exposure. This issue is fixed in versions 5.3.50 and 5.7.12.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
composer/contao/comments-bundleto a version that resolves this vulnerability.Fixed in 5.7.12 - Upgrade
Upgrade
composer/contao/comments-bundleto a version that resolves this vulnerability.Fixed in 5.3.50 - Upgrade
Upgrade
Contaoto a version that resolves this vulnerability.Fixed in 5.3.50 - Upgrade
Upgrade
Contaoto a version that resolves this vulnerability.Fixed in 5.7.12
Event History
Frequently Asked Questions
Who is exposed to this issue?
Contao installations running versions from 4.0.0 through versions before 5.3.50 or 5.7.12 are affected. The exposed users are backend users who open the Comments module after an attacker submits a crafted comment.
What does an attacker need to exploit it?
An attacker does not need authentication. They need to submit a comment containing malicious content in the email or website metadata and induce a backend user to view the Comments module.
Does comment moderation prevent exploitation?
No. Unpublished comments are still visible to moderators, so a crafted comment can execute script when a moderator reviews it.
What versions fix the issue?
The issue is fixed in Contao 5.3.50 and 5.7.12.