{"answers":{"affected":"It affects 2 products.","exploited":"Yes. Attackers have exploited CVE-2023-27997 in the wild since at least 13 Jun 2023, including in ransomware campaigns.","fix":"No fix has been published for CVE-2023-27997 yet. Limit exposure of the affected software until one is available. US federal agencies must fix it by 4 Jul 2023.","what":"CVE-2023-27997 is a critical memory corruption vulnerability in Fortinet Fortios, published on 13 Jun 2023. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-27997 and fix it if it is affected.\n\nWhat it is: CVE-2023-27997 is a critical memory corruption vulnerability in Fortinet Fortios, published on 13 Jun 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: Yes. Attackers have exploited CVE-2023-27997 in the wild since at least 13 Jun 2023, including in ransomware campaigns.\n\nAffected product: Fortinet Fortios. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-27997/ (Markdown: https://insights.sbomify.com/CVE-2023-27997/index.md)","id":"CVE-2023-27997","markdown":"https://insights.sbomify.com/CVE-2023-27997/index.md","name":"CVE-2023-27997","record":{"aliases":["GHSA-2hj2-fcr9-9p35"],"analysis":{"component_type":"network_device","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Fortinet SSL-VPN","requires_auth":"none","summary":"Remote attackers can execute arbitrary code via crafted requests exploiting a heap-based buffer overflow in Fortinet SSL-VPN.","user_interaction":"not_required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"fortinet","cpe":[{"product":"fortios","vendor":"fortinet"},{"product":"fortiproxy","vendor":"fortinet"}],"cvss":{"score":9.2,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:F/RL:X/RC:R","version":"3.1"},"cwes":[{"id":"CWE-787","name":"Out-of-bounds Write"},{"id":"CWE-122","name":"Heap-based Buffer Overflow"}],"description":"A heap-based buffer overflow vulnerability [CWE-122] in FortiOS version 7.2.4 and below, version 7.0.11 and below, version 6.4.12 and below, version 6.0.16 and below and FortiProxy version 7.2.3 and below, version 7.0.9 and below, version 2.0.12 and below, version 1.2 all versions, version 1.1 all versions SSL-VPN may allow a remote attacker to execute arbitrary code or commands via specifically crafted requests.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":"2023-06-16","github_poc":12,"max_poc_stars":134,"metasploit":0,"nuclei":0,"refs":[{"date":"2023-06-16T20:15:36Z","kind":"github_poc","ref":"https://github.com/BishopFox/CVE-2023-27997-check","stars":134,"title":"Safely detect whether a FortiGate SSL VPN instance is vulnerable to CVE-2023-27997 based on response timing"},{"date":"2023-10-12T16:12:41Z","kind":"github_poc","ref":"https://github.com/lexfo/xortigate-cve-2023-27997","stars":63,"title":"xortigate-cve-2023-27997"},{"date":"2023-06-16T03:25:19Z","kind":"github_poc","ref":"https://github.com/rio128128/CVE-2023-27997-POC","stars":27,"title":"POC FortiOS SSL-VPN buffer overflow vulnerability"},{"date":"2023-10-12T17:50:38Z","kind":"github_poc","ref":"https://github.com/delsploit/CVE-2023-27997","stars":9,"title":null},{"date":"2023-07-11T20:41:03Z","kind":"github_poc","ref":"https://github.com/TechinsightsPro/ShodanFortiOS","stars":2,"title":"Search vulnerable FortiOS devices via Shodan (CVE-2023-27997)"},{"date":"2026-07-31T10:13:19Z","kind":"github_poc","ref":"https://github.com/Vampsecure-Labs/vamp-forticheck","stars":2,"title":"VampSecure Labs: FortiOS CVE scanner (CVE-2018-13379, CVE-2022-40684, CVE-2023-27997, CVE-2024-21762)"},{"date":"2023-06-22T14:16:44Z","kind":"github_poc","ref":"https://github.com/imbas007/CVE-2023-27997-Check","stars":1,"title":null},{"date":"2026-09-01T20:04:23Z","kind":"github_poc","ref":"https://github.com/abraxas/Fortigate-SSL-VPN-Exploit-Kit","stars":1,"title":"The FortiGate SSL-VPN pot of gold. CVE-2024-21762 and CVE-2023-27997.  79 working exploit clients. 53 hardware SKUs. 55 FortiOS builds. "}],"tier":"exploited"},"has_fix":null,"headline":"Fortinet FortiOS and FortiProxy SSL-VPN Heap-Based Buffer Overflow","id":"CVE-2023-27997","indexable":true,"kev":{"dateAdded":"2023-06-13","dueDate":"2023-07-04","knownRansomwareCampaignUse":"Known","product":"FortiOS and FortiProxy SSL-VPN","requiredAction":"Apply updates per vendor instructions.","vendorProject":"Fortinet","vulnerabilityName":"Fortinet FortiOS and FortiProxy SSL-VPN Heap-Based Buffer Overflow Vulnerability"},"kind":"cve","links":{"ecosystem":null,"product":"fortinet:fortios","products":["fortinet:fortios","fortinet:fortiproxy"],"type":"memory_corruption","year":"2023"},"n_packages":0,"n_references":1,"next":{"headline":"Information disclosure in FortiPresence","id":"CVE-2023-27998"},"packages":[],"prev":{"headline":"Code injection in FortiSOAR","id":"CVE-2023-27995"},"products":["FortiOS","FortiOS-6K7K","FortiProxy"],"published":"2023-06-13","related":[{"cvss_score":9.8,"headline":"Fortinet Multiple Products Format String","id":"CVE-2024-23113","kev_date_added":"2024-10-09","published":"2024-02-15"},{"cvss_score":9.8,"headline":"Fortinet Multiple Products Authentication Bypass","id":"CVE-2022-40684","kev_date_added":"2022-10-11","published":"2022-10-18"},{"cvss_score":9.6,"headline":"Fortinet FortiOS and FortiProxy Authentication Bypass","id":"CVE-2024-55591","kev_date_added":"2025-01-14","published":"2025-01-14"},{"cvss_score":9.6,"headline":"Fortinet FortiOS Out-of-Bound Write","id":"CVE-2024-21762","kev_date_added":"2024-02-09","published":"2024-02-09"},{"cvss_score":9.3,"headline":"Fortinet FortiOS Heap-Based Buffer Overflow","id":"CVE-2022-42475","kev_date_added":"2022-12-13","published":"2023-01-02"},{"cvss_score":9.1,"headline":"Fortinet Multiple Products Improper Verification of Cryptographic Signature","id":"CVE-2025-59718","kev_date_added":"2025-12-16","published":"2025-12-09"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"open","licence":"CC0 1.0","name":"CISA KEV"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"active","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-07-31","vendors":["Fortinet"]},"summary":"Remote attackers can execute arbitrary code via crafted requests exploiting a heap-based buffer overflow in Fortinet SSL-VPN.","url":"https://insights.sbomify.com/CVE-2023-27997/"}