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-2025-25257 — Scanner and three-stage proof-of-concept exploit for CVE-2025-25257, a pre-auth SQL injection in Fortinet FortiWeb Fabric Connector that escalates to RCE via INTO OUTFILE. | Kitploit
Tools/GitHubGitHub/jonathan1010/cve-2025-25257
Vulnerability ScannersWeb Vulnerability ScannersExploitationWeb Application ExploitationPenetration TestingRemote Access Tool
GitHubjonathan1010/cve-2025-25257

CVE-2025-25257

Scanner and three-stage proof-of-concept exploit for CVE-2025-25257, a pre-auth SQL injection in Fortinet FortiWeb Fabric Connector that escalates to RCE via INTO OUTFILE.

View Repository
Dec 4, 2026Not yet reviewed

Related Tools

  • nuclei

    Fast YAML-based vulnerability scanner with template-driven detection engine for automated security testing across web apps, APIs, networks, DNS, and cloud infrastructure.

  • zaproxy

    Open-source web application security scanner for automated vulnerability detection, manual penetration testing, and API security testing with a proxy-based interception engine.

  • openvas-scanner

    This repository contains the scanner component for Greenbone Community Edition.

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    ghostlock-app

    yukonga/ghostlock-app

    One-tap Android kernel exploit app for CVE-2026-43499, providing privilege escalation via kernel module loading, with offset extraction and on-device analysis tools.

    750
  • 2

    IMSIcatcher

    28zaaky/imsicatcher

    IMSI Catcher platform that deploys a rogue GSM cell to intercept SMS, inject messages and track mobile devices

    739
  • 3

    Callisto

    jetp1ane/callisto

    Automated binary vulnerability analysis tool that decompiles executables via Ghidra, scans pseudo-C code with Semgrep, and validates findings using GPT-3.5-Turbo to reduce false positives.

    585
  • 4

    opencti

    opencti-platform/opencti

    Open Cyber Threat Intelligence Platform

    550
  • 5

    DFRoot

    a2333c/dfroot

    Android root tool for Samsung Galaxy S25 Ultra (SM-S938B) that chains DirtyFrag CVE-2026-43284 and CVE-2026-43499 to gain root automatically at boot via KernelSU.

    414
  • 6

    ARTEX

    baarai/artex

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

    409

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2025-25257

Fortinet FortiWeb - SQL Injection

Metadata

fieldvalue
CVECVE-2025-25257
severitycritical
CVSS9.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)
fixed in7.6.4, 7.4.8, 7.2.11, 7.0.11
affected7.6.0 through 7.6.3, 7.4.0 through 7.4.7, 7.2.0 through 7.2.10, 7.0.0 through 7.0.10
classSQL injection (CWE-89), unauthenticated
scanner version1.0.0
python3.8+ stdlib only, no third-party deps

Exploit

If you want the exploit, find it here: https://satoshidisk.com/pay/CT5bW1

Summary

FortiWeb's Fabric Connector authenticates peer Fortinet appliances with a bearer token handled by get_fabric_user_by_token() in /bin/httpsd. The vulnerable build interpolates the token straight into SQL: select id from fabric_user.user_table where token='%s'. An unauthenticated attacker breaks out of the literal with Authorization: Bearer 'or'1'='1 on GET /api/fabric/device/status, the injected OR returns a row, the access check passes and the device status JSON is served with 200. The watchTowr research escalates the same injection to RCE: the appliance MySQL runs as root, so UNION SELECT ... INTO OUTFILE writes a Python .pth site-hook (space-free /**/ payload, 127 bytes, inside the 128-char sscanf "Bearer %128s" limit) and GET /cgi-bin/ml-draw.py makes the interpreter execute it at startup.

Full description

