Skip to main content

Contao core-bundle CVE-2026-104884

MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-11-20 https://github.com/contao/contao GHSA-h57j-5f5m-789v
5.4
CVSS 3.1 · GitHub Advisory
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate as backend page editor
  2. Delivery
    Store script in indexed page title
  3. Exploit
    Victim submits/view search results
  4. Execution
    Legacy html5 template echoes raw link
  5. Impact
    Script runs in visitor browser

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires three concrete conditions to all hold: (1) the search module must be configured to use the legacy search_default.html5 template (line 8 <?= $this->link ?> is the unescaped sink) - the default Twig search_default.html.twig on 5.7.9 auto-escapes and is NOT affected, so this is a non-default configuration most common on sites migrated from earlier Contao or using custom template selection; (2) an authenticated backend editor with rights to edit page titles must store the payload (PR:L), since the injected content comes from the entity-decoded indexed title assigned to link in ModuleSearch::compile(); and (3) a victim (anonymous visitor or admin) must actually view search results containing the match (UI:R). Limiting factors: the non-default legacy template requirement, the need for authenticated editor access, and the required victim interaction all substantially narrow real-world exploitability below what AV:N alone suggests.

Impact

This is a moderate, conditional stored XSS (CWE-79) in Contao core-bundle rated CVSS 5.4 (AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N). The signals point to a real but non-urgent issue rather than a widespread emergency. The network vector (AV:N) is offset by meaningful friction: PR:L means an authenticated backend page editor is required to plant the payload, UI:R means a visitor must actually view search results, and - critically - the raw sink only exists when the legacy search_default.html5 template is selected for the search module. On a default 5.7.9 install the Twig search_default.html.twig template auto-escapes and is NOT vulnerable, so real-world exposure is limited to sites running the legacy template (common on installs migrated from older Contao or using custom template selection). No EPSS score, KEV listing, or exploit/PoC reference is present in the input, so there is no public exploit identified at time of analysis and no evidence of active exploitation. The scope change (S:C) is well-justified because the injected script executes in the browsers of anonymous front-end visitors and admins, crossing the editor→visitor trust boundary. The vendor priority label is this_month, consistent with a patch-available, privilege-and-configuration-gated stored XSS rather than an act_now/emergency item. Net: a legitimate fix-this-cycle vulnerability, not a high-CVSS-but-illusory one, whose practical risk hinges entirely on whether the legacy HTML5 search template is in use.

Exploit ScenarioDerived

An authenticated backend page editor stores a malicious indexed title (e.g. script markup) that the search indexer picks up. On a site whose search module uses the legacy search_default.html5 template, the module's compile() assigns the entity-decoded title to the raw-echoed link variable (line 8: <?= $this->link ?>), so when an anonymous front-end visitor or admin views matching search results the script executes in their browser. No public exploit code is identified in the provided data, and exploitation additionally depends on the victim viewing the results (UI:R) and on the legacy template being active.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 21, 2026

Stored cross-site scripting in the Contao core-bundle search module lets an authenticated backend editor with page-title edit rights plant script that executes for anonymous front-end visitors and administrators who view search results, rated CVSS 5.4 (AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N). The flaw is configuration-dependent: it only fires when the search module is set to the legacy 'search_default.html5' template, whose line 8 echoes the unescaped 'link' variable, while the default Twig 'search_default.html.twig' on 5.7.9 auto-escapes and is not affected. An earlier hardening commit (23e8cca3136a) escaped the 'title' variable but missed the raw 'link' echo in the legacy template; no public exploit code was identified at time of analysis and there is no confirmed active exploitation (CISA KEV).

RemediationAI

