CVE-2026-107845: Contao Cross-Site Scripting Vulnerability

CRITICAL
Advisory Identifier: GHSA-628f-v4f6-p37r
CVSS 9.3
CWE-116 CWE-79
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2026-107845
GHSA Identifier GHSA-628f-v4f6-p37r
Severity CRITICAL
CVSS v3.1 Base Score 9.3
CWE Classification CWE-116: Improper Encoding or Escaping of Output
Affected Product Contao
Package Ecosystem Packagist
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (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.

contao/comments-bundle fixed: 5.3.50
Upgrade contao/comments-bundle to 5.3.50
contao/comments-bundle fixed: 5.7.12
Upgrade contao/comments-bundle to 5.7.12
Verify Direct and Transitive Dependencies

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

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.

CVE-2026-107845 Affected Contao Versions

2 component(s)
Fixed Versions:
5.3.505.7.12
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?
CVE-2026-107845 is a security vulnerability in Contao involving Cross-site scripting in the comments bundle under CWE-116: Improper Encoding or Escaping of Output.
Which Contao versions are affected?
Affected versions include releases prior to 5.3.50, 5.7.12 across affected packages: contao/comments-bundle.
What version fixes CVE-2026-107845?
Upgrading to 5.3.50, 5.7.12 (or the latest patched release for your respective branch) resolves the vulnerability.
Is contao/comments-bundle affected?
Yes, contao/comments-bundle is affected in releases prior to 5.3.50, 5.7.12. Upgrade your dependency to 5.3.50, 5.7.12 or later.
What is the CVSS score of CVE-2026-107845?
CVE-2026-107845 has a CVSS v3.1 base score of 9.3 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2026-107845?
CVE-2026-107845 is classified under CWE-116: Improper Encoding or Escaping of Output (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.).
How can I check Packagist dependencies for CVE-2026-107845?
Run the dependency tree command: 'inspect dependencies for contao/comments-bundle'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}