An improper neutralization of special elements used in an SQL command ('SQL Injection') vulnerability [CWE-89] in FortiWeb may allow an unauthenticated attacker to execute unauthorized SQL code or commands via crafted HTTP or HTTPS requests. Affected: FortiWeb 7.6.0-7.6.3 (fixed in 7.6.4), 7.4.0-7.4.7 (fixed in 7.4.8), 7.2.0-7.2.10 (fixed in 7.2.11), 7.0.0-7.0.10 (fixed in 7.0.11). The nuclei template (http/cves/2025/CVE-2025-25257.yaml, max-request: 1) sends one raw request: GET /api/fabric/device/status with Authorization: Bearer 'or'1'='1, and matches status == 200 together with the body words serial, fortiweb and device_type (all conjunctioned). A patched device answers 401 Unauthorized with an empty body because 7.6.4 replaces the format-string query with a prepared statement (SELECT id FROM fabric_user.user_table WHERE token = ?), so the broken literal matches no row. The record is in the CISA KEV catalog (EPSS 0.99921 per the template metadata).

Detection model

  • One request per target, mirroring the template: GET /api/fabric/device/status with Authorization: Bearer 'or'1'='1.
  • Matcher (all conjunctioned, matchers-condition: and): response status 200 AND body contains serial AND fortiweb AND device_type. The scanner case-folds the substring test; the real device status JSON emits all three needles lowercase, so the folding cannot change the verdict on a genuine target.
  • Patched firmware and non-FortiWeb hosts answer 401/403/404 or reset, so the conjunction stays strict; no baseline request is needed because the scanner controls the only credential the endpoint accepts.
  • Helpers retry 2 attempts with linear backoff; HTTPError bodies are read instead of retried; scheme-less tagger hosts get http:// prepended.
  • 12-char token fingerprints every CSV row; full details are base64 packed in result_b64.

Usage

# scanner: streamed CSV + optional JSON sidecar
python scanner/CVE-2025-25257/scanner.py urls.txt 8 CVE-2025-25257.csv --json CVE-2025-25257.json

# exploit: result dict + optional CSV/JSON dumps
python exploit/CVE-2025-25257/exploit.py http://target --csv CVE-2025-25257.csv --json CVE-2025-25257.json --verbose

urls.txt is a plain file, one target per line, # for comments.

Example scanner output

[*] Fortinet FortiWeb CVE-2025-25257 Fabric Connector SQL injection scanner (pre-auth Bearer token breakout)
 scanner : CVE-2025-25257 v1.0.0
 threads : 8 | csv: CVE-2025-25257.csv | json: CVE-2025-25257.json
[*] Fortinet FortiWeb CVE-2025-25257 Fabric Connector SQL injection scanner (pre-auth Bearer token breakout)
[2026-12-04 13:27:07] loaded 2 target(s) from urls.txt
[2026-12-04 13:27:07] [1/2] http://10.20.30.40 -> VULNERABLE
[2026-12-04 13:27:07] [2/2] http://10.20.30.41 -> not-vuln
[2026-12-04 13:27:07] json sidecar saved: CVE-2025-25257.json
[2026-12-04 13:27:07] summary: total=2 vulnerable=1 not-vuln=1 errors=0
[2026-12-04 13:27:07] timing : avg=308ms max=608ms wall=0.61s
[2026-12-04 13:27:07] report saved: CVE-2025-25257.csv

Scanner report columns

columnmeaning
n1-based row number
urltarget as provided
statusok / error
vulnerableverdict
elapsed_msper-target timing
token12-char md5 over the row details
result_b64base64(JSON) full details

Files

  • scanner.py - detection only, stdlib, streamed CSV + JSON sidecar.
  • README.md - this file.
  • DESCRIPTION.md - deeper technical notes.
  • ../../exploit/CVE-2025-25257/exploit.py - three-stage POC (bypass probe, INTO OUTFILE .pth write, cgi-bin trigger).

Exit codes

codemeaning
0at least one target answered
2every target errored

References

  • Nuclei template: http/cves/2025/CVE-2025-25257.yaml
  • NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-25257
  • FortiGuard PSIRT: https://fortiguard.fortinet.com/psirt/FG-IR-25-151
  • watchTowr Labs analysis: https://labs.watchtowr.com/pre-auth-sql-injection-to-rce-fortinet-fortiweb-fabric-connector-cve-2025-25257/
  • Detection artefact: https://github.com/watchtowrlabs/watchTowr-vs-FortiWeb-CVE-2025-25257
Download Tool