CVE-2026-40491: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in wkentaro gdown
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.
AI Analysis
Technical Summary
The wkentaro gdown tool, used for downloading public files and folders from Google Drive, suffers from a CWE-22 path traversal vulnerability in versions before 5.2.2. The vulnerability arises because the extractall function does not properly sanitize or validate filenames inside ZIP or TAR archives, allowing crafted archives to write files outside the target directory. This can lead to arbitrary file overwrite and potentially remote code execution. The vulnerability is addressed in gdown version 5.2.2.
Potential Impact
Successful exploitation can result in arbitrary file overwrite on the victim system and potentially remote code execution. This could allow an attacker to modify or replace critical files, leading to compromise of the affected system. There are no known exploits in the wild at this time.
Mitigation Recommendations
Upgrade to gdown version 5.2.2 or later, which contains a fix for this path traversal vulnerability. No other mitigation steps are indicated by the vendor advisory. Patch status is confirmed by the version update.
CVE-2026-40491: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in wkentaro gdown
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 v3.1
Score 6.5medium
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The wkentaro gdown tool, used for downloading public files and folders from Google Drive, suffers from a CWE-22 path traversal vulnerability in versions before 5.2.2. The vulnerability arises because the extractall function does not properly sanitize or validate filenames inside ZIP or TAR archives, allowing crafted archives to write files outside the target directory. This can lead to arbitrary file overwrite and potentially remote code execution. The vulnerability is addressed in gdown version 5.2.2.
Potential Impact
Successful exploitation can result in arbitrary file overwrite on the victim system and potentially remote code execution. This could allow an attacker to modify or replace critical files, leading to compromise of the affected system. There are no known exploits in the wild at this time.
Mitigation Recommendations
Upgrade to gdown version 5.2.2 or later, which contains a fix for this path traversal vulnerability. No other mitigation steps are indicated by the vendor advisory. Patch status is confirmed by the version update.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-13T19:50:42.114Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69e2ee8ebdfbbecc59cda5d2
Added to database: 4/18/2026, 2:38:06 AM
Last enriched: 4/25/2026, 2:54:23 AM
Last updated: 6/1/2026, 5:15:37 PM
Views: 107
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.