CVE-2025-65105

4.5 MEDIUM

📋 TL;DR

This vulnerability in Apptainer allows containers to bypass AppArmor and SELinux security restrictions when using the --security option. It affects unprivileged users on systems where these security modules are enabled, primarily on Debian-based and RHEL-based distributions. The issue could allow containers to perform operations that should be restricted by security policies.

💻 Affected Systems

Products:
  • Apptainer
Versions: Versions less than 1.4.5
Operating Systems: Linux distributions with AppArmor or SELinux enabled (Debian-based, RHEL-based, some SUSE versions)
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability affects unprivileged users on systems where AppArmor or SELinux is enabled. AppArmor is default on Debian-based distros, SELinux on RHEL-based.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Container escapes or privilege escalation allowing attackers to break out of container isolation and access host system resources.

🟠

Likely Case

Containers bypassing intended security restrictions to perform unauthorized operations within the container environment.

🟢

If Mitigated

Limited impact if proper network segmentation and least privilege principles are already implemented.

🌐 Internet-Facing: MEDIUM - Containers exposed to external users could bypass security controls.
🏢 Internal Only: MEDIUM - Internal users could bypass container security restrictions.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires user access to run containers with the --security option. No public exploit code identified.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.4.5

Vendor Advisory: https://github.com/apptainer/apptainer/security/advisories/GHSA-j3rw-fx6g-q46j

Restart Required: No

Instructions:

1. Update Apptainer to version 1.4.5 or later using your package manager. 2. For source installations: git clone, checkout v1.4.5, build and install. 3. Verify installation with 'apptainer version'.

🔧 Temporary Workarounds

Disable vulnerable --security options

linux

Restrict usage of --security=apparmor and --security=selinux options for unprivileged users

# Configure Apptainer to restrict these options
# Modify apptainer.conf to limit security options

Use container runtime security

linux

Implement additional container security controls like seccomp profiles and capabilities restrictions

# Use seccomp profiles: apptainer run --security seccomp:profile.json
# Restrict capabilities: apptainer run --security capabilities:keep=CAP_NET_BIND_SERVICE

🧯 If You Can't Patch

  • Implement strict user access controls to limit who can run containers with --security options.
  • Use mandatory access control systems at the host level to restrict container behaviors.

🔍 How to Verify

Check if Vulnerable:

Run 'apptainer version' and check if version is less than 1.4.5. Also verify if AppArmor or SELinux is enabled on the system.

Check Version:

apptainer version

Verify Fix Applied:

After updating, run 'apptainer version' to confirm version 1.4.5 or higher is installed.

📡 Detection & Monitoring

Log Indicators:

  • Unusual container execution with --security options
  • Failed AppArmor/SELinux policy enforcement logs
  • Container processes attempting restricted operations

Network Indicators:

  • Containers making unexpected network connections that should be blocked by security policies

SIEM Query:

source="apptainer" AND ("--security=apparmor" OR "--security=selinux")

🔗 References

📤 Share & Export