Skip to main content
CVE Vulnerability Database

CVE-2024-9341: Containers Common Path Traversal Flaw

CVE-2024-9341 is a path traversal flaw in Containers Common that allows attackers to exploit symbolic links and mount sensitive host directories inside containers. This article covers technical details, affected versions, and mitigation strategies.

Updated:

CVE-2024-9341 Overview

CVE-2024-9341 is a symlink handling flaw in the Go containers/common library used by container runtimes such as Podman and CRI-O. When Federal Information Processing Standards (FIPS) mode is enabled, the library improperly validates certain file paths during subscription mounting. Attackers can abuse symbolic links to trick the runtime into mounting sensitive host directories inside a container, bypassing container isolation and exposing critical host files. The flaw affects Red Hat Enterprise Linux and multiple versions of Red Hat OpenShift Container Platform. The vulnerability is tracked as CWE-59: Improper Link Resolution Before File Access.

Critical Impact

Successful exploitation breaks container isolation, allowing attackers to read sensitive host filesystem content from inside a container running on a FIPS-enabled system.

Affected Products

  • containers/common Go library
  • Red Hat OpenShift Container Platform 4.12 through 4.17
  • Red Hat Enterprise Linux 8 and 9

Discovery Timeline

  • 2024-10-01 - CVE-2024-9341 published to the National Vulnerability Database (NVD)
  • 2024-12-11 - Last updated in NVD database

Technical Details for CVE-2024-9341

Vulnerability Analysis

The containers/common library provides shared logic for container runtimes, including subscription and secret mounting via the pkg/subscriptions package. When FIPS mode is active, the runtime injects FIPS-related material into containers by mounting host paths. The mount logic does not adequately validate whether path components inside the source tree are symbolic links pointing outside the intended directory. An attacker with the ability to influence the container image or the mount source content can plant a symlink that resolves to an arbitrary location on the host. The runtime follows the link and mounts the target into the container, granting the container process visibility into host files it should never see.

Root Cause

The root cause is improper link resolution before file access in the subscription handling code paths referenced at pkg/subscriptions/subscriptions.go#L169 and pkg/subscriptions/subscriptions.go#L349. The code resolves paths without confining resolution to the expected base directory, so a symlink encountered during traversal is dereferenced against the host filesystem.

Attack Vector

Exploitation requires FIPS mode to be enabled on the host and user interaction such as launching or accepting a crafted container. The attacker prepares a container image or storage layout containing a symbolic link in a subscription-related path. When the runtime starts the container, it mounts the symlink target from the host into the container. The container can then read sensitive files including private keys, credentials, or configuration material from the host. Because the mount crosses the container security boundary, the scope is changed and confidentiality impact on the host is high.

No verified public exploit code is available. See the Red Hat advisory for CVE-2024-9341 and Red Hat Bug Report #2315691 for vendor technical details.

Detection Methods for CVE-2024-9341

Indicators of Compromise

  • Unexpected bind mounts inside running containers pointing to host paths outside /run/secrets, /etc/pki/entitlement, or other expected subscription directories.
  • Container images or layers containing symbolic links within subscription mount source directories.
  • Container processes reading host files such as /etc/shadow, private keys, or kubelet credentials that should be outside the container view.

Detection Strategies

  • Inspect container mount tables with findmnt or cat /proc/<pid>/mountinfo for mount sources that resolve outside expected subscription directories.
  • Scan container images for symbolic links inside paths consumed by the containers/common subscriptions logic before deployment.
  • Correlate FIPS-enabled host telemetry with container start events and audit the resulting mount namespaces for anomalies.

Monitoring Recommendations

  • Enable Linux audit rules on host paths containing FIPS material and subscription secrets, and alert on reads originating from container PIDs.
  • Monitor containers/common, podman, crio, and buildah package versions across the fleet and flag hosts running pre-patch builds with FIPS mode enabled.
  • Forward container runtime logs and host audit logs to a centralized analytics platform to identify cross-boundary file access patterns.

How to Mitigate CVE-2024-9341

Immediate Actions Required

  • Apply the Red Hat errata for affected components on all FIPS-enabled hosts and OpenShift clusters, prioritizing nodes that run untrusted workloads.
  • Restrict who can publish or run container images on FIPS-enabled hosts until patching is complete.
  • Audit existing containers for unexpected host mounts and terminate any container exhibiting suspicious mount behavior.

Patch Information

Red Hat has issued multiple advisories that update containers/common and dependent packages across RHEL and OpenShift Container Platform. Relevant advisories include RHSA-2024:7925, RHSA-2024:8039, RHSA-2024:8112, RHSA-2024:8238, RHSA-2024:8263, RHSA-2024:8428, RHSA-2024:8690, RHSA-2024:8694, RHSA-2024:8846, RHSA-2024:9454, RHSA-2024:9459, RHSA-2024:10147, and RHSA-2024:10818.

Workarounds

  • Where operationally acceptable, disable FIPS mode on hosts that do not require it until patches are applied, since exploitation depends on the FIPS code path.
  • Only run container images from trusted, signed sources and validate image contents through a registry scanning policy that flags symbolic links in sensitive paths.
  • Apply SELinux in enforcing mode with the default container policy to limit the readable host paths even if a malicious mount succeeds.
bash
# Verify patched containers-common version on RHEL
rpm -q containers-common

# Check whether FIPS mode is currently enabled
fips-mode-setup --check
cat /proc/sys/crypto/fips_enabled

# Inspect a running container's mounts for unexpected host paths
crictl inspect <container-id> | jq '.info.runtimeSpec.mounts'

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.