CVE-2025-7195
📋 TL;DR
This vulnerability allows attackers with non-root access inside affected containers to modify the /etc/passwd file due to insecure group-writable permissions. Developers who used Operator-SDK before version 0.15.2 to scaffold operators may have container images vulnerable to privilege escalation. Attackers can add arbitrary users including UID 0, potentially gaining full root privileges within the container.
💻 Affected Systems
- Operator-SDK
⚠️ Manual Verification Required
This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.
Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).
🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.
- Review the CVE details at NVD
- Check vendor security advisories for your specific version
- Test if the vulnerability is exploitable in your environment
- Consider updating to the latest version as a precaution
⚠️ Risk & Real-World Impact
Worst Case
Full container compromise with root privileges, allowing complete control over container resources, data exfiltration, and potential lateral movement to other containers or the host system.
Likely Case
Privilege escalation within the container allowing unauthorized access to sensitive data and container resources, but limited by container isolation mechanisms.
If Mitigated
Minimal impact if containers run with proper security contexts, minimal privileges, and network segmentation limiting lateral movement.
🎯 Exploit Status
Exploitation requires command execution within the container as a non-root user. The attack involves simple file permission manipulation and user addition commands.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 0.15.2 and later
Vendor Advisory: https://access.redhat.com/errata/RHEA-2025:23406
Restart Required: Yes
Instructions:
1. Upgrade Operator-SDK to version 0.15.2 or later. 2. Rebuild all container images using the updated SDK. 3. Redeploy operators with the new container images. 4. Verify old images are removed from registries and deployments.
🔧 Temporary Workarounds
Fix /etc/passwd permissions in existing containers
linuxManually correct file permissions on running containers to remove group-writable access
chmod 644 /etc/passwd
chown root:root /etc/passwd
Update Dockerfile to fix permissions
linuxAdd permission correction to Dockerfile before building new images
RUN chmod 644 /etc/passwd && chown root:root /etc/passwd
🧯 If You Can't Patch
- Run containers with read-only root filesystem to prevent /etc/passwd modification
- Implement strict network policies and container isolation to limit attack surface
🔍 How to Verify
Check if Vulnerable:
Check container images for /etc/passwd permissions: 'docker exec <container> ls -la /etc/passwd' - if output shows permissions like -rw-rw-r-- with group root, container is vulnerable.
Check Version:
operator-sdk version
Verify Fix Applied:
Verify /etc/passwd permissions show -rw-r--r-- and ownership root:root. Check Operator-SDK version used to build images is 0.15.2+.
📡 Detection & Monitoring
Log Indicators:
- Unexpected user additions in /etc/passwd
- Permission changes to system files
- Commands attempting to modify /etc/passwd
Network Indicators:
- Unusual outbound connections from containers after privilege escalation
SIEM Query:
container.runtime.command:*passwd* OR file.path:/etc/passwd AND file.permission_change:*
🔗 References
- 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/security/cve/CVE-2025-7195
- https://bugzilla.redhat.com/show_bug.cgi?id=2376300