Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. gdown
  4. ›
  5. CVE-2026-40491

CVE-2026-40491: gdown Affected by Arbitrary File Write via Path Traversal in gdown.extractall

April 14, 2026 (updated April 24, 2026)

The gdown library (tested on v5.2.1) is vulnerable to a Path Traversal attack within its extractall functionality. When extracting a maliciously crafted ZIP or TAR archive, the library fails to sanitize or validate the filenames of the archive members. This allow files to be written outside the intended destination directory, potentially leading to arbitrary file overwrite and Remote Code Execution (RCE).

References

  • github.com/advisories/GHSA-76hw-p97h-883f
  • github.com/wkentaro/gdown
  • github.com/wkentaro/gdown/commit/af569fc6ed300b7974dee66dc51e9f01b57b4dff
  • github.com/wkentaro/gdown/releases/tag/v5.2.2
  • github.com/wkentaro/gdown/security/advisories/GHSA-76hw-p97h-883f
  • nvd.nist.gov/vuln/detail/CVE-2026-40491

Code Behaviors & Features

Detect and mitigate CVE-2026-40491 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 5.2.2

Fixed versions

  • 5.2.2

Solution

Upgrade to version 5.2.2 or above.

Impact 6.5 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

pypi/gdown/CVE-2026-40491.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 12:20:24 +0000.