CVE-2025-7195
JSON

6.4medium

Operator-sdk: privilege escalation due to incorrect permissions of /etc/passwd

Severity
6.4medium CVSS:3.1 by redhat
Exploit likelihood
0.26% (higher than 19% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
redhat
Also known as
GHSA-856v-8qm2-9wjvGO-2025-3852

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

Product or packageVersionsReported by
operator-sdkbefore 0.15.2CVE List
container-native-virtualization/cluster-network-addons-operator-rhel9Not specified
Not affected: from v4.17.39-2 before *, from v4.18.25-3 before *, from v4.20.3-3 before *
CVE List
multicluster-engine/addon-manager-rhel9Not specified
Not affected: from v2.6 before *, from v2.7 before *, from 1765872406 before *, from v2.9 before *
CVE List
multicluster-engine/clusterlifecycle-state-metrics-rhel9Not specified
Not affected: from v2.6 before *, from v2.7 before *, from 1766360304 before *, from v2.9 before *
CVE List
multicluster-engine/discovery-rhel9Not specified
Not affected: from v2.6 before *, from v2.7 before *, from 1765669648 before *, from v2.9 before *
CVE List
multicluster-engine/placement-rhel9Not specified
Not affected: from v2.6 before *, from v2.7 before *, from 1765872399 before *, from v2.9 before *
CVE List
multicluster-engine/registration-operator-rhel9Not specified
Not affected: from v2.6 before *, from v2.7 before *, from 1765872402 before *, from v2.9 before *
CVE List
multicluster-engine/registration-rhel9Not specified
Not affected: from v2.6 before *, from v2.7 before *, from 1765872398 before *, from v2.9 before *
CVE List
multicluster-engine/work-rhel9Not specified
Not affected: from v2.6 before *, from v2.7 before *, from 1765872400 before *, from v2.9 before *
CVE List
multicluster-engine/managedcluster-import-controller-rhel9Not specified
Not affected: from v2.7 before *, from 1765866268 before *, from v2.9 before *
CVE List
compliance/openshift-compliance-rhel8-operatorNot specified
Not affected: from 1.8.0 before *, from 1768172669 before *
CVE List
compliance/openshift-file-integrity-rhel8-operatorNot specified
Not affected: from v1.3 before *
CVE List

All scores

redhat6.4medium CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
GitHub5.2medium CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:L/I:H/A:L

Classification

CWE-276

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database

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 was 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.

Go Vulnerability Database

operator-sdk: privilege escalation due to incorrect permissions of /etc/passwd in github.com/operator-framework/operator-sdk

References

https://access.redhat.com/errata/RHEA-2025:23406vendor-advisory, web
https://access.redhat.com/errata/RHEA-2025:23478vendor-advisory, web
https://access.redhat.com/errata/RHEA-2026:0129vendor-advisory, web
https://access.redhat.com/errata/RHSA-2025:19332vendor-advisory, web
https://access.redhat.com/errata/RHSA-2025:19335vendor-advisory, web
https://access.redhat.com/errata/RHSA-2025:19958vendor-advisory, web
https://access.redhat.com/errata/RHSA-2025:19961vendor-advisory, web
https://access.redhat.com/errata/RHSA-2025:21368vendor-advisory, web
https://access.redhat.com/errata/RHSA-2025:21885vendor-advisory, web
https://access.redhat.com/errata/RHSA-2025:22415vendor-advisory, web
https://access.redhat.com/errata/RHSA-2025:22416vendor-advisory, web
https://access.redhat.com/errata/RHSA-2025:22418vendor-advisory, web

Sources

SourceRecordLicence
CVE ListCVE-2025-7195 changed 2026-09-21CVE Terms of Use
GitHub Advisory DatabaseGHSA-856v-8qm2-9wjv changed 2026-03-24CC-BY-4.0
Go Vulnerability DatabaseGO-2025-3852 changed 2026-03-03CC-BY-4.0
NVDCVE-2025-7195 changed 2026-09-21Public domain