- Package
- contao/comments-bundle
- Fixed in
- 5.3.50, 5.7.12
- Published
- Fri 9 Oct 2026, 21:53 LisbonUpdated Sun 25 Oct 2026, 22:25 Lisbon
- Installs on Packagist
- 1M
In plain words
An unauthenticated front end visitor can post a comment containing a script that runs as whichever back end user opens the Comments module, without further interaction. It can act with that user's access, including reading accessible modules, creating an administrator or editing a template, which can lead to code execution. Comment moderation does not prevent this: unpublished comments are stored, and opening the list to moderate them triggers exposure.
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| contao/comments-bundle | >= 4.0.0, < 5.3.50 | 5.3.50 |
| contao/comments-bundle | >= 5.4.0-RC1, < 5.7.12 | 5.7.12 |
Am I affected?
Check composer.lock for contao/comments-bundle. Affected versions are >= 4.0.0, < 5.3.50 and >= 5.4.0-RC1, < 5.7.12; the fixes are 5.3.50 and 5.7.12. Check whether front end visitors can submit comments and back end users open the Comments module. Moderation does not protect those users, and the advisory states that the Contao back end sends no Content-Security-Policy header.
What to do
Check which version you have, then update to a fixed release for your branch (5.3.50, 5.7.12):
composer show contao/comments-bundle | grep versions
composer update contao/comments-bundle
If your version constraint in composer.json keeps you below a fixed release, raise it first. Whether your configuration is affected, and the exact version ranges, are in the advisory itself.
The advisory's description
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.
Weakness: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'); CWE-116 Improper Encoding or Escaping of Output. Reported by HDWSec.
The advisory
- GitHub Advisory Database: GHSA-628f-v4f6-p37r, with who is affected and how
- OSV.dev: GHSA-628f-v4f6-p37r
- The week's digest, with the other advisories from 5 Oct 2026
- All advisories for contao/comments-bundle