# CVE-2023-38496: Apptainer's ineffective privileges drop when requesting container network

> An attacker can craft a starter config to delete host directories due to ineffective privilege dropping during network setup in Apptainer.

- **Severity:** Medium 6.1 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 25 Jul 2023
- **Updated:** 10 Oct 2024
- **Also known as:** GHSA-mmx5-32m4-wxvx, GO-2023-1965, openSUSE-SU-2024:13073-1

## What is CVE-2023-38496?

CVE-2023-38496 is a medium-severity vulnerability in apptainer, published on 25 Jul 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

Apptainer is an open source container platform. Version 1.2.0-rc.2 introduced an ineffective privilege drop when requesting container network setup, therefore subsequent functions are called with root privileges, the attack surface is rather limited for users but an attacker could possibly craft a starter config to delete any directory on the host filesystems. A security fix has been included in Apptainer 1.2.1. There is no known workaround outside of upgrading to Apptainer 1.2.1.

Weakness: CWE-271 (Privilege Dropping / Lowering Errors), CWE-269 (Improper Privilege Management)

## Which versions are affected by CVE-2023-38496?

3 open source packages ship an affected version, including github.com/apptainer/apptainer. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/apptainer/apptainer` | Go | From 1.2.0 | 1.2.1 |
| `github.com/apptainer/apptainer` | Go | From 1.2.0 | 1.2.1 |
| `github.com/apptainer/apptainer` | Go | From 1.2.0 | 1.2.1 |
| `apptainer` | openSUSE:Tumbleweed | All versions | 1.2.1-1.1 |

Products: Lfprojects Apptainer.

## How do I fix CVE-2023-38496?

Upgrade github.com/apptainer/apptainer to 1.2.1 or later.

## Is CVE-2023-38496 being exploited?

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

## Other vulnerabilities in apptainer

- [CVE-2023-30549](https://insights.sbomify.com/CVE-2023-30549/): Unpatched extfs vulnerabilities are exploitable through suid-mode Apptainer (high 7.1)
- [CVE-2025-65105](https://insights.sbomify.com/CVE-2025-65105/): Apptainer ineffective application of selinux and apparmor --security options (medium 4.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-38496 and fix it if it is affected.

What it is: CVE-2023-38496 is a medium-severity vulnerability in apptainer, published on 25 Jul 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2023-38496 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/apptainer/apptainer (Go): affected from 1.2.0; fixed in 1.2.1
- github.com/apptainer/apptainer (Go): affected from 1.2.0; fixed in 1.2.1
- github.com/apptainer/apptainer (Go): affected from 1.2.0; fixed in 1.2.1

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

## Sources

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

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