CVE-2025-7195: Operator-sdk: privilege escalation due to incorrect permissions of /etc/passwd
Early versions of Operator-SDK provided an insecure method to allow operator containers to run in environments that used a random UID. Operator-SDK before 0.15.2 provided a script, user_setup, which modifies the permissions of the /etc/passwd file to 664 during build time. Developers who used Operator-SDK before 0.15.2 to scaffold their operator may still be impacted by this if the insecure user_setup script is still being used to build new container images.
In affected images, the /etc/passwd file is created during build time with group-writable permissions and a group ownership of root (gid=0). An attacker who can execute commands within an affected container, even as a non-root user, may be able to leverage their membership in the root group to modify the /etc/passwd file. This could allow the attacker to add a new user with any arbitrary UID, including UID 0, leading to full root privileges within the container.
Security readout for executives and security teams
Plain-English summary
This issue affects container images built from older Operator-SDK scaffolding that left /etc/passwd group-writable. If an attacker already has command execution inside an affected container, they may be able to become root inside that container. It is not a remote entry point by itself.
Executive priority
Treat this as a targeted remediation item for Kubernetes platform teams, not an internet-wide emergency. Prioritize affected Red Hat packages and internally built operator images because successful abuse can turn container access into root inside the container.
Technical view
Operator-SDK before 0.15.2 included a user_setup script that changed /etc/passwd to mode 664 with gid 0 ownership. In affected images, a non-root process in the root group could modify /etc/passwd and create an arbitrary UID, including UID 0, producing container-local root privileges.
Likely exposure
Exposure is most likely in Kubernetes operator images originally scaffolded with Operator-SDK before 0.15.2 and still built with the insecure user_setup script. The source bundle also lists affected Red Hat CNV and multicluster engine container packages and versions.
Exploitation context
The CVSS vector is local, high complexity, and high privileges required. Sources do not show KEV listing or active exploitation. The attacker must already be able to execute commands inside an affected container, so this is mainly a post-compromise privilege escalation risk.
Researcher notes
Evidence supports container-local privilege escalation through incorrect /etc/passwd permissions. The source bundle does not establish host escape, remote exploitation, public exploit activity, or complete remediation details beyond vendor advisories and removal of the insecure build behavior.
Mitigation direction
Apply relevant Red Hat RHSA or RHEA updates for listed affected products.
Rebuild affected operator images without the insecure Operator-SDK user_setup behavior.
Check vendor guidance before assuming fixed package versions or backported behavior.
Prevent unnecessary command execution paths into operator containers.
Review container security context and avoid unnecessary root-group membership where possible.
Validation and detection
Inventory operator images scaffolded with Operator-SDK before 0.15.2.
Inspect image builds for continued use of the user_setup script.
Verify /etc/passwd is not group-writable in running and built images.
Map deployed Red Hat CNV and multicluster engine versions to listed affected packages.
Confirm remediation by retesting rebuilt images and updated vendor packages.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-276: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references privilege impact, so privilege escalation and authorization behavior review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
The affected technology mentions containers, so container-specific ATT&CK technique review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-276 · source CWE mapping
Incorrect Default Permissions
Incorrect Default Permissions represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.