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-104286 — Python exploit for CVE-2026-104286 in FortiMail: unauthenticated path-traversal file write with read-back verification, plus script/cron code execution and IoC checks. | Kitploit
Tools/GitHubGitHub/maxprog-svg/cve-2026-104286
ReconnaissancePersistence MechanismsVulnerability AnalysisExploitationWeb Application ExploitationPost-ExploitationPenetration TestingPayload Development
GitHubmaxprog-svg/cve-2026-104286

CVE-2026-104286

Python exploit for CVE-2026-104286 in FortiMail: unauthenticated path-traversal file write with read-back verification, plus script/cron code execution and IoC checks.

25 days agoNot yet reviewed
Share
View Repository

Exploit for CVE-2026-104286 — FortiMail: Unauthenticated Arbitrary File Write → Code Execution

File: fortimail_cve_2026_104286.py (single file, Python 3.6+ stdlib only, fully remote over HTTP/HTTPS)

Vulnerability

FieldValue
CVECVE-2026-104286
ProductFortinet FortiMail (physical and virtual appliances)
TypePath Traversal (CWE-22) + improper null-byte neutralization (CWE-158)
CVSS 3.19.8 Critical (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)
Authenticationnone required
Attack surfaceIdentity-Based Encryption (IBE) request handler on the management interface
StatusActively exploited; CISA KEV since 2026-10-01 (US federal deadline 2026-10-04)
AdvisoryFortinet PSIRT FG-IR-26-175 (2026-10-01)
Affected7.2.0–7.2.9 (no fix in branch — migrate to 7.4+), 7.4.0–7.4.8, 7.6.0–7.6.6, 8.0.0–8.0.1
Fixed in7.4.9+, 7.6.7+, 8.0.2+
Vendor workaroundDisable IBE: config system encryption ibe / set status disable / end

A single unauthenticated HTTP/HTTPS request whose URI embeds a traversal sequence after a null byte (%00) causes the appliance to write an attacker-controlled file to an arbitrary path on its filesystem. Writes into loader-controlled or executable locations yield code execution. The confirmed in-the-wild campaign used exactly this: replaced /data/lib/liblog.so, created /data/etc/ld.so.preload and /data/bin/webconsole, planted cron entries referencing /migadmin, and created archive account archive234.

How the tool works

The tool is a configurable URI/strategy engine:

  • Default URI shape: {IBE-prefix}/{decoy}.{ext}%00/<traversal>/<target-path>, with the traversal encoded as %2e%2e (the shape observed in campaign IoCs). Alternate encodings: literal ../, %252e (double-encoded), %2f, %2500.
  • Content delivery: request body (POST/PUT, raw or base64) or query parameters (data=, content=); empty write (GET) also supported.
  • Automatic strategy ordering with read-back verification after each step (GET of the written path, exact content comparison): the first confirmed variant stops the run.
  • Modes exist to enumerate prefixes/encodings per build and to verify results.

Modes

ModePurpose
probeReachability, version banner, candidate IBE-prefix liveness
writeCore: arbitrary file write (--target + content) with automatic shape search and verification
execCode execution: payload script (/data/bin/exploit_104286.sh) + cron entry (/etc/crontab) — the technique observed in the campaign
verifyRead-back verification of an already-written file (SHA-256 comparison)
scanEnumerate URI-shape/encoding candidates against a scratch path; surface anomalous (non-404) responses
cleanupNeutralize an exec preset (best effort)
selftestEnd-to-end test against a built-in mock server (no target system needed)

Usage examples

# 0) Self-test the tool (no target system required)
python3 fortimail_cve_2026_104286.py selftest

# 1) Recon: reachability, version banner, which prefixes are live
python3 fortimail_cve_2026_104286.py probe --host mail.example.com

# 2) Arbitrary file write (the core primitive)
python3 fortimail_cve_2026_104286.py write --host mail.example.com \
    --target /data/etc/ld.so.preload --content '/data/lib/liblog.so'

# content from a local file:
python3 fortimail_cve_2026_104286.py write --host mail.example.com \
    --target /data/bin/payload.so --content-file payload.so

# 3) Code execution: script + cron (runs every minute)
python3 fortimail_cve_2026_104286.py exec --host mail.example.com \
    --cmd 'id > /data/tmp/out.txt 2>&1'

# command from stdin:
echo 'cat /etc/passwd > /data/tmp/out.txt' | python3 fortimail_cve_2026_104286.py exec --host mail.example.com

# 4) Verify a previous write
python3 fortimail_cve_2026_104286.py verify --host mail.example.com \
    --target /data/etc/ld.so.preload --content '/data/lib/liblog.so'

# 5) Discover the working shape on a specific build (if auto mode did not confirm)
python3 fortimail_cve_2026_104286.py scan --host mail.example.com --json

# 6) Dry rehearsal: print exact requests without sending
python3 fortimail_cve_2026_104286.py write --host mail.example.com --dry-run \
    --target /data/etc/ld.so.preload --content test

# 7) Remove exec-preset traces
python3 fortimail_cve_2026_104286.py cleanup --host mail.example.com

Also available: --proxy host:port (or HTTPS_PROXY env), --insecure (skip TLS verification), --scheme http, --port, --timeout, --json (machine-readable output), --max-attempts, --base/--enc/--null/--ext (URI-shape overrides), --dry-run.

Exit codes: 0 — success/confirmed, 2 — attempts made but not confirmed by read-back.

Limitations

  1. Read-back is possible only if the web server serves the written file at its path; otherwise the result is marked "unverified" — confirm externally (logs, CLI/SSH, the IoC checklist below).
  2. The exec preset (script + cron) mirrors the campaign-observed technique, but the exact cron format may differ per build; where it does not apply, use write with your own target path/content.
  3. Writes overwrite the target file wholesale. Before writing into an existing file (/etc/crontab, configs), the tool attempts to read current content and preserves it.

Post-exploitation checklist / IoCs (from FG-IR-26-175)

  • Files: /data/etc/ld.so.preload, /data/bin/webconsole, replaced /data/lib/liblog.so, /data/bin/mailservice, /bin/smit, /data/etc/httpd.conf, /data/migadmin.tar.gz
  • Cron entries referencing /migadmin; account archive234 (remote archive)
  • C2 addresses: 79.141.169.187, 45.129.0.192
  • URI patterns to GUI/IBE: %2e%2e, %252e, %00, %2500
  • Log strings: Invalid Base64 Encoding at pos 0, User admin logged out from (null)

References

  • Fortinet PSIRT FG-IR-26-175: https://fortiguard.fortinet.com/psirt/FG-IR-26-175
  • CISA KEV: https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-104286
  • NVD: https://nvd.nist.gov/vuln/detail/cve-2026-104286
  • Public mechanism analysis and IoCs: Brandefense Research (2026-10-08), sherer.io (2026-10-02), NCSC-NL NCSC-2026-0398

The tool is provided for research purposes. Perform writes/execution on production systems only under your change-management policy; capture system state (logs, hashes of critical files) before exploiting.

https://satoshidisk.com/pay/CSjbqP

Download Tool

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.

    901
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

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

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

    401

Explore all tools

Browse our collection of tools

View all tools →