First published: Wed Nov 15 2023(Updated: )
Summary: CPIO found to be vulnerable to Path Traversal vulnerability that can be leveraged to achieve full Remote Command Execution on the target. Details: While handling CPIO archives, the CPIO follows symlink, cpio by default will follow stored symlinks while extracting and the Archiver will not check the symlink location, which leads to arbitrary file writes to unintended locations. When the victim extracts the archive, the attacker can craft a malicious cpio archive to achieve RCE on the target system. PoC ( Steps to reproduce ) : Complete instructions to craft a cpio archive to demonstrate the vulnerability. ``` mkdir testcpio ln -sf /tmp/ testcpio/tmp echo "TEST Traversal" > testcpio/tmpYtrav.txt cd testcpio/ ls | cpio -ov > ../trav.cpio cd ../ sed -i s/"tmpY"/"tmp\/"/g trav.cpio ``` Extract the malicious archive: cpio -i < trav.cpio Impact: An attacker can craft malicious cpio archives that exploit the vulnerability to write files on locations such as ~/.ssh, ~/.bashrc, ~/.config/autostart/ etc., to achieve full remote command execution on the target/victim system. Software that uses CPIO as a component might be vulnerable. Credit: Febin Mon Saji
Affected Software | Affected Version | How to fix |
---|---|---|
GNU Cpio |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
The severity of REDHAT-BUG-2249901 is critical due to its potential for remote command execution.
To fix REDHAT-BUG-2249901, it is recommended to update to a patched version of GNU CPIO.
The potential risks associated with REDHAT-BUG-2249901 include unauthorized remote command execution on the affected system.
REDHAT-BUG-2249901 specifically affects GNU CPIO.
The nature of the vulnerability in REDHAT-BUG-2249901 is a Path Traversal vulnerability that allows following symlinks during extraction.