CVE-2026-104884
contao/core-bundle: Cross-site scripting in the frontend search results
Also known as GHSA-h57j-5f5m-789v
Mitigation
- Upgrade contao/core-bundle to one of 5.3.50, 5.7.12 (or later in the same release line).
Who should check
- Projects that depend on Packagist package contao/core-bundle (>= 4.9.0, < 5.3.50)
Vulnerability facts
- Affected
- contao/core-bundle >= 4.9.0, < 5.3.50
- Fixed in
- 5.3.50, 5.7.12
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, login needed
- CVSS
- 5.4 (v3.1, GitHub)CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: Low
- User interaction: Required
- Scope: Changed (impact reaches other components)
- Confidentiality impact: Low
- Integrity impact: Low
- Availability impact: None
- CWE
- CWE-79
- Modified
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
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Packagist contao/core-bundle | >= 4.9.0, < 5.3.50 | 5.3.50, 5.7.12 | ghsa |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-104884. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-104884.md Affected: contao/core-bundle >= 4.9.0, < 5.3.50 Fixed in: 5.3.50, 5.7.12 Steps: 1. Search this machine and project for contao/core-bundle (Packagist): dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
Technologies
References
Patches
Other
- https://github.com/FriendsOfPHP/security-advisories/blob/master/contao/contao/CVE-2026-104884.yaml
- https://github.com/FriendsOfPHP/security-advisories/blob/master/contao/core-bundle/CVE-2026-104884.yaml
- https://github.com/contao/contao/blob/a11109b60dedcbd99e32a4e8550afdadb500f2c5/CHANGELOG.md
- https://github.com/contao/contao/blob/a6543f49a92187a7368f51b290179c4795386e23/CHANGELOG.md
- https://github.com/contao/contao/tree/5.3.50
- https://github.com/contao/contao/tree/5.7.12
- https://github.com/advisories/GHSA-h57j-5f5m-789v
FAQ
Is CVE-2026-104884 being exploited?
There is no confirmed exploitation: CVE-2026-104884 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.
How serious is CVE-2026-104884?
Medium: CVSS 5.4 (v3.1, scored by GitHub). Remote, login needed. A user has to take an action, such as opening a link, for the attack to work.
Which versions are affected by CVE-2026-104884?
contao/core-bundle >= 4.9.0, < 5.3.50.
Is there a fix for CVE-2026-104884?
Yes. Fixed in 5.3.50, 5.7.12. Upgrade contao/core-bundle to one of 5.3.50, 5.7.12 (or later in the same release line).
How do I check if I'm affected by CVE-2026-104884?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.
More contao/core-bundle vulnerabilities
See all| Severity | Identifier / vulnerability | Technology | Signals | Age |
|---|---|---|---|---|
| HIGH 7.2 | CVE-2026-104883 contao/core-bundle: Non-admin users can self-grant permissions that implicitly make them administrators | Composer packages | ||
| MEDIUM 6.5 | CVE-2026-104882 contao/core-bundle: Improper access control in the CSV import wizard | Composer packages |