# CVE-2022-23080: directus - SSRF which leads to internal port scan

> A low-privileged user can exploit SSRF in Directus media upload to perform internal network port scans, exposing internal services.

- **Severity:** Medium 5.0 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 22 Jun 2022
- **Updated:** 17 Sep 2024
- **Also known as:** GHSA-5h75-pvq4-82c9

## What is CVE-2022-23080?

CVE-2022-23080 is a medium-severity server-side request forgery vulnerability in directus, published on 22 Jun 2022. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

In directus versions v9.0.0-beta.2 through 9.6.0 are vulnerable to server-side request forgery (SSRF) in the media upload functionality which allows a low privileged user to perform internal network port scans.

Weakness: CWE-918 (Server-Side Request Forgery)

## Which versions are affected by CVE-2022-23080?

2 open source packages ship an affected version, including directus. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `directus` | npm | From 9.0.0-beta.2 | 9.7.0 |
| `directus` | npm | From 9.0.0-beta.2 | 9.7.0 |

Products: Rangerstudio Directus.

## How do I fix CVE-2022-23080?

Upgrade directus to 9.7.0 or later.

## Is CVE-2022-23080 being exploited?

There is no known exploitation of CVE-2022-23080 in the wild and no public exploit code.

## Other vulnerabilities in directus

- [CVE-2018-10723](https://insights.sbomify.com/CVE-2018-10723/): Hardcoded credentials in n/a (critical 9.8)
- [CVE-2022-24814](https://insights.sbomify.com/CVE-2022-24814/): Cross-site Scripting in Directus (high 8.8)
- [CVE-2021-29641](https://insights.sbomify.com/CVE-2021-29641/): File upload in n/a (high 8.8)
- [CVE-2021-26594](https://insights.sbomify.com/CVE-2021-26594/): Privilege escalation in n/a (high 8.8)
- [CVE-2023-27474](https://insights.sbomify.com/CVE-2023-27474/): HTML Injection in Password Reset email to custom Reset URL in directus (high 8.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-23080 and fix it if it is affected.

What it is: CVE-2022-23080 is a medium-severity server-side request forgery vulnerability in directus, published on 22 Jun 2022. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2022-23080 in the wild and no public exploit code.

Affected packages and fixed versions:
- directus (npm): affected from 9.0.0-beta.2; fixed in 9.7.0
- directus (npm): affected from 9.0.0-beta.2; fixed in 9.7.0

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-2022-23080/ (Markdown: https://insights.sbomify.com/CVE-2022-23080/index.md)
```

## Sources

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

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