CVE-2026-48785: Github.com/apptainer/apptainer Apptainer Has Incorrect Path Matching Vulnerability

MODERATE
Advisory Identifier: GHSA-cr2j-534f-mf3g
CVSS 4.8
CWE-22
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2026-48785
GHSA Identifier GHSA-cr2j-534f-mf3g
Severity MODERATE
CVSS v3.1 Base Score 4.8
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Github.com/apptainer/apptainer
Package Ecosystem Go
Published Date
Last Updated

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).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (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.

github.com/apptainer/apptainer fixed: 1.5.1
Upgrade github.com/apptainer/apptainer to 1.5.1
Verify Direct and Transitive Dependencies

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

### 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

CVE-2026-48785 Affected Github.com/apptainer/apptainer Versions

1 component(s)
Fixed Versions:
1.5.1
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?
CVE-2026-48785 is a security vulnerability in Github.com/apptainer/apptainer involving Apptainer has incorrect path matching for 'limit container paths' directive under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Github.com/apptainer/apptainer versions are affected?
Affected versions include releases prior to 1.5.1 across affected packages: github.com/apptainer/apptainer.
What version fixes CVE-2026-48785?
Upgrading to 1.5.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/apptainer/apptainer affected?
Yes, github.com/apptainer/apptainer is affected in releases prior to 1.5.1. Upgrade your dependency to 1.5.1 or later.
What is the CVSS score of CVE-2026-48785?
CVE-2026-48785 has a CVSS v3.1 base score of 4.8 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2026-48785?
CVE-2026-48785 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (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.).
How can I check Go dependencies for CVE-2026-48785?
Run the dependency tree command: 'inspect dependencies for github.com/apptainer/apptainer'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}