CVE-2026-40491
Received Received - Intake
Path Traversal in gdown Extractall Enables Remote Code Execution

Publication date: 2026-04-18

Last updated on: 2026-05-01

Assigner: GitHub, Inc.

Description
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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-04-18
Last Modified
2026-05-01
Generated
2026-06-16
AI Q&A
2026-04-18
EPSS Evaluated
2026-06-15
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
wkentaro gdown to 5.2.2 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-22 The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

The vulnerability exists in gdown, a Google Drive public file/folder downloader, in versions prior to 5.2.2. It is a Path Traversal attack within the extractall functionality. When extracting a maliciously crafted ZIP or TAR archive, the library does not properly sanitize or validate the filenames of the archive members.

This flaw allows files to be written outside the intended destination directory, which can lead to arbitrary file overwrite and potentially Remote Code Execution (RCE).

The issue was fixed in version 5.2.2.

Impact Analysis

This vulnerability can impact you by allowing an attacker to overwrite arbitrary files on your system when you use the vulnerable gdown versions to extract malicious archives.

Such arbitrary file overwrite can lead to Remote Code Execution (RCE), meaning an attacker could execute malicious code on your system remotely.

Mitigation Strategies

To mitigate this vulnerability, upgrade gdown to version 5.2.2 or later, as this version contains a fix for the path traversal issue.

Compliance Impact

The vulnerability in gdown allows arbitrary file overwrite and potential Remote Code Execution due to improper sanitization of archive filenames during extraction. This could lead to unauthorized modification of files on a system.

Such unauthorized file modifications and potential execution of arbitrary code may impact compliance with standards like GDPR and HIPAA, which require protection of data integrity and security controls to prevent unauthorized access or alteration.

However, the provided information does not explicitly describe the direct impact on compliance with these regulations.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-40491. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart