CVE-2026-48785: Github.com/apptainer/apptainer Apptainer Has Incorrect Path Matching Vulnerability
MODERATECVE-2026-48785 is a MODERATE (CVSS 4.8) apptainer has incorrect path matching vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Github.com/apptainer/apptainer libraries in the Go ecosystem. The issue involves apptainer has incorrect path matching for 'limit container paths' directive. Remediation is available by upgrading affected packages to version 1.5.1.
CVE-2026-48785 at a Glance
Security Impact
CVSS: 4.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L).
How to Fix CVE-2026-48785
To remediate this vulnerability, upgrade all affected Github.com/apptainer/apptainer dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/apptainer/apptainer to 1.5.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/apptainer/apptainer
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-48785, inspect your project dependencies for Github.com/apptainer/apptainer:
inspect dependencies for github.com/apptainer/apptainer
Analyze the terminal output to locate any version of Github.com/apptainer/apptainer in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.5.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Github.com/apptainer/apptainer, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-48785 Affected Github.com/apptainer/apptainer Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/apptainer/apptainer
|
Go |
< 1.5.1
|
1.5.1
|
References
Frequently Asked Questions
What is CVE-2026-48785?
Which Github.com/apptainer/apptainer versions are affected?
What version fixes CVE-2026-48785?
Is github.com/apptainer/apptainer affected?
What is the CVSS score of CVE-2026-48785?
What CWE is associated with CVE-2026-48785?
How can I check Go dependencies for CVE-2026-48785?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cr2j-534f-mf3g",
"modified" : "2026-06-26T19:20:33Z",
"published" : "2026-06-26T19:20:33Z",
"aliases" : [ "CVE-2026-48785" ],
"summary" : "Apptainer has incorrect path matching for 'limit container paths' directive ",
"details" : "### 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",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/apptainer/apptainer"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.5.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/apptainer/apptainer/security/advisories/GHSA-cr2j-534f-mf3g"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apptainer/apptainer"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-26T19:20:33Z",
"nvd_published_at" : null
}
}