CVE-2026-40491
Path Traversal in gdown Extractall Enables Remote Code Execution
Publication date: 2026-04-18
Last updated on: 2026-05-01
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| wkentaro | gdown | to 5.2.2 (exc) |
Helpful Resources
Exploitability
| 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 Powered Q&A
Can you explain this vulnerability to me?
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.
How can this vulnerability impact me? :
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.
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, upgrade gdown to version 5.2.2 or later, as this version contains a fix for the path traversal issue.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
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.