Skip to content
KitploitKITPLOIT
ИнструментыЭксплойтыБлог
Log in
Отправить
ИнструментыЭксплойтыБлог
Отправить

Инструменты для хакинга, пентеста и кибербезопасности — ваш арсенал защиты!

Kitploit — это каталог инструментов для хакинга, кибербезопасности и пентестинга. Находите последние обновления проектов для поиска уязвимостей, анализа систем, автоматизации тестирования и усиления вашей безопасности.

ЛентыКонтактыКонфиденциальность© 2026 Kitploit

Каталог инструментов

Категории

Все категории
Loading categories
CVE-2026-126148 — Containerised PoC and lab for CVE-2026-126148, an unauthenticated OS command injection in FortiMail HA join-request handling, with 8.0.1 vs 8.0.2 differential and sweep. | Kitploit
Инструменты/GitHubGitHub/googlesky/cve-2026-126148
Container SecurityVulnerability AnalysisExploitationWeb Application ExploitationNetwork SecurityPenetration TestingPayload DevelopmentLabs & Practice
GitHubgooglesky/cve-2026-126148

CVE-2026-126148

Containerised PoC and lab for CVE-2026-126148, an unauthenticated OS command injection in FortiMail HA join-request handling, with 8.0.1 vs 8.0.2 differential and sweep.

6 дней назадЕщё не проверено
Поделиться
Репозиторий
Контент недоступен на запрошенном языке. Показываем английскую версию.

CVE-2026-126148 — FortiMail HA join-request OS command injection (CWE-78)

CVECVE-2026-126148
ComponentFortinet FortiMail — high-availability cluster, join-request handling (lab/fortimail_ha.py, modelled)
AffectedFortiMail 8.0.0–8.0.1, FortiMail 7.6.0–7.6.6
Fixed inFortiMail 8.0.2 (8.0 branch), FortiMail 7.6.7 (7.6 branch)
CWECWE-78 (Improper Neutralization of Special Elements used in an OS Command — OS Command Injection)
ImpactUnauthenticated remote code execution as the FortiMail service account (uid=0(root) in the laboratory)
VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H — 9.8 CRITICAL
TriggerThe peer-identity fields of a crafted FortiMail HA cluster join-request packet
CreditFortinet PSIRT (advisory author); no individual reporter is named in the advisory
AdvisoryFortinet PSIRT FG-IR-26-200, published 2026-11-10
Workaroundnone published by Fortinet

Fortinet's advisory FG-IR-26-200 describes an OS command injection in the high-availability cluster of FortiMail that "may allow an unauthenticated remote attacker to execute unauthorized code or commands via crafted HA join-request packets". A FortiMail node that belongs to — or is willing to join — an HA cluster listens for join requests on a fixed port range. The join request carries the identity of the peer that wants to join, and the daemon turns that identity into a cluster-management command. When the identity fields are placed into the command line as text and that command line is handed to a shell, the fields are no longer data: they are shell syntax. The result is remote code execution with the privileges of the FortiMail daemon, from a single unauthenticated packet, with no user interaction and no prior access to the appliance.

This repository contains a containerised laboratory that reproduces the flaw, a differential against two remediation shapes, and the results of a 0-day sweep against the patched line.


Scope and fidelity of this laboratory

FortiMail is proprietary software. None of its code, binaries or configuration are redistributed here, and Fortinet does not publish the HA join-request packet format or the join handler's source. What is reproducible here is therefore:

  • the vendor's own statement of the defect — CWE-78, the FortiMail high-availability cluster, unauthenticated remote attacker, crafted HA join-request packets, CVSS 9.8, and the affected/fixed version matrix — taken verbatim from FG-IR-26-200;
  • the security-relevant shape of the join-request surface — the FortiMail HA port map, a binary join-request protocol, a peer-registration sink that assembles a command line from the peer identity carried by the packet, and the processing order that makes the flaw reachable without authentication;
  • the properties of the shell that turn untrusted data into command syntax. These are properties of /bin/sh, not of FortiMail, and they are exercised for real.

Everything the laboratory asserts about the vendor product is sourced from the advisory; everything it asserts about the model is labelled as such. The model is the only thing that runs in the lab, and it is built so that the vulnerable and the patched behaviour differ in the target component alone.

The model lives in lab/fortimail_ha.py and is selected with FML_MODE:

FML_MODEbehaviourversion reported
vulnthe FortiMail 8.0.1 model: the peer identity is interpolated into the command line without validation and the line is executed through /bin/sh -c8.0.1
fixedthe FortiMail 8.0.2 model: every identity field is validated against a strict character set and the command is executed without a shell, as an argument vector8.0.2
fixed-partiala hypothetical remediation shape — not a claim about the vendor's patch: only the hostname field is validated, and the shell-based exec helper is kept8.0.2 (partial-remediation model)

The third arm exists so that the sweep has a realistic incomplete-remediation target. It is an artefact of this laboratory and carries no assertion about what Fortinet shipped.


