4.8medium
Apptainer: Incorrect path matching for 'limit container paths' directive
- Severity
- 4.8medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.12% (higher than 1% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-cr2j-534f-mf3gGO-2026-5805
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| apptainer apptainer | < 1.5.1 | CVE List |
| github.com/apptainer/apptainer (Go) | before 1.5.1 | GitHub Advisory Database, Go Vulnerability Database |
All scores
| GitHub_M | 4.8medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L |
| GitHub | 4.8medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
Impact
The limit container paths directive in apptainer.conf is intended to allow a system administrator limit the paths from which containers can be run, under setuid mode. Due to incorrect matching of a path string, sibling directories with similar names may incorrectly be allowed.
For example, the configuration:
limit container paths = /data/safe
Will also allow containers in /data/safe-but-unsafe to be run.
Patches
The issue is patched in apptainer version 1.5.1.
Workarounds
If developers do not use setuid mode or do not use the limit container paths functionality, then this issue does not affect their installation. Note that, as documented [1], if user namespaces are allowed for unrestricted use then this functionality does not stop users from running any container of their choice.
If developers do use the limit container paths functionality they are advised to update.
Credit
This vulnerability was discovered and disclosed to the Apptainer project by Dave Trudgian of Sylabs.
Resources
[1] https://apptainer.org/docs/admin/latest/configfiles.html#limiting-container-execution
Go Vulnerability Database
Apptainer has incorrect path matching for 'limit container paths' directive in github.com/apptainer/apptainer
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-48785 changed 2026-09-15 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-cr2j-534f-mf3g changed 2026-07-07 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-5805 changed 2026-07-07 | CC-BY-4.0 |
| NVD | CVE-2026-48785 changed 2026-09-25 | Public domain |