PT-2021-14361 · Apache · Apache Commons Compress
Pwntester
·
Published
2021-01-15
·
Updated
2021-01-21
·
CVE-2021-21251
CVSS v3.1
8.8
High
| Vector | AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Name of the Vulnerable Software and Affected Versions:
OneDev versions prior to 4.0.3
Description:
OneDev is an all-in-one devops platform with a critical "zip slip" vulnerability that may lead to arbitrary file write. The KubernetesResource REST endpoint untars user-controlled data from the request body using
TarUtils, a custom library method leveraging Apache Commons Compress. During the untar process, there are no checks in place to prevent an untarred file from traversing the file system and overriding an existing file. For a successful exploitation, the attacker requires a valid JobToken. This issue is considered a vulnerability in io.onedev.commons.utils.TarUtils since it can affect other projects using it.Recommendations:
For versions prior to 4.0.3, update to version 4.0.3 or later, which validates paths in the tar archive to only allow them to be in a specified folder when extracted. As a temporary workaround, consider restricting access to the
KubernetesResource REST endpoint or disabling the TarUtils function until a patch is available. Avoid using the JobToken in the affected API endpoint until the issue is resolved.Fix
Path traversal
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Apache Commons Compress