Bug 1905945 (CVE-2020-27833) - CVE-2020-27833 openshift/oc: zip slip - arbitrary file write vulnerability / arbitrary code execution using a specially crafted container image
Summary: CVE-2020-27833 openshift/oc: zip slip - arbitrary file write vulnerability / ...
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2020-27833
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1966503 1905948
Blocks: 1903168 1939574
TreeView+ depends on / blocked
 
Reported: 2020-12-09 11:10 UTC by Mark Cooper
Modified: 2025-05-01 16:01 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-10-28 01:43:12 UTC
Embargoed:


Attachments (Terms of Use)

Description Mark Cooper 2020-12-09 11:10:30 UTC
A vulnerability was found in all versions of the `oc` binary packaged in openshift-clients, limited to the `oc image extract` command. An arbitrary file read and/or write can be achieved using a specially crafted container image (.tar file) that holds symbolic links. When a symbolic link is first created pointing within the tarball this bypasses the existing path checks. Subsequent symbolic links can then be created to link outside of the tarball's parent directory. If an executable or configuration file can be overwritten as a result, the vulnerability can turn into arbitrary code execution.

Comment 6 Mark Cooper 2020-12-15 01:07:00 UTC
Acknowledgments:

Name: Chris Smowton (GitHub Security Lab)

Comment 8 Mark Cooper 2020-12-15 02:17:35 UTC
Mitigation:

The option `--only-files=true` can be specified to ensure that only files and directories from the image are extracted and symbolic links are ignored. While this means that if a  image does implement malicious symbolic links, no links will be created outside the parent tarball. However, this does mean that if legitimate symbolic links are specific within the image these will also not be created.

Comment 10 Mark Cooper 2021-10-28 01:43:12 UTC
Closing old flaw bug


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