CVE-2026-107845: Contao Cross-Site Scripting Vulnerability
CRITICALCVE-2026-107845 is a CRITICAL (CVSS 9.3) cross-site scripting vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting Contao libraries in the Packagist ecosystem. The issue involves cross-site scripting in the comments bundle. Remediation is available by upgrading affected packages to version 5.3.50, 5.7.12.
CVE-2026-107845 at a Glance
Security Impact
CVSS: 9.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N).
How to Fix CVE-2026-107845
To remediate this vulnerability, upgrade all affected Contao dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade contao/comments-bundle to 5.3.50
Upgrade contao/comments-bundle to 5.7.12
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for contao/comments-bundle
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-107845, inspect your project dependencies for Contao:
inspect dependencies for contao/comments-bundle
Analyze the terminal output to locate any version of Contao in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.3.50), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. In Contao, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-107845 Affected Contao Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
contao/comments-bundle
|
Packagist |
≥ 4.0.0
< 5.3.50
|
5.3.50
|
|
contao/comments-bundle
|
Packagist |
≥ 5.4.0-RC1
< 5.7.12
|
5.7.12
|
References
Frequently Asked Questions
What is CVE-2026-107845?
Which Contao versions are affected?
What version fixes CVE-2026-107845?
Is contao/comments-bundle affected?
What is the CVSS score of CVE-2026-107845?
What CWE is associated with CVE-2026-107845?
How can I check Packagist dependencies for CVE-2026-107845?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-628f-v4f6-p37r",
"modified" : "2026-10-09T20:53:51Z",
"published" : "2026-10-09T20:53:50Z",
"aliases" : [ "CVE-2026-107845" ],
"summary" : "Contao: Cross-site scripting in the comments bundle",
"details" : "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.\n\n### Impact\n\nAnyone 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "contao/comments-bundle"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "5.3.50"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "contao/comments-bundle"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.4.0-RC1"
}, {
"fixed" : "5.7.12"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/contao/contao/security/advisories/GHSA-628f-v4f6-p37r"
}, {
"type" : "WEB",
"url" : "https://github.com/contao/contao/commit/22505d5f79bc1a7f52e2cba5fddf6007e1f0408a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/contao/contao"
}, {
"type" : "WEB",
"url" : "https://github.com/contao/contao/releases/tag/5.3.50"
}, {
"type" : "WEB",
"url" : "https://github.com/contao/contao/releases/tag/5.7.12"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-116", "CWE-79" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-10-09T20:53:50Z",
"nvd_published_at" : null
}
}