6.4medium
Codeready-ws: privilege escalation via excessive /etc/passwd permissions
- Severity
- 6.4medium CVSS:3.1 by redhat
- Exploit likelihood
- 0.19% (higher than 9% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- redhat
Description
A container privilege escalation flaw was found in certain CodeReady Workspaces 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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| devspaces/code-rhel9 | Not specified | CVE List |
| devspaces/pluginregistry-rhel9 | Not specified | CVE List |
| devspaces-tech-preview/jetbrains-ide-rhel9 | Not specified | CVE List |
| devspaces/udi-base-rhel9 | Not specified | CVE List |
| devspaces/udi-rhel9 | Not specified | CVE List |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
A container privilege escalation flaw was found in certain CodeReady Workspaces 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.
NVD (es)
Se encontró un fallo de escalada de privilegios de contenedor en ciertas imágenes de CodeReady Workspaces. Este problema se debe a que el archivo /etc/p4ssd se crea con permisos de escritura para el grupo durante la fase de construcción. En ciertas condiciones, un atacante que puede ejecutar comandos dentro de un contenedor afectado, incluso como un usuario no-root, puede aprovechar su pertenencia al grupo root para modificar el archivo /etc/p4ssd. Esto podría permitir al atacante añadir un nuevo usuario con cualquier UID arbitrario, incluyendo el UID 0, resultando en privilegios de root completos dentro del contenedor.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-57850 changed 2026-03-12 | CVE Terms of Use |
| NVD | CVE-2025-57850 changed 2026-10-18 | Public domain |