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-126170 — Containerised PoC and differential lab for CVE-2026-126170, an unauthenticated JSON injection (CWE-116) in the FortiManager/FortiAnalyzer JRPC API leading to command execution. | Kitploit
Tools/GitHubGitHub/googlesky/cve-2026-126170
Container SecurityVulnerability AnalysisExploitationWeb Application ExploitationNetwork SecurityRemote Access ToolAPI SecurityLabs & Practice
GitHubgooglesky/cve-2026-126170

CVE-2026-126170

Containerised PoC and differential lab for CVE-2026-126170, an unauthenticated JSON injection (CWE-116) in the FortiManager/FortiAnalyzer JRPC API leading to command execution.

6 days agoNot yet reviewed
Share
View Repository

CVE-2026-126170 — FortiManager/FortiAnalyzer JSON injection in the JRPC API (CWE-116)

CVECVE-2026-126170
ComponentFortinet FortiManager and FortiAnalyzer — JSON-RPC (JRPC) API of the GUI component, POST /jsonrpc
AffectedFortiAnalyzer 8.0.0–8.0.2 and 7.6.0–7.6.7 · FortiAnalyzer Cloud 8.0.1–8.0.2 and 7.6.0–7.6.7 · FortiAnalyzer-BigData 7.6.0–7.6.2 · FortiManager 8.0.0–8.0.2 and 7.6.0–7.6.7 · FortiManager Cloud 8.0.1–8.0.2 and 7.6.0–7.6.7 · FortiSASE-Sovereign 25, 25.3, 25.4 and 26.2. FortiAnalyzer 7.2 and 7.4 and FortiManager 7.2 and 7.4 are not affected
Fixed in8.0.3, 7.6.8, FortiAnalyzer-BigData 7.6.3, FortiSASE-Sovereign 26.2 (migrate to a fixed release on 25, 25.3 and 25.4)
CWECWE-116 (Improper Encoding or Escaping of Output)
ImpactUnauthenticated remote code execution on the appliance, as the account the management daemon runs with, and injection into the appliance's own JSON response document
VectorPOST /jsonrpc on the management interface of the appliance, reachable without a session once the JSON API is enabled
TriggerThe value of a JSON-RPC parameter — the data members, the url, the session, the id — carried in a specially crafted HTTP request
CreditFortinet PSIRT (advisory FG-IR-26-219; the advisory records the discovery as internal, to the Fortinet Product Security team)

Fortinet PSIRT advisory FG-IR-26-219 (published 2026-11-10) describes the flaw as a JSON injection (CWE-116) in the JSON-RPC API of FortiManager and FortiAnalyzer and rates it CVSS v3.1 9.8 CRITICAL, CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. The JSON API of the appliance translates a JSON-RPC document into a FortiOS-style command line and into a JSON response document. The handler places the values of the request into both generated outputs without encoding them for the destination they enter, so a value that contains a double quote terminates the quoted argument of the generated command line — the remainder of the value is then parsed as shell syntax by the command sink — and the same value becomes a structural part of the response document, where an injected "key":"value" sequence is a real key of the parsed response. The API is reachable over the network without authentication (PR:N) and without user interaction (UI:N), and the exposure condition is a configuration decision: the JSON API is disabled by default and has to be enabled on the appliance before the flaw is reachable.

This repository contains a containerised laboratory that reproduces the flaw, the differential against the patched build and against the two published mitigation states, and the results of a full sibling-path sweep.


Scope and fidelity of this laboratory

FortiManager and FortiAnalyzer are proprietary appliances. No Fortinet code, binary or configuration is redistributed here, and the vendor does not publish the JRPC handler's source. What is reproducible here is therefore:

  • the vendor's own statement of the defect — CWE-116, the JRPC API, network vector, unauthenticated, CVSS 9.8, the affected and fixed version matrix, the "JSON API disabled by default" exposure condition and the rpc-permit none workaround — taken verbatim from FG-IR-26-219;
  • the documented JRPC request surface — POST /jsonrpc, Content-Type: application/json, a JSON-RPC 2.0 document of the shape {"id":<int>,"method":"<get|set|add|delete|exec>","params":[{"url":"<api path>","data":{...}}],"session":"<session id>"};
  • the security-relevant behaviour of the handler — the translation of a JRPC document into a FortiOS-style command line, the generation of the JSON response document, the execution of the generated command line by the appliance's command sink, and the absence of destination-specific encoding of the values.

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 laboratory, and it is built so that the vulnerable and the patched behaviour differ in the target component alone.

The model lives in lab/fmgr_jrpc.py and is selected with FMGR_MODE:

FMGR_MODEmodelbehaviourversion reported
vulnFortiManager 7.6.7the value is concatenated into the command line and into the response document verbatim; the command line is executed through /bin/sh -c7.6.7
fixedFortiManager 7.6.8the value is shell-quoted for the command line and JSON-escaped for the response document; the command is executed without a shell7.6.8
fixed-rpc-nonepublished workaroundset rpc-permit none: the JSON API is disabled, the endpoint refuses every request with HTTP 4037.6.8
api-disabledoperational form of the workaroundthe JSON API was never enabled: the endpoint is not present, the request never reaches a handler7.6.8

Two modelling decisions are stated explicitly, because they are assumptions and not facts about the vendor product:

  • Authentication posture. The advisory rates the flaw PR:N, and the model keeps that posture identical on the vulnerable and on the patched build, so that the differential isolates the output-encoding defect and nothing else. A request without a session is dispatched in both builds; a session that is present but unknown is refused by the patched build before the dispatch and is only noticed after the command has run in the vulnerable build — that ordering is itself part of the modelled defect and is exercised by the matrix.
  • The JSON API is disabled by default. The fixed-rpc-none and api-disabled models are the two states a real appliance is in when the JSON API has not been enabled, or when it has been disabled again with the published workaround.

1. Root cause

CWE-116 is an output defect. The handler of the JRPC API takes values out of the request and writes them into two generated outputs — the command line and the response document — and it writes them without encoding them for the destination they enter.

1.1 The value that reaches the outputs

The handler recovers the members of the request from the raw request text (lab/fmgr_jrpc.py:158):

def _scan_value(s, i):
    """Recover the value that starts at s[i].

    Returns (value, vstart, vend).  For a string the JSON escapes of the request
    are interpreted; for every other token the literal text of the request is
    returned.
    """

The recovery interprets the request's own JSON escapes — a \" on the wire becomes a literal double quote in the recovered value — and truncates the value at the first NUL byte. It performs no encoding for the destination the value is about to enter.

1.2 The generated command line

The request is translated into FortiOS-style command segments (lab/fmgr_jrpc.py:262) and rendered (lab/fmgr_jrpc.py:305):

def render(segs, encoded):
    out = []
    for seg in segs:
        if seg[0] == "lit":
            out.append(seg[1])
        elif encoded:
            out.append(shlex.quote(seg[1]))      # 7.6.8: quoted for the shell
        else:
            out.append('"%s"' % seg[1])           # 7.6.7: dropped in verbatim
    return "".join(out)

The vulnerable rendering puts the recovered value inside double quotes without escaping it. A value that contains a double quote therefore terminates the quoted argument, and everything after it is parsed as shell syntax by the sink. For a set on /api/v2/cmdb/system/admin the generated command line of the vulnerable build is:

config system admin
set "description" "A","jrpc_injected_b8213c1c7950aa46":"b8213c1c7950aa46`id > /results/marker/jrpc-b8213c1c7950aa46.txt; echo b8213c1c7950aa46 >> /results/marker/jrpc-b8213c1c7950aa46.txt`"
end
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.

    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 →