# CVE-2026-48785: Apptainer: Incorrect path matching for 'limit container paths' directive

> Local users can bypass container path restrictions in setuid mode due to flawed prefix matching, allowing execution of unauthorized containers.

- **Severity:** Medium 4.8 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 15 Sep 2026
- **Updated:** 15 Sep 2026
- **Also known as:** GHSA-cr2j-534f-mf3g, GO-2026-5805, UBUNTU-CVE-2026-48785, openSUSE-SU-2026:10993-1, openSUSE-SU-2026:20942-1

## What is CVE-2026-48785?

CVE-2026-48785 is a medium-severity path traversal vulnerability in apptainer, published on 15 Sep 2026. 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. Prior to version 1.5.1, Image.AuthorizedPath applies plain string-prefix matching to the limit container paths directive in apptainer.conf, so an allowed path such as /data/safe also authorizes a sibling path such as /data/safe-but-unsafe. A local user can consequently run a container from a directory outside the administrator's intended allowlist when Apptainer operates in setuid mode. Installations that do not use setuid mode or do not configure limit container paths are not affected, and unrestricted user namespaces already allow users to run containers of their choice. This issue is fixed in version 1.5.1.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2026-48785?

3 open source packages ship an affected version, including github.com/apptainer/apptainer.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/apptainer/apptainer` | Go | All versions | 1.5.1 |
| `github.com/apptainer/apptainer` | Go | All versions | 1.5.1 |
| `github.com/apptainer/apptainer` | Go | All versions | 1.5.1 |
| `apptainer` | openSUSE:Leap 16.0 | All versions | 1.5.1-bp160.1.1 |
| `apptainer` | openSUSE:Tumbleweed | All versions | 1.5.1-1.1 |

## How do I fix CVE-2026-48785?

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

## Is CVE-2026-48785 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-48785 and fix it if it is affected.

What it is: CVE-2026-48785 is a medium-severity path traversal vulnerability in apptainer, published on 15 Sep 2026. 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-2026-48785 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/apptainer/apptainer (Go): affected all versions; fixed in 1.5.1
- github.com/apptainer/apptainer (Go): affected all versions; fixed in 1.5.1
- github.com/apptainer/apptainer (Go): affected all versions; fixed in 1.5.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-2026-48785/ (Markdown: https://insights.sbomify.com/CVE-2026-48785/index.md)
```

## Sources

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

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