1. Root cause

The join request is the only part of the HA protocol that a stranger can send: the daemon must accept it from a peer it has never seen, because that is what joining a cluster means. The peer identity in the packet is therefore untrusted by construction.

In the FortiMail 8.0.1 model the identity is not merely unvalidated — it is text. The handler substitutes the packet fields into a command template and hands the resulting string to a shell. lab/fortimail_ha.py:336:

    argv = build_argv(msg_type, fields)
    cmdline = " ".join(argv)

and lab/fortimail_ha.py:345:

    else:
        # FortiMail 8.0.1 model and the partial-remediation shape: the command line is
        # handed to a shell.
        exec_kind = "shell"
        out, err, rc = subprocess_run(["/bin/sh", "-c", cmdline])

build_argv() (lab/fortimail_ha.py:297) performs a plain token substitution, with no quoting and no character check:

def build_argv(msg_type, fields):
    """Replace the {field} tokens with the raw values that arrived in the packet."""
    template = COMMANDS[msg_type][0]
    argv = []
    for tok in template:
        if tok.startswith("{") and tok.endswith("}"):
            name = tok[1:-1]
            argv.append(fields[name].decode("latin-1"))
        else:
            argv.append(tok)
    return argv

The template for the join request is the modelled fml_ha peer add invocation (lab/fortimail_ha.py:152):

    MSG_JOIN: (
        ["fml_ha", "peer", "add", "--cluster", "{cluster-id}", "--serial", "{serial}",
         "--name", "{hostname}", "--ip", "{peer-ip}"],
        ["cluster-id", "serial", "hostname", "peer-ip"],
    ),

so the command line that reaches the shell is

fml_ha peer add --cluster <cluster-id> --serial <serial> --name <hostname> --ip <peer-ip>

with every <...> replaced by attacker-controlled bytes. A hostname of mail-node-01; id > /results/marker/x.txt therefore produces

fml_ha peer add --cluster cluster-01 --serial FG100FT0000000001 --name mail-node-01; id > /results/marker/x.txt --ip 10.10.10.11

which is two commands, and the second one runs with the privileges of the daemon. The captured command log shows exactly that line, produced by the vulnerable model (evidence/ha-command-log.txt):

2026-11-12T03:26:07Z mode=vuln version=8.0.1 port=20005 transport=tcp peer=10.89.10.125:51284 exec=shell exit=0 command=fml_ha peer add --cluster cluster-01 --serial FG100FT0000000001 --name x$(id>/results/marker/a4179c5d3e360061.txt 2>&1; echo token=a4179c5d3e360061 >>/results/marker/a4179c5d3e360061.txt) --ip 10.10.10.11

Why the flaw is unauthenticated (PR:N)

The cluster digest is carried in the packet too, but the daemon compares it after the peer-registration command has already run (lab/fortimail_ha.py:361):

    # ---- the cluster digest is compared only now: the peer-registration command has
    # ---- already run.  That ordering is what makes the flaw *unauthenticated* (PR:N).
    digest_ok = hmac.compare_digest(fields["admin-digest"], SECRET.encode("latin-1"))

A packet with a wrong digest is therefore processed and acted upon; the daemon only records afterwards that the peer is not trusted. The reply makes the difference visible without changing the outcome:

"status": 0, "digest_ok": false, "message": "executed; peer not trusted (cluster digest mismatch)"

This is the ordering that makes PR:N hold, and it is the reason the sweep finds the same unauthenticated state change on the patched line (§8.3).

The patched shape

Скачать инструмент

Популярное

Смотреть все →

Откройте для себя самые используемые инструменты нашего сообщества.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 Полный набор инструментов OSINT: граф расследования, оценка достоверности, семейства псевдонимов, карта, временная шкала и отчёты. 49 модулей, более 400 сайтов, API-ключи не требуются.

    938
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    # Приложение GhostLock с запуском в один клик (CVE-2026-43499)

    556
  • 3

    redforge

    cybersecurity91/redforge

    Браузерный инструментарий для red team с 102 офлайн-инструментами для разведки, генерации полезной нагрузки, атак на учётные данные, криптографии, кодирования и отчётности по проектам.

    352
  • 4

    ARTEX

    baarai/artex

    Платформа автономного тестирования на проникновение на основе мультиагентной LLM с агентами-планировщиками и агентами-исполнителями, графами активов и исследования, записью MITM-трафика и повторной проверкой уязвимостей.

    343
  • 5

    looking-glass

    anonghosty/looking-glass

    Платформа CSIRT, которая загружает отчёты Shadowserver в MongoDB и воспроизводит их в виде интерактивных карт, аналитики, результатов, рекомендаций и исполнительных дашбордов.

    336
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    Система действий для кибербезопасности на базе ИИ — где намерение превращается в управляемое исполнение, доказательства становятся оперативной памятью, а каждая операция улучшает следующую.

    291

Изучить все инструменты

Просмотрите нашу коллекцию инструментов

Смотреть все инструменты →