CVE-2025-65105: Github.com/apptainer/apptainer Apptainer Ineffectively Applies Selinux And Vulnerability

MODERATE
Advisory Identifier: GHSA-j3rw-fx6g-q46j
CVSS 4.5
CWE-706 CWE-61
Published
Advisory Summary

CVE-2025-65105 is a MODERATE (CVSS 4.5) apptainer ineffectively applies selinux and vulnerability (CWE-706: Use of Incorrectly-Resolved Name or Reference) affecting Github.com/apptainer/apptainer libraries in the Go ecosystem. The issue involves apptainer ineffectively applies selinux and apparmor --security options. Remediation is available by upgrading affected packages to version 1.4.5.

CVE-2025-65105 at a Glance

CVE Identifier CVE-2025-65105
GHSA Identifier GHSA-j3rw-fx6g-q46j
Severity MODERATE
CVSS v3.1 Base Score 4.5
CWE Classification CWE-706: Use of Incorrectly-Resolved Name or Reference
Affected Product Github.com/apptainer/apptainer
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 4.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L).

Attack Vector Local (AV:L)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
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-2025-65105

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.4.5
Upgrade github.com/apptainer/apptainer to 1.4.5
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-2025-65105, 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.4.5), 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-706: Use of Incorrectly-Resolved Name or Reference, where the product uses a name or reference to access a resource, but the name/reference resolves to a resource that is outside of the intended control sphere. 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 In Apptainer versions less than 1.4.5, a container can disable two of the forms of the little used `--security` option, in particular the forms `--security=apparmor:<profile>` and `--security=selinux:<label>` which otherwise put restrictions on operations that containers can do. The `--security` option has always been mentioned in Apptainer documentation as being a feature for the root user, although these forms do also work for unprivileged users on systems where the corresponding feature is enabled. Apparmor is enabled by default on Debian-based distributions and SElinux is enabled by default on RHEL-based distributions, but on SUSE it depends on the distribution version. In addition, a bug in the detection of selinux support in Apptainer's suid mode means that `--security selinux:<label>` flags may not be applied, even in the absence of an attack. In that case a warning message is emitted indicating that selinux is unavailable, but the warning may be may be overlooked, mis-interpreted, or not seen when apptainer is run from a script or other tool. Failure to apply requested restrictions should result in a fatal error rather than just a warning message. ### Patches Ineffective write of selinux process labels is addressed via an update to the containers/selinux dependency in https://github.com/apptainer/apptainer/pull/3226. That update brings in the upstream fix for https://github.com/advisories/GHSA-cgrx-mc8f-2prm which was for a different but related vulnerability. Ineffective write of apparmor process profiles is addressed in commit 4313b42. Failure to detect apparmor / selinux support, when --security flags are provided, is made an error rather than a warning in commit 82f1790. ### Workarounds There are no known workarounds, other than to define system-wide apparmor / selinux policy for Apptainer itself. This would apply to all containers, not just those run with the `--security` flags, and could impact the operation of Apptainer itself. ### References Thanks to Sylabs for finding this issue, fixing it in https://github.com/sylabs/singularity/security/advisories/GHSA-wwrx-w7c9-rf87 which was easy to import into Apptainer, and disclosing it early to the Apptainer project for a coordinated release. The related upstream runc disclosure which inspired the investigation is https://github.com/opencontainers/runc/security/advisories/GHSA-cgrx-mc8f-2prm.

CVE-2025-65105 Affected Github.com/apptainer/apptainer Versions

1 component(s)
Fixed Versions:
1.4.5
Product / Package Ecosystem Affected Versions Fixed Version
github.com/apptainer/apptainer
Go
< 1.4.5
1.4.5

References

Frequently Asked Questions

