# CVE-2024-23113: Fortinet Multiple Products Format String

> Attackers can execute unauthorized code or commands on Fortinet network devices via specially crafted packets exploiting a format string vulnerability.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H/RL:U/RC:C`)
- **Exploited in the wild:** Yes, since 9 Oct 2024 (CISA KEV)
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 15 Feb 2024
- **Updated:** 21 Oct 2025
- **Also known as:** GHSA-57pf-f69p-p222

## What is CVE-2024-23113?

CVE-2024-23113 is a critical code injection vulnerability in Fortinet Fortios, published on 15 Feb 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

A use of externally-controlled format string in Fortinet FortiOS versions 7.4.0 through 7.4.2, 7.2.0 through 7.2.6, 7.0.0 through 7.0.13, FortiProxy versions 7.4.0 through 7.4.2, 7.2.0 through 7.2.8, 7.0.0 through 7.0.14, FortiPAM versions 1.2.0, 1.1.0 through 1.1.2, 1.0.0 through 1.0.3, FortiSwitchManager versions 7.2.0 through 7.2.3, 7.0.0 through 7.0.3 allows attacker to execute unauthorized code or commands via specially crafted packets.

Weakness: CWE-134 (Use of Externally-Controlled Format String)

## Which versions are affected by CVE-2024-23113?

It affects 4 products.


Products: Fortinet Fortios, Fortinet Fortipam, Fortinet Fortiproxy, Fortinet Fortiswitchmanager.

## How do I fix CVE-2024-23113?

No fix has been published for CVE-2024-23113 yet. Limit exposure of the affected software until one is available. US federal agencies must fix it by 30 Oct 2024.

## Is CVE-2024-23113 being exploited?

Yes. Attackers have exploited CVE-2024-23113 in the wild since at least 9 Oct 2024.

Public exploit code:

- https://github.com/p33d/CVE-2024-23113 (github_poc): https://github.com/p33d/CVE-2024-23113
- test_private_CVE (github_poc): https://github.com/CheckCve2/CVE-2024-23113
- https://github.com/puckiestyle/CVE-2024-23113 (github_poc): https://github.com/puckiestyle/CVE-2024-23113
- https://github.com/MAVRICK-1/cve-2024-23113-test-env (github_poc): https://github.com/MAVRICK-1/cve-2024-23113-test-env
- CVE-2024-23113 是一个在 Linux Kernel 中被发现的漏洞，它属于 任意代码执行漏洞，影响了 bpf (Berkeley Packet Filter) 子系统。具体来说，这个漏洞影响了 bpf 程序的 bpf_prog 类型的对象，并且可以允许攻击者通过构造恶意的 BPF 程序来在内核空间执行恶意代码。 (github_poc): https://github.com/ownouwa/cve-2024-23113-poc
- This python scripts searches a client list to see if their FortiGate device is vulnerable to this CVE. (github_poc): https://github.com/iambrayden/CVE-2024-23113

## Other vulnerabilities in Fortinet Fortios

- [CVE-2022-40684](https://insights.sbomify.com/CVE-2022-40684/): Fortinet Multiple Products Authentication Bypass (critical 9.8, exploited in the wild)
- [CVE-2024-55591](https://insights.sbomify.com/CVE-2024-55591/): Fortinet FortiOS and FortiProxy Authentication Bypass (critical 9.6, exploited in the wild)
- [CVE-2024-21762](https://insights.sbomify.com/CVE-2024-21762/): Fortinet FortiOS Out-of-Bound Write (critical 9.6, exploited in the wild)
- [CVE-2022-42475](https://insights.sbomify.com/CVE-2022-42475/): Fortinet FortiOS Heap-Based Buffer Overflow (critical 9.3, exploited in the wild)
- [CVE-2023-27997](https://insights.sbomify.com/CVE-2023-27997/): Fortinet FortiOS and FortiProxy SSL-VPN Heap-Based Buffer Overflow (critical 9.2, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-23113 and fix it if it is affected.

What it is: CVE-2024-23113 is a critical code injection vulnerability in Fortinet Fortios, published on 15 Feb 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: Yes. Attackers have exploited CVE-2024-23113 in the wild since at least 9 Oct 2024.

Affected product: Fortinet Fortios. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. 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.
2. 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.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-23113/ (Markdown: https://insights.sbomify.com/CVE-2024-23113/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-23113
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-23113
- OSV: https://osv.dev/vulnerability/CVE-2024-23113

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-23113/
Summaries are generated and may contain mistakes; the official description above is the record.
