CVE-2025-58712: Incorrect Default Permissions in Red Hat RHEL-9 based Middleware Containers
A container privilege escalation flaw was found in certain AMQ Broker images. This issue stems from the /etc/passwd file being created with group-writable permissions during build time. In certain conditions, an attacker who can execute commands within an affected container, even as a non-root user, can 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.
AI Analysis
Technical Summary
CVE-2025-58712 identifies a privilege escalation vulnerability in Red Hat RHEL-9 based middleware containers, notably certain AMQ Broker container images. The root cause is the /etc/passwd file being created with group-writable permissions during the container image build process. This misconfiguration allows any user who can execute commands inside the container and who is a member of the root group to modify the /etc/passwd file. By altering this file, the attacker can add new user entries with arbitrary user IDs, including UID 0, effectively granting themselves root privileges inside the container environment. The vulnerability requires that the attacker already have command execution capabilities within the container and be part of the root group, which implies a prerequisite level of access. The CVSS v3.1 base score is 5.2, reflecting medium severity due to the need for high privileges and local access. The impact primarily affects container confidentiality, integrity, and availability within the container boundary but does not directly escalate privileges on the host system. No public exploits have been reported, but the vulnerability highlights the risks of improper file permission settings in container images and the importance of secure container build practices.
Potential Impact
For European organizations, this vulnerability poses a significant risk to containerized environments running Red Hat RHEL-9 based middleware containers, especially those utilizing AMQ Broker images. Exploitation could allow attackers with limited container access to escalate privileges to root within the container, potentially enabling unauthorized data access, manipulation, or disruption of containerized services. This could lead to lateral movement within internal networks if container isolation is weak or misconfigured. Organizations relying on container orchestration platforms like Kubernetes may face increased risk if compromised containers are used as footholds. The vulnerability does not directly affect the host OS but undermines container security, which is critical for multi-tenant environments and cloud deployments common in Europe. The medium severity score suggests moderate urgency, but the potential for privilege escalation inside containers necessitates prompt remediation to maintain compliance with European data protection regulations and cybersecurity standards.
Mitigation Recommendations
European organizations should immediately audit their Red Hat RHEL-9 based middleware container images, particularly AMQ Broker images, to verify the permissions of critical files such as /etc/passwd. Containers should be rebuilt with corrected file permissions, ensuring /etc/passwd is not group-writable. Implement strict container build pipelines with automated security checks to detect improper file permissions. Limit container user group memberships to the minimum necessary, avoiding unnecessary root group membership. Employ runtime security tools to monitor and restrict unauthorized file modifications within containers. Use container security best practices such as running containers with least privilege, enabling user namespaces, and applying mandatory access controls (e.g., SELinux, AppArmor). Regularly update container images with vendor patches once available. Additionally, restrict access to container shells and command execution capabilities to trusted users only, and monitor container logs for suspicious activities indicative of privilege escalation attempts.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Poland
CVE-2025-58712: Incorrect Default Permissions in Red Hat RHEL-9 based Middleware Containers
Description
A container privilege escalation flaw was found in certain AMQ Broker images. This issue stems from the /etc/passwd file being created with group-writable permissions during build time. In certain conditions, an attacker who can execute commands within an affected container, even as a non-root user, can 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.
AI-Powered Analysis
Technical Analysis
CVE-2025-58712 identifies a privilege escalation vulnerability in Red Hat RHEL-9 based middleware containers, notably certain AMQ Broker container images. The root cause is the /etc/passwd file being created with group-writable permissions during the container image build process. This misconfiguration allows any user who can execute commands inside the container and who is a member of the root group to modify the /etc/passwd file. By altering this file, the attacker can add new user entries with arbitrary user IDs, including UID 0, effectively granting themselves root privileges inside the container environment. The vulnerability requires that the attacker already have command execution capabilities within the container and be part of the root group, which implies a prerequisite level of access. The CVSS v3.1 base score is 5.2, reflecting medium severity due to the need for high privileges and local access. The impact primarily affects container confidentiality, integrity, and availability within the container boundary but does not directly escalate privileges on the host system. No public exploits have been reported, but the vulnerability highlights the risks of improper file permission settings in container images and the importance of secure container build practices.
Potential Impact
For European organizations, this vulnerability poses a significant risk to containerized environments running Red Hat RHEL-9 based middleware containers, especially those utilizing AMQ Broker images. Exploitation could allow attackers with limited container access to escalate privileges to root within the container, potentially enabling unauthorized data access, manipulation, or disruption of containerized services. This could lead to lateral movement within internal networks if container isolation is weak or misconfigured. Organizations relying on container orchestration platforms like Kubernetes may face increased risk if compromised containers are used as footholds. The vulnerability does not directly affect the host OS but undermines container security, which is critical for multi-tenant environments and cloud deployments common in Europe. The medium severity score suggests moderate urgency, but the potential for privilege escalation inside containers necessitates prompt remediation to maintain compliance with European data protection regulations and cybersecurity standards.
Mitigation Recommendations
European organizations should immediately audit their Red Hat RHEL-9 based middleware container images, particularly AMQ Broker images, to verify the permissions of critical files such as /etc/passwd. Containers should be rebuilt with corrected file permissions, ensuring /etc/passwd is not group-writable. Implement strict container build pipelines with automated security checks to detect improper file permissions. Limit container user group memberships to the minimum necessary, avoiding unnecessary root group membership. Employ runtime security tools to monitor and restrict unauthorized file modifications within containers. Use container security best practices such as running containers with least privilege, enabling user namespaces, and applying mandatory access controls (e.g., SELinux, AppArmor). Regularly update container images with vendor patches once available. Additionally, restrict access to container shells and command execution capabilities to trusted users only, and monitor container logs for suspicious activities indicative of privilege escalation attempts.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- redhat
- Date Reserved
- 2025-09-03T15:20:52.036Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 68f92183732d1470b7fcdfeb
Added to database: 10/22/2025, 6:25:07 PM
Last enriched: 11/20/2025, 9:37:19 PM
Last updated: 12/5/2025, 8:16:21 AM
Views: 68
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-13684: CWE-352 Cross-Site Request Forgery (CSRF) in alexkar ARK Related Posts
MediumCVE-2025-12130: CWE-352 Cross-Site Request Forgery (CSRF) in wcvendors WC Vendors – WooCommerce Multivendor, WooCommerce Marketplace, Product Vendors
MediumCVE-2025-12850: CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in wphocus My auctions allegro
HighCVE-2025-13515: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in danrajkumar Nouri.sh Newsletter
MediumCVE-2025-12374: CWE-287 Improper Authentication in pickplugins User Verification by PickPlugins
CriticalActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.