CVE-2025-7195
Operator-sdk: privilege escalation due to incorrect permissions of /etc/passwd
Also known as GHSA-856v-8qm2-9wjv, GO-2025-3852
Mitigation
- Upgrade github.com/operator-framework/operator-sdk to 0.15.2 or later.
- Vendor workaround: In Red Hat OpenShift Container Platform, the following default configurations reduce the impact of this vulnerability.
- Security Context Constraints (SCCs): The default SCC, Restricted-v2, applies several crucial security settings to containers.
- Capabilities: drop: ALL removes all Linux capabilities, including SETUID and SETGID. This prevents a process from changing its user or group ID, a common step in privilege escalation attacks. The SETUID and SETGID capabilities can also be dropped explicitly if other capabilities are still required.
- allowPrivilegeEscalation: false ensures that a process cannot gain more privileges than its parent process. This blocks attempts by a compromised container process to grant itself additional capabilities.
- SELinux Mandatory Access Control (MAC): Pods are required to run with a pre-allocated Multi-Category Security (MCS) label. This SELinux feature provides a strong layer of isolation between containers and from the host system. A properly configured SELinux policy can prevent a container escape, even if an attacker gains elevated permissions within the container itself.
- Filesystem Hardening: While not a default setting, a common security practice is to set readOnlyRootFilesystem: true in a container's security context. In this specific scenario, this configuration would prevent an attacker from modifying critical files like /etc/passwd, even if they managed to gain file-level write permissions.
Who should check
- Projects that depend on Go package github.com/operator-framework/operator-sdk (< 0.15.2)
- Anyone running operator-framework operator-sdk < 0.15.2
- Anyone running Red Hat RHEL-9-CNV-4.17 all versions
- Anyone running Red Hat RHEL-9-CNV-4.18 all versions
- Anyone running Red Hat RHEL-9-CNV-4.20 all versions
- Anyone running Red Hat multicluster engine for Kubernetes 2.6 all versions
- Anyone running Red Hat multicluster engine for Kubernetes 2.7 all versions
- Anyone running Red Hat multicluster engine for Kubernetes 2.8 all versions
Vulnerability facts
- Affected
- github.com/operator-framework/operator-sdk < 0.15.2
- Fixed in
- 0.15.2
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 6.4 (v3.1, CNA)CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: High
- Privileges required: High
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.30% chance of exploitation in 30 days (percentile 15, 2026-11-26)
- CWE
- CWE-276
- Modified
Description
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.
Affected and fixed versions
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-7195. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-7195.md Affected: github.com/operator-framework/operator-sdk < 0.15.2 Fixed in: 0.15.2 Steps: 1. Search this machine and project for github.com/operator-framework/operator-sdk (Go), operator-framework operator-sdk, Red Hat RHEL-9-CNV-4.17, Red Hat RHEL-9-CNV-4.18, Red Hat RHEL-9-CNV-4.20, Red Hat multicluster engine for Kubernetes 2.6: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
- https://access.redhat.com/errata/RHEA-2025:23406
- https://access.redhat.com/errata/RHEA-2025:23478
- https://access.redhat.com/errata/RHEA-2026:0129
- https://access.redhat.com/errata/RHSA-2025:19332
- https://access.redhat.com/errata/RHSA-2025:19335
- https://access.redhat.com/errata/RHSA-2025:19958
- https://access.redhat.com/errata/RHSA-2025:19961
- https://access.redhat.com/errata/RHSA-2025:21368
- https://access.redhat.com/errata/RHSA-2025:21885
- https://access.redhat.com/errata/RHSA-2025:22415
- https://access.redhat.com/errata/RHSA-2025:22416
- https://access.redhat.com/errata/RHSA-2025:22418
- https://access.redhat.com/errata/RHSA-2025:22420
- https://access.redhat.com/errata/RHSA-2025:22683
- https://access.redhat.com/errata/RHSA-2025:22684
- https://access.redhat.com/errata/RHSA-2025:23528
- https://access.redhat.com/errata/RHSA-2025:23529
- https://access.redhat.com/errata/RHSA-2025:23542
- https://access.redhat.com/errata/RHSA-2026:0627
- https://access.redhat.com/errata/RHSA-2026:0718
- https://access.redhat.com/errata/RHSA-2026:0722
- https://access.redhat.com/errata/RHSA-2026:0737
- https://access.redhat.com/errata/RHSA-2026:2572
- https://access.redhat.com/errata/RHSA-2026:5633
- https://nvd.nist.gov/vuln/detail/CVE-2025-7195
- https://github.com/advisories/GHSA-856v-8qm2-9wjv
FAQ
Is CVE-2025-7195 being exploited?
There is no confirmed exploitation: CVE-2025-7195 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.30% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-7195?
Medium: CVSS 6.4 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2025-7195?
github.com/operator-framework/operator-sdk < 0.15.2.
Is there a fix for CVE-2025-7195?
Yes. Fixed in 0.15.2. Upgrade github.com/operator-framework/operator-sdk to 0.15.2 or later. Vendor workaround: In Red Hat OpenShift Container Platform, the following default configurations reduce the impact of this vulnerability. Security Context Constraints (SCCs): The default SCC, Restricted-v2, applies several crucial security settings to containers. Capabilities: drop: ALL removes all Linux capabilities, including SETUID and SETGID. This prevents a process from changing its user or group ID, a common step in privilege escalation attacks. The SETUID and SETGID capabilities can also be dropped explicitly if other capabilities are still required. allowPrivilegeEscalation: false ensures that a process cannot gain more privileges than its parent process. This blocks attempts by a compromised container process to grant itself additional capabilities. SELinux Mandatory Access Control (MAC): Pods are required to run with a pre-allocated Multi-Category Security (MCS) label. This SELinux feature provides a strong layer of isolation between containers and from the host system. A properly configured SELinux policy can prevent a container escape, even if an attacker gains elevated permissions within the container itself. Filesystem Hardening: While not a default setting, a common security practice is to set readOnlyRootFilesystem: true in a container's security context. In this specific scenario, this configuration would prevent an attacker from modifying critical files like /etc/passwd, even if they managed to gain file-level write permissions.
How do I check if I'm affected by CVE-2025-7195?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.