提交 #1051821: hankcs HanLP 2.1.6 Path Traversal信息

标题hankcs HanLP 2.1.6 Path Traversal
描述A vulnerability was found in hankcs HanLP up to 2.1.6. This issue affects the function uncompress in the file hanlp/utils/io_util.py. When HanLP downloads and decompresses a resource, it extracts TAR archives with tarfile.open(path, 'r:*').extractall(dest) and performs no validation of archive member paths. The manipulation of a crafted archive whose members contain "../" sequences (or absolute paths) leads to files being written outside the intended extraction directory (Tar-Slip / arbitrary file write), which can be escalated to code execution. The function is reached from the public API hanlp.load() and get_resource(), whose documentation states the argument may be a remote URL that is downloaded and decompressed; third-party URLs are supported. The zipfile branch is not affected (CPython sanitises zip members); only the TAR branch is affected, on Python versions before 3.14 (where extractall still defaults to no filter). The attack can be initiated remotely. A proof of concept is available. This issue is distinct from CVE-2026-112079 and CVE-2026-112081, which affect deserialization in other functions.
来源⚠️ https://gist.github.com/zewolkt3939/8f665b80c0878e5efde324c255d1abcd
用户
 kubao4664 (UID 102326)
提交2026-10-22 11時18分 (1 月前)
管理2026-11-20 15時31分 (29 days later)
状态已接受
VulDB条目441458 [hankcs HanLP 直到 2.1.6 TAR Archive Extraction hanlp/utils/io_util.py uncompress 目录遍历]
积分20

Do you know our Splunk app?

Download it now for free!