What is CVE-2025-65105?
CVE-2025-65105 is a security vulnerability in Github.com/apptainer/apptainer involving Apptainer ineffectively applies selinux and apparmor --security options under CWE-706: Use of Incorrectly-Resolved Name or Reference.
Which Github.com/apptainer/apptainer versions are affected?
Affected versions include releases prior to 1.4.5 across affected packages: github.com/apptainer/apptainer.
What version fixes CVE-2025-65105?
Upgrading to 1.4.5 (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.4.5. Upgrade your dependency to 1.4.5 or later.
What is the CVSS score of CVE-2025-65105?
CVE-2025-65105 has a CVSS v3.1 base score of 4.5 (MODERATE) with vector string CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2025-65105?
CVE-2025-65105 is classified under CWE-706: Use of Incorrectly-Resolved Name or Reference (The product uses a name or reference to access a resource, but the name/reference resolves to a resource that is outside of the intended control sphere.).
How can I check Go dependencies for CVE-2025-65105?
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-j3rw-fx6g-q46j",
  "modified" : "2025-12-02T21:10:04Z",
  "published" : "2025-12-02T21:10:04Z",
  "aliases" : [ "CVE-2025-65105" ],
  "summary" : "Apptainer ineffectively applies selinux and apparmor --security options",
  "details" : "### Impact\nIn Apptainer versions less than 1.4.5, a container can disable two of the forms of the little used `--security` option, in particular the forms `--security=apparmor:<profile>` and `--security=selinux:<label>` which otherwise put restrictions on operations that containers can do.  The `--security` option has always been mentioned in Apptainer documentation as being a feature for the root user, although these forms do also work for unprivileged users on systems where the corresponding feature is enabled.  Apparmor is enabled by default on Debian-based distributions and SElinux is enabled by default on RHEL-based distributions, but on SUSE it depends on the distribution version.\n\nIn addition, a bug in the detection of selinux support in Apptainer's suid mode means that `--security selinux:<label>` flags may not be applied, even in the absence of an attack.  In that case a warning message is emitted indicating that selinux is unavailable, but the warning may be may be overlooked, mis-interpreted, or not seen when apptainer is run from a script or other tool.  Failure to apply requested restrictions should result in a fatal error rather than just a warning message.\n\n### Patches\nIneffective write of selinux process labels is addressed via an update to the containers/selinux dependency in https://github.com/apptainer/apptainer/pull/3226. That update brings in the upstream fix for https://github.com/advisories/GHSA-cgrx-mc8f-2prm which was for a different but related vulnerability.\n\nIneffective write of apparmor process profiles is addressed in commit 4313b42.\n\nFailure to detect apparmor / selinux support, when --security flags are provided, is made an error rather than a warning in commit 82f1790.\n\n### Workarounds\nThere are no known workarounds, other than to define system-wide apparmor / selinux policy for Apptainer itself. This would apply to all containers, not just those run with the `--security` flags, and could impact the operation of Apptainer itself.\n\n### References\nThanks to Sylabs for finding this issue, fixing it in https://github.com/sylabs/singularity/security/advisories/GHSA-wwrx-w7c9-rf87 which was easy to import into Apptainer, and disclosing it early to the Apptainer project for a coordinated release.\n\nThe related upstream runc disclosure which inspired the investigation is https://github.com/opencontainers/runc/security/advisories/GHSA-cgrx-mc8f-2prm.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:N/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.4.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/apptainer/apptainer/security/advisories/GHSA-j3rw-fx6g-q46j"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/opencontainers/runc/security/advisories/GHSA-cgrx-mc8f-2prm"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sylabs/singularity/security/advisories/GHSA-wwrx-w7c9-rf87"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-65105"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apptainer/apptainer/pull/3226"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apptainer/apptainer/commit/4313b42717e18a4add7dd7503528bc15af905981"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apptainer/apptainer/commit/82f17900a0c31bc769bf9b4612d271c7068d8bf2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apptainer/apptainer"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-61", "CWE-706" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-12-02T21:10:04Z",
    "nvd_published_at" : "2025-12-02T18:15:48Z"
  }
}