Skip to main content

Gdown CVE-2026-40491

| EUVDEUVD-2026-23642 HIGH
Path Traversal (CWE-22)
2026-04-18 GitHub_M GHSA-76hw-p97h-883f
7.8
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Craft archive with traversal filenames
  2. Delivery
    Deliver via social engineering or malicious link
  3. Exploit
    User downloads with gdown
  4. Install
    User or automation calls extractall
  5. C2
    Path validation bypassed
  6. Execute
    Arbitrary file written
  7. Impact
    Executable overwritten or runtime directory compromised
  8. Step 8
    Code execution achieved

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

A user or application must actively call gdown's extractall method on a malicious ZIP or TAR archive. The archive must contain at least one filename with directory traversal sequences (e.g., ../, absolute paths starting with /) or similar path escape patterns. The vulnerability is NOT exploitable if: (1) archive extraction is disabled or bypassed; (2) the user/application runs with minimal filesystem permissions that prevent writing outside the intended directory; (3) the extraction output is validated or canonicalized before use by downstream code. Exploitation succeeds when the library is used in default mode without custom filename validation and writes to a user-writable location (common in download workflows). The user interaction requirement (UI:R from CVSS) means automated, unattended extraction of untrusted archives is a particular risk vector.

Impact

CVSS 6.5 (Medium) with network attack vector and no authentication requirement suggests moderate baseline risk, but real-world impact is elevated by several factors. The CVSS vector (AV:N/AC:L/PR:N/UI:R) correctly identifies that remote, unauthenticated attackers can trigger the flaw via a malicious archive, but the mandatory user interaction (UI:R) is the primary limiting factor-the user must actively extract the archive. However, the impact scope is significant: integrity impact is high (I:H), meaning arbitrary file overwrite is possible, and the description explicitly links this to RCE potential if an attacker overwrites executable or script files in the application's runtime environment or system paths. No KEV or EPSS data provided, but the GitHub security advisory and public patched version (5.2.2) indicate the vendor has formally acknowledged this as a legitimate security issue warranting a fix. The attack complexity is low (AC:L), meaning exploitation does not require special network conditions or race conditions. Real-world risk depends on deployment context: automated archive extraction workflows present higher risk than manual user-triggered extraction. The lack of active exploitation data (no KEV confirmation) suggests this is not yet widely weaponized, but the public patch and clear technical exploitability mean defensive action is justified.

Exploit ScenarioDerived

An attacker crafts a malicious ZIP archive with a file entry named '../../var/www/html/shell.php' or similar path traversal sequence. The attacker tricks or socially engineers a user into downloading this archive via gdown and extracting it using gdown's extractall functionality. The path traversal causes the shell.php file to be written to the web server directory, enabling remote code execution when the attacker accesses the URL. Alternatively, if gdown is used in an automated CI/CD pipeline, the attacker can inject a malicious archive as a downloadable artifact, triggering extraction without user interaction at that stage.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 18, 2026

gdown prior to version 5.2.2 allows remote attackers to write arbitrary files outside the intended extraction directory via maliciously crafted ZIP or TAR archives due to insufficient path traversal validation in the extractall functionality. An attacker can craft a malicious archive with path traversal sequences (e.g., ../ entries) in filenames, which when extracted by a user, permits file overwrite and potential remote code execution. The vulnerability requires user interaction (UI:R) to trigger extraction but affects all unauthenticated remote users downloading via the gdown library.

RemediationAI

Vendor-released patch: gdown version 5.2.2 or later. Users should upgrade immediately by running 'pip install --upgrade gdown>=5.2.2' or equivalent for their package manager. The upstream fix (commit af569fc6ed300b7974dee66dc51e9f01b57b4dff) implements path validation in the extractall method to reject archive entries containing directory traversal sequences (../, absolute paths, etc.). For organizations unable to upgrade immediately, compensating controls include: (1) Restrict gdown usage to sandboxed environments or isolated user accounts with minimal filesystem permissions, limiting the impact radius of arbitrary file writes; (2) Disable automatic archive extraction in downstream tools-require manual review and explicit extraction commands; (3) Validate extracted file paths programmatically before processing by implementing extraction wrapper functions that reject any archive member paths containing '..' or absolute path prefixes. Note that sandboxing introduces performance overhead and wrapper functions require code changes; the patch is the preferred remediation. See https://github.com/wkentaro/gdown/security/advisories/GHSA-76hw-p97h-883f for vendor details.

Affected VersionsENISA

gdown < 5.2.2

Affected Packages

pypi gdown fix: 5.2.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

gdown is a Python library for downloading files from Google Drive without authentication. The vulnerability exists in the archive extraction logic (extractall method) used to handle ZIP and TAR file formats. The library fails to canonicalize or validate archive member filenames against directory traversal patterns before writing them to disk. CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) is the root cause class - a classic path traversal flaw where user-controlled filename input is not validated. When an archive contains entries with relative paths (e.g., ../../sensitive_file or /etc/passwd), the extraction proceeds without sanitization, allowing writes to arbitrary filesystem locations. This is exacerbated when the library is used in automated workflows or by applications that automatically extract downloaded archives.

Know when Gdown gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Primary rating from NVD · only source for this CVE.

CVSS VectorNVD

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

4
Severity Changed
Oct 26, 2026 - 21:23 NVD
MEDIUM HIGH
CVSS changed
Oct 26, 2026 - 21:23 NVD
6.5 (MEDIUM) 7.8 (HIGH)
Patch released
Apr 18, 2026 - 08:30 nvd
Patch available
CVE Published
Apr 18, 2026 - 01:36 nvd
MEDIUM 6.5

DescriptionNVD

gdown is a Google Drive public file/folder downloader. Versions prior to 5.2.2 are vulnerable to a Path Traversal attack within the 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). Version 5.2.2 contains a fix.

Threat Intelligence Overview

EPSS Score
0.0%
Top 86% exploitable
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

39
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +39
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy