/

CVE-2026-133835

Severity:

HIGH RISK

(7.3)

Path Traversal (CWE-22) in HanLP TAR Archive Handler

CVE-2026-133835

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Unauthorized file access or modification

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

HanLP's TAR archive extraction handler may allow archive paths to escape the intended extraction directory. If an attacker can provide or influence an archive that the application processes, this could enable unauthorized file writes on the system.

Affected context

The issue is in the uncompress function in hanlp/utils/io_util.py, which handles TAR archive extraction. Deployments may be at risk when they process archives that an attacker can influence and extracted paths are not adequately restricted to the intended destination.

Exploit preconditions

  • Attack surface: TAR archive processing through HanLP or an application that uses its extraction handler
  • Required access: Ability to submit, replace, or otherwise influence an archive that will be processed; the description indicates remote exploitation may be possible
  • Trigger point: Extraction of the attacker-influenced archive
  • Why exploitation is possible: Archive paths may be resolved outside the intended extraction directory if path containment is not enforced

Why this happens

The underlying issue is path traversal during archive extraction, mapped to CWE-22: Improper Limitation of a Pathname to a Restricted Directory. The insecure pattern is trusting archive member paths without ensuring that their resolved destinations remain within the designated extraction directory.

Potential impact

  • An attacker may write files outside the intended extraction directory
  • Existing files could be overwritten if the process has sufficient permissions
  • Application behavior or configuration could be affected by unauthorized file changes
  • The consequences could extend to other services or data accessible to the extraction process

General mitigation guidance

Defensive patterns focus on treating archive contents as untrusted and constraining all extraction paths.

  • Resolve each destination path and verify it remains within the intended extraction directory before writing
  • Reject absolute paths and path components that escape the extraction root
  • Prefer archive APIs or wrappers that enforce safe extraction by default
  • Limit archive-processing privileges and filesystem access
  • Reduce exposure by accepting archives only from trusted sources and validating them before processing

How teams detect issues like this

  • Use static analysis to identify archive extraction code that writes member paths without path-containment checks
  • Review code for unsafe joins, normalization gaps, and reliance on archive-provided filenames
  • Add tests and security policies that verify extraction cannot write outside a designated temporary directory
  • Monitor archive-processing workflows for unexpected filesystem changes

Sources

SourceLink
gist.github.comgist.github.com/zewolkt3939/8f665b80c0878e5efde324c255d1abcd
github.comgithub.com/hankcs/HanLP/
github.comgithub.com/hankcs/HanLP/commit/feb0f82d12762cf4e687b9926efd90c672857780
vuldb.comvuldb.com/cve/CVE-2026-133835
vuldb.comvuldb.com/submit/1051821
vuldb.comvuldb.com/vuln/441458
vuldb.comvuldb.com/vuln/441458/cti

Frequently asked

questions

The vulnerability description says remote exploitation is possible. In practice, exposure depends on whether an attacker can influence an archive that a reachable application or service processes.

The key prerequisite is the ability to submit or otherwise control an archive that reaches the vulnerable extraction function. The impact also depends on the permissions of the process performing extraction.

Ensure every resolved extraction destination stays within the intended extraction directory, and reject paths that do not meet that condition.

Treat archive metadata as untrusted, use safe-by-default extraction mechanisms, test path containment, and run extraction with only the filesystem privileges it needs.

Find out what's already
exploitable in your codebase.