CVE-2025-58712: Amq: privilege escalation via excessive /etc/passwd permissions
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.
Other sources
The /etc/passwd file is created during build time with group-writable permissions. In certain conditions, 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.
— Red Hat
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-58712?
CVE-2025-58712 is classified as a privilege escalation vulnerability affecting certain AMQ Broker images.
How do I fix CVE-2025-58712?
To fix CVE-2025-58712, you must update the affected AMQ Broker images to versions that do not have group-writable permissions on the /etc/passwd file.
What are the potential impacts of CVE-2025-58712?
The potential impacts of CVE-2025-58712 include unauthorized privilege escalation within the affected container, allowing an attacker to execute commands with elevated permissions.
Which software is affected by CVE-2025-58712?
CVE-2025-58712 affects Red Hat AMQ Broker images where the /etc/passwd file has been improperly created.
Can an attacker exploit CVE-2025-58712 from outside the container?
No, an attacker must have the ability to execute commands within the affected container to exploit CVE-2025-58712.