Upgrade contao/core-bundle to 5.3.50 (for the 4.9.x/5.3.x line) or 5.7.12 (for the 5.4.x/5.7.x line) - the fixed releases referenced in the advisory, with the fix delivered via PR github.com/contao/contao/pull/10153 and commits 9519c1049462da35054c114d07efdeecaef32d06 and a58eb71ef5a7a87da9d90980579dbeb6688448b4; full guidance is at github.com/contao/contao/security/advisories/GHSA-h57j-5f5m-789v. If an immediate upgrade is not possible, the most effective compensating control is to stop using the legacy template: select the Twig 'search_default.html.twig' for the search module (or copy the legacy template into a custom override that replaces <?= $this->link ?> with an escaped expression such as StringUtil::specialchars($this->link)), accepting that this changes the markup your front end renders for search results. Additionally, review backend user and group permissions so that only trusted editors can modify page titles, since the payload originates from the entity-decoded indexed title; note this narrows but does not eliminate exposure, and updating remains the only complete fix.

Affected Packages

composer contao/core-bundle fix: 5.3.50, 5.7.12

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in composer

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The root cause is CWE-79 (improper neutralization of input during web page generation) in Contao's frontend search pipeline. An earlier fix hardened search-result titles by assigning $objTemplate->title = StringUtil::specialchars(StringUtil::stripInsertTags($arrResult[$i]['title'])), but the shipped legacy HTML5 template 'search_default.html5' never consumes that 'title' variable - it prints $this->link directly, and ModuleSearch::compile() populates 'link' from the entity-decoded indexed page title without escaping. Because the sink is a raw PHP echo in a .html5 template rather than a Twig template, Twig's context-aware auto-escaping does not apply. The affected package is composer/contao/core-bundle (CPE pkg:composer/contao_core-bundle), and the vulnerable path is only reachable when the legacy template is explicitly selected for the search module, which is most common on installations migrated from older Contao versions or where templates were chosen manually. The supplied patch series (PR 10153 plus commits 9519c1049462da35054c114d07efdeecaef32d06 and a58eb71ef5a7a87da9d90980579dbeb6688448b4) also includes adjacent hardening such as StringUtil::specialcharsUrl for stored website URLs and CSRF/POST enforcement on the opt-in DCA, indicating a broader security cleanup rather than a single-line escaping change. The trigger conditions for the XSS itself are as described in the advisory: non-default legacy template, editor-supplied title content, and victim viewing a matching search result.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

GitHub Advisory PRIMARY 5.4 MEDIUM
AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
vuln.today AI 5.4 MEDIUM

Authenticated backend editor stores the payload (PR:L), a visitor must view results (UI:R), and script executes in the victim's browser crossing trust boundary (S:C) with limited C/I and no availability impact.

3.1 AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Primary rating from GitHub Advisory.

CVSS VectorGitHub Advisory

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

DescriptionGitHub Advisory

Commit 23e8cca3136a hardened the search-result title against insert-tag/XSS by setting $objTemplate->title = StringUtil::specialchars(StringUtil::stripInsertTags($arrResult[$i]['title'])). But the legacy HTML5 template does not use that title variable - it prints the raw link variable, which is assigned without escaping.

Impact

Affected configuration (important): on 5.7.9 the default search template is the Twig search_default.html.twig, which does not use the raw link variable and auto-escapes - so a default Twig install is not affected. The vulnerable raw echo is in the legacy search_default.html5 template (still shipped and selectable in 5.7.9, line 8: <?= $this->link ?>); exploitation requires that legacy template to be active for the search module (common on sites migrated from earlier Contao / using custom template selection). Where the legacy template is used, the sink is unambiguously raw and ModuleSearch::compile() assigns link from the entity-decoded indexed title.

A backend page editor can store script that executes for anonymous front-end visitors (and admins) viewing search results, a stored XSS crossing the editor -> anonymous-visitor boundary.

Credits

This security vulnerability was found by @HDWSec

Threat Intelligence Overview

Prevalence
Low
niche open-source PHP CMS, modest deployment versus mainstream CMS platforms
Threat Intel
1
1 source
Data Quality
3 sources
Confidence: Low
NVD CVE.org GHSA GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS N/A
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

27
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +27
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

Affected Products (CPE)GitHub Advisory

pkg:composer/contao_core-bundle
pkg:composer/contao_core-bundle

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy