MEDIUM · CVSS 3.1 5.4 CWE-79

CVE-2026-104884: contao/core-bundle: Cross-site scripting in the frontend search results

Published 2026-11-20 · Updated 2026-11-21 · Also known as GHSA-h57j-5f5m-789v

Summary

A cross-site scripting vulnerability exists in contao/core-bundle due to the legacy HTML5 search template echoing a raw unescaped variable. Engineering and security teams using Contao with the legacy search template should update their packages.

Who is affected

This Stored XSS vulnerability requires the legacy `search_default.html5` template to be active for the search module, which is common on migrated sites or custom template selections. A backend page editor can store malicious script that executes when anonymous front-end visitors or administrators view search results.

Exploitability

The vulnerability has a CVSS base score of 5.4 (MEDIUM) with a vector of CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N, indicating network accessibility, low privileges required, user interaction required, and a changed scope. EPSS data is not yet available and CISA KEV status is no.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-21. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
Packagist contao/core-bundle >= 4.9.0, < 5.3.50 5.3.50 composer require "contao/core-bundle:>=5.3.50"
Packagist contao/core-bundle >= 5.4.0-RC1, < 5.7.12 5.7.12 composer require "contao/core-bundle:>=5.7.12"

CVSS 3.1 vector

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Attack vectorNetwork
Attack complexityLow
Privileges requiredLow
User interactionRequired
ScopeChanged
ConfidentialityLow
IntegrityLow
AvailabilityNone

FAQ

What causes the vulnerability?

The legacy HTML5 search template prints the raw unescaped link variable instead of using the hardened title variable.

Are default modern Contao installations affected?

No, default installations use the Twig search_default.html.twig template which auto-escapes variables.

What versions fix the issue?

Fixed versions are 5.3.50, 5.7.12, and later.

Original advisory description
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

References

Source records: GHSA-h57j-5f5m-789v (OSV.dev).