MediumGHSA-h57j-5f5m-789vCVE-2026-104884

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

Published 20 Nov 2026 · Updated 21 Nov 2026

Is your project on an affected contao/core-bundle?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Laravel or PHP apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected packages

Affected
>=4.9.0 <5.3.50
Fixed in
5.3.50
Update to the fixed version for your release line, for example:composer require contao/core-bundle:^5.3.50
Affected
>=5.4.0-RC1 <5.7.12
Fixed in
5.7.12
Update to the fixed version for your release line, for example:composer require contao/core-bundle:^5.7.12

Details

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

Is GHSA-h57j-5f5m-789v in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected contao/core-bundle, and gives you the command that fixes it.

More advisories for contao/core-bundle

  • HighCVE-2026-104883contao/core-bundle: Non-admin users can self-grant permissions that implicitly make them administrators · 20 Nov 2026
  • MediumCVE-2026-104882contao/core-bundle: Improper access control in the CSV import wizard · 20 Nov 2026
  • MediumCVE-2026-107842Contao: Protected page content is disclosed to anonymous visitors after contao.search.index_protected is disabled · 9 Oct 2026
  • MediumCVE-2026-107843Contao: The registration module re-sends activation mails · 9 Oct 2026
  • LowCVE-2026-107848Contao: Cross-site request forgery in custom backend actions · 9 Oct 2026
  • MediumCVE-2026-107844Contao: Path traversal in the images controller · 9 Oct 2026
All 43 advisories for contao/core-bundle

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.