{"id":"CVE-2026-48785","aliases":["CVE-2026-48785","GHSA-cr2j-534f-mf3g","GO-2026-5805"],"related":[],"kind":"vulnerability","state":"published","title":"Apptainer: Incorrect path matching for 'limit container paths' directive","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nThe `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.\n\nFor example, the configuration:\n```\nlimit container paths = /data/safe\n```\nWill also allow containers in /data/safe-but-unsafe to be run.\n\n### Patches\n\nThe issue is patched in apptainer version 1.5.1.\n\n### Workarounds\n\nIf 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.\n\nIf developers do use the `limit container paths` functionality they are advised to update.\n\n### Credit\n\nThis vulnerability was discovered and disclosed to the Apptainer project by Dave Trudgian of Sylabs.\n\n### Resources\n\n[1] https://apptainer.org/docs/admin/latest/configfiles.html#limiting-container-execution","format":"markdown","source":"ghsa"},{"lang":"en","text":"Apptainer has incorrect path matching for 'limit container paths' directive in github.com/apptainer/apptainer","format":"markdown","source":"go"}],"published":"2026-06-26T19:20:33.000Z","modified":"2026-09-25T14:10:13.927Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L","score":4.8,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L","score":4.8,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L","score":4.8,"rating":"MEDIUM"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"< 1.5.1","status":"affected"}],"vendor":"apptainer","product":"apptainer","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.5.1"}],"ecosystem":"Go","package":"github.com/apptainer/apptainer","purl":"pkg:golang/github.com/apptainer/apptainer","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.5.1"}],"ecosystem":"Go","package":"github.com/apptainer/apptainer","purl":"pkg:golang/github.com/apptainer/apptainer","source":"go"}],"references":[{"url":"https://github.com/apptainer/apptainer/security/advisories/GHSA-cr2j-534f-mf3g","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/apptainer/apptainer/pull/3549","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/apptainer/apptainer/commit/0ff35257420e0c6cb97dac11d305749c893e5214","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/apptainer/apptainer/releases/tag/v1.5.1","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/apptainer/apptainer","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-09-15T17:38:03.190Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-48785","url":"https://www.cve.org/CVERecord?id=CVE-2026-48785","licence":"CVE Terms of Use","modified":"2026-09-15T17:38:10.029Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-cr2j-534f-mf3g","url":"https://github.com/advisories/GHSA-cr2j-534f-mf3g","licence":"CC-BY-4.0","modified":"2026-07-07T16:11:14.797Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5805","url":"https://pkg.go.dev/vuln/GO-2026-5805","licence":"CC-BY-4.0","modified":"2026-07-07T16:00:20.664Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-48785","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-48785","licence":"Public domain","modified":"2026-09-25T14:10:13.927Z"}],"updatedAt":"2026-11-25T22:59:38.613Z","epss":{"score":0.00119,"percentile":0.01943,"date":"2026-12-01T12:00:22.000Z"}}