Skip to main content
Vulnerability Database/CVE-2025-57849

CVE-2025-57849: Fuse Container Privilege Escalation Flaw

CVE-2025-57849 is a privilege escalation vulnerability in Fuse container images caused by group-writable /etc/passwd permissions. Attackers can gain root access by modifying user configurations. Learn the technical details.

Updated:

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

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2025-57849 Overview

CVE-2025-57849 is a container privilege escalation flaw affecting certain Fuse images. The issue stems from the /etc/passwd file being created with group-writable permissions during the image build process. An attacker who can execute commands inside an affected container, even as a non-root user, can abuse membership in the root group to modify /etc/passwd. This allows the attacker to insert a new user entry with an arbitrary UID, including UID 0, granting full root privileges inside the container. The weakness is tracked under CWE-276: Incorrect Default Permissions.

Critical Impact

A non-root container user with root group membership can escalate to UID 0 inside the container by appending a new account to a world-readable, group-writable /etc/passwd.

Affected Products

  • Red Hat Fuse container images that ship /etc/passwd with group-writable permissions
  • Downstream container images derived from the affected Fuse base layers
  • Workloads running these images where processes inherit root group membership

Discovery Timeline

  • 2026-03-13 - CVE-2025-57849 published to the National Vulnerability Database
  • 2026-03-16 - Last updated in the NVD database

Technical Details for CVE-2025-57849

Vulnerability Analysis

The vulnerability is a permission misconfiguration introduced at container image build time. The /etc/passwd file, which maps user names to UIDs and login shells, is written with mode bits that permit write access to members of its owning group. On most container images this owning group is root (GID 0). Linux container runtimes commonly run application processes as a non-root UID but still place that UID in the supplementary root group to allow access to OpenShift-style arbitrary-UID file layouts. This combination converts a benign group membership into a write primitive against an authentication-critical file. Once the attacker has command execution inside the container, the integrity of the local user database is no longer enforced by the operating system.

Root Cause

The root cause is incorrect default file permissions on /etc/passwd baked into the affected Fuse images. The file should be owned by root:root with mode 0644, but the affected images ship it with group write permission, allowing any process whose effective or supplementary GID is 0 to modify it.

Attack Vector

Exploitation requires local code execution inside the container as a user belonging to the root group. The attacker appends a crafted line to /etc/passwd defining a new account with UID 0, an optional password hash, and /bin/sh as the shell. The attacker then switches to the new account using su to obtain a shell running with root privileges inside the container namespace. From that position, the attacker can read mounted secrets, tamper with application binaries, or attempt container escape using kernel or runtime weaknesses.

// No verified public exploit code is available for CVE-2025-57849.
// Refer to the Red Hat advisory for technical details:
// https://access.redhat.com/security/cve/CVE-2025-57849

Detection Methods for CVE-2025-57849

Indicators of Compromise

  • Unexpected entries in /etc/passwd referencing UID 0 other than the original root account.
  • Recent modification timestamps (mtime/ctime) on /etc/passwd that postdate the container start time.
  • Process trees showing su or shell escalation originating from a non-root service account inside Fuse containers.
  • Audit events recording write or open with O_WRONLY against /etc/passwd by non-root UIDs.

Detection Strategies

  • Scan running and stored container images for /etc/passwd files with mode bits granting group write access using stat -c '%a %n' /etc/passwd.
  • Compare the live /etc/passwd against the image baseline to detect drift or appended UID 0 entries.
  • Alert on any process with a non-zero real UID that successfully writes to /etc/passwd, /etc/shadow, or /etc/group.

Monitoring Recommendations

  • Enable Linux audit rules on container hosts to watch writes to /etc/passwd across all mount namespaces.
  • Forward container runtime and Kubernetes audit logs to a centralized analytics platform for correlation with privilege escalation patterns.
  • Track creation of new local shell sessions originating from non-root service accounts in Fuse workloads.

How to Mitigate CVE-2025-57849

Immediate Actions Required

  • Identify all running containers built from affected Fuse images and inventory their /etc/passwd permissions.
  • Rebuild or repull images once Red Hat publishes fixed Fuse image tags and redeploy affected workloads.
  • Remove unnecessary supplementary root group membership from application service accounts where the workload does not require it.
  • Enforce read-only root filesystems (readOnlyRootFilesystem: true) in Kubernetes pod security contexts to block runtime modification of /etc/passwd.

Patch Information

Refer to the Red Hat CVE-2025-57849 Advisory and Red Hat Bug Report #2391100 for the authoritative list of fixed image versions and remediation guidance. Update to the patched Fuse image tags as released by Red Hat and rebuild any downstream images that inherit the affected layers.

Workarounds

  • Apply chmod 0644 /etc/passwd and chown root:root /etc/passwd in a derived Dockerfile layer until patched base images are available.
  • Drop the root group from the container's supplementary groups using securityContext.supplementalGroups configuration in Kubernetes.
  • Mount /etc/passwd as a read-only file from a ConfigMap or volume to prevent in-container modification.
bash
# Dockerfile remediation layer for affected Fuse images
FROM registry.redhat.io/fuse/affected-image:tag
USER 0
RUN chmod 0644 /etc/passwd /etc/group && \
    chown root:root /etc/passwd /etc/group
USER 1001

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

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

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.