CVE-2025-65105
JSON

4.5medium

Apptainer ineffective application of selinux and apparmor --security options

Severity
4.5medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.25% (higher than 17% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-j3rw-fx6g-q46jGO-2025-4176

Description

Apptainer is an open source container platform. 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. This vulnerability is fixed in 1.4.5.

Affected

Product or packageVersionsReported by
apptainer apptainer< 1.4.5CVE List
github.com/apptainer/apptainer (Go)before 1.4.5GitHub Advisory Database, Go Vulnerability Database
lfprojects apptainerbefore 1.4.5NVD

All scores

GitHub_M4.5medium CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
GitHub4.5medium CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
NVD5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Classification

CWE-61CWE-706

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Apptainer is an open source container platform. 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. This vulnerability is fixed in 1.4.5.

GitHub Advisory Database
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.

Go Vulnerability Database

Apptainer ineffectively applies selinux and apparmor --security options in github.com/apptainer/apptainer

NVD (es)

Apptainer es una plataforma de contenedores de código abierto. En versiones de Apptainer anteriores a la 1.4.5, un contenedor puede deshabilitar dos de las formas de la poco utilizada opción '--security', en particular las formas '--security=apparmor:<profile>' y '--security=selinux:<label>', las cuales de otro modo imponen restricciones a las operaciones que los contenedores pueden realizar. La opción '--security' siempre ha sido mencionada en la documentación de Apptainer como una característica para el usuario root, aunque estas formas también funcionan para usuarios sin privilegios en sistemas donde la característica correspondiente está habilitada. Apparmor está habilitado por defecto en distribuciones basadas en Debian y SElinux está habilitado por defecto en distribuciones basadas en RHEL, pero en SUSE depende de la versión de la distribución. Esta vulnerabilidad está corregida en la versión 1.4.5.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-65105 changed 2025-12-02CVE Terms of Use
GitHub Advisory DatabaseGHSA-j3rw-fx6g-q46j changed 2026-02-04CC-BY-4.0
Go Vulnerability DatabaseGO-2025-4176 changed 2026-03-03CC-BY-4.0
NVDCVE-2025-65105 changed 2026-10-18Public domain