Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/googlesky/cve-2026-104884
Vulnerability AnalysisExploitationWeb Application ExploitationSecurity VirtualizationWeb Security
GitHubgooglesky/cve-2026-104884

CVE-2026-104884

Proof-of-concept and lab for CVE-2026-104884, a stored XSS in Contao's legacy search template, with differential vulnerable/fixed containers and a Python exploit driver.

View Repository
3 days agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    897
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    853
  • 3

    wifit3

    derv82/wifit3

    Wifite but USB-only & cross-platform.

    668
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer is an open-source Privileged Access Management (PAM) platform that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.

    448
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    417
  • 6

    SafeLine

    chaitin/safeline

    Self-hosted WAF and reverse proxy that filters malicious HTTP traffic, blocks SQL injection, XSS, and bot attacks, with rate limiting and dynamic HTML/JS encryption.

    400

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-104884 — Contao: stored XSS in the legacy search template (raw link variable)

License: MIT Research status: validated

CVECVE-2026-104884
Componentcontao/core-bundle — ModuleSearch::compile + legacy search_default.html5
Affected< 5.3.50 (installations using the legacy HTML5 search template)
Fixed in5.3.50 — commit 9519c104 (GHSA-h57j-5f5m-789v)
CWECWE-79 (Cross-site Scripting)
ImpactA backend page editor stores script in a page title; the indexed title is assigned to the search result link without escaping and the legacy search_default.html5 echoes it raw, so the script executes for anonymous front-end visitors (and admins) viewing search results — stored XSS crossing the editor → anonymous-visitor boundary
VectorStored — editor-planted page title rendered in legacy search results
Triggerpage title <script>alert(1)</script> with the legacy search template active

The vulnerable assignment left the link raw:

// ModuleSearch::compile() — pre-fix
$objTemplate->href = $arrResult[$i]['url'];
$objTemplate->link = $arrResult[$i]['title'];   // raw indexed title
<!-- legacy search_default.html5 -->
<h3><a href="<?= $this->href ?>" title="<?= $this->title ?>"><?= $this->link ?></a></h3>

The fix escapes the assignment:

// fixed (commit 9519c104)
$objTemplate->href = StringUtil::specialchars($arrResult[$i]['url']);
$objTemplate->link = StringUtil::specialchars($arrResult[$i]['title']);

1. Root cause

Commit 23e8cca3136a hardened the search-result title against insert-tag/XSS, but the legacy HTML5 template does not use that title variable for the visible link — it prints the raw link variable, which ModuleSearch::compile() assigned directly from the entity-decoded indexed title ($objTemplate->link = $arrResult[$i]['title']). The legacy search_default.html5 echoes <?= $this->link ?> unescaped, so a stored page title containing script executes for anyone viewing the search results. The default Twig search_default.html.twig auto-escapes and does not use the raw link, so a default Twig install is not affected; the legacy template is still shipped and selectable (common on migrated sites). The fix wraps the link and href assignments in StringUtil::specialchars.

2. Reproduction environment

serviceimagerole
srch-vulncve-2026-104884:vulnreal compile() assignments (pre-fix)
srch-fixedcve-2026-104884:fixedreal assignments (vendor fix 9519c104)
poccve-2026-104884-poc:localstdlib-only Python driver

A PHP harness renders the real legacy search_default.html5 template with the link/href assigned by the verbatim upstream compile() result-loop lines, using the real StringUtil::specialchars (htmlspecialchars with ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML5). It reports whether a raw payload tag survives in the output. Both sides differ only in the upstream assignment lines.

3. Running the environment

./run-lab.sh build     # builds both sides (php:8.3-cli)
./run-lab.sh up        # cve104884lab network: srch-vuln / srch-fixed
./run-lab.sh sweep
./run-lab.sh down

4. The PoC

poc/poc.py (stdlib only):

  • check — exit 1 when the payload renders as a raw HTML tag, 0 when escaped; 3 no worker, 2 unreachable/indeterminate.
  • exploit — narrated stored-XSS chain: editor plants title → indexed → anonymous visitor search → legacy template echoes raw link.
  • probe — payload matrix: script tag, img onerror, benign title.
  • mitigation — 5.3.50 / commit 9519c104 / use the Twig template.

A standalone full-chain exploit ships at exploit/exploit.py:

python3 exploit/exploit.py --host=srch-vuln
# exit 1 on confirmed raw-HTML rendering, 0 on a safe target

5. Expected results

indexed titlesrch-vuln (pre-fix)srch-fixed (9519c104)
<script>alert(1)</script>raw_script=trueescaped (&lt;script&gt;...)
``raw_script=trueescaped
Regular Page Title (benign)no HTMLno HTML

Captured runs: evidence/check-*-run.txt, evidence/exploit-*-run.txt, evidence/probe-*-run.txt, evidence/mitigation-*-run.txt, evidence/exploit-standalone-run.txt, evidence/exploit-standalone-fixed-run.txt, evidence/versions.txt, evidence/0day-sweep.txt.

6. Environment preconditions

  • Podman (or Docker); bounded containers on the isolated cve104884lab network; PHP 8.3 runtime in the lab images.
  • Real-world exploitation requires the legacy search_default.html5 template to be active for the search module and a backend editor able to plant a page title; the default Twig template is not affected.

7. Additional findings (0-day sweep on the fixed line)

The fixed compile() wraps link/href in StringUtil::specialchars, so script/img payloads are entity-escaped in the legacy template output; benign titles render normally. The raw-HTML rendering path is closed. (The default Twig search template was already auto-escaping and unaffected.)

8. Repository layout

README.md             this write-up
run-lab.sh            environment driver (build / up / sweep / down)
Makefile              convenience targets
poc/poc.py            the PoC (check / exploit / probe / mitigation)
exploit/exploit.py    standalone full-chain exploit
lab/lab.Dockerfile    builds both sides from upstream source
lab/vendor/           verbatim compile() assignments + legacy template
lab/stubs.php         real StringUtil::specialchars + template renderer
lab/harness.php       renders the legacy template, detects raw payload tags
lab/service.py        HTTP wrapper (POST /search)
evidence/             captured runs of every mode on both sides
TRACKING.md           excluded (working record)

9. References

  • CVE record — https://www.cve.org/CVERecord?id=CVE-2026-104884
  • GitHub advisory — https://github.com/contao/contao/security/advisories/GHSA-h57j-5f5m-789v
  • Fix commit — https://github.com/contao/contao/commit/9519c1049462da35054c114d07efdeecaef32d06
  • Credit — found by @HDWSec
Download Tool