CVE-2026-48785
JSON

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 packageVersionsReported by
apptainer apptainer< 1.5.1CVE List
github.com/apptainer/apptainer (Go)before 1.5.1GitHub Advisory Database, Go Vulnerability Database

All scores

GitHub_M4.8medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L
GitHub4.8medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L

Classification

CWE-22

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

SourceRecordLicence
CVE ListCVE-2026-48785 changed 2026-09-15CVE Terms of Use
GitHub Advisory DatabaseGHSA-cr2j-534f-mf3g changed 2026-07-07CC-BY-4.0
Go Vulnerability DatabaseGO-2026-5805 changed 2026-07-07CC-BY-4.0
NVDCVE-2026-48785 changed 2026-09-25Public domain