/

CVE-2026-93992

Severity:

HIGH RISK

(8.1)

Path Traversal (CWE-22) in Gopeed Archive Extractor

CVE-2026-93992

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Write

Severity:

HIGH RISK

(8.1)

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

Gopeed through version 2.0.0-beta.3 contains a path traversal vulnerability in its archive extraction process. A malicious archive may cause files to be written outside the intended extraction directory when a user downloads and extracts it with AutoExtract enabled.

Affected context

The vulnerability occurs in Gopeed's archive extraction workflow when AutoExtract is enabled. It becomes risky when an attacker can provide or influence an archive that is later processed by the application and archive entry paths are not fully constrained to the designated extraction directory.

Exploit preconditions

  • Attack surface: Archive download and automatic extraction functionality
  • Required access: Ability to provide, host, or influence an archive that a Gopeed user downloads
  • Trigger point: Extraction of archive entries while AutoExtract is enabled
  • Why exploitation is possible: Malicious entry names containing traversal patterns can bypass insufficient path validation and resolve outside the intended destination

Why this happens

The underlying bug is inadequate validation of archive member paths before file creation. If extraction logic checks path names without canonicalizing them and verifying that the resolved destination remains within the extraction directory, traversal sequences may escape the intended boundary. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal.

Potential impact

  • Attackers may write arbitrary files outside the extraction directory
  • Existing files may be overwritten or altered
  • Application configuration or user data could be modified
  • A successful file write could enable further compromise, depending on permissions and file locations
  • Integrity of downloaded content and the host environment may be affected

General mitigation guidance

Mitigation generally focuses on treating archive member names as untrusted input and enforcing a destination boundary before writing files.

Common defensive patterns include:

  • Canonicalizing and normalizing each archive entry path before use
  • Rejecting absolute paths, traversal components, and paths that resolve outside the extraction root
  • Using extraction libraries or APIs that enforce directory containment by default
  • Keeping automatic extraction disabled unless the source and archive contents are trusted
  • Extracting with a dedicated low-privilege account and restricting filesystem permissions
  • Applying filesystem isolation and limiting write access to only the required destination

How teams detect issues like this

Organizations can identify related risks through:

  • Static analysis rules for archive extraction followed by direct filesystem writes
  • Code review checks for missing canonicalization and extraction-root containment validation
  • Tests using archive entries with normalized, absolute, and traversal-containing paths
  • Runtime monitoring for writes outside approved download or extraction directories
  • Policy enforcement that requires trusted-source controls before automatic extraction is enabled
  • Automated security review tools that flag archive path handling and unrestricted file operations

Sources

SourceLink
github.comgithub.com/GopeedLab/gopeed
github.comgithub.com/GopeedLab/gopeed/blob/a5cd53f94c18ac65add684b1113fa5f0b47cc4da/pkg/download/extract.go#L284-L296
github.comgithub.com/GopeedLab/gopeed/blob/a5cd53f94c18ac65add684b1113fa5f0b47cc4da/pkg/download/extract_7z.go#L45-L53
github.comgithub.com/GopeedLab/gopeed/commit/38750d8505274e55cf11aa77f0694c71dd82f519
github.comgithub.com/GopeedLab/gopeed/issues/1525
vulncheck.comvulncheck.com/advisories/gopeed-through-2.0.0-beta.3-arbitrary-file-write-via-path-traversal

Frequently asked

questions

It may be exploitable through a malicious archive delivered over a download path, but user interaction or an automated download workflow is generally required.

An attacker typically needs to influence an archive that a Gopeed user downloads and extracts. Direct access to the host is not necessarily required.

Treat every archive entry name as untrusted, canonicalize it, and verify that its resolved path remains inside the intended extraction directory before writing.

Keep automatic extraction restricted to trusted sources, use secure-by-default archive APIs, test boundary conditions, and run extraction with minimal filesystem privileges.

Find out what's already
exploitable in your codebase.