CVE-2026-40491: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in wkentaro gdown
A path traversal vulnerability exists in wkentaro gdown versions prior to 5. 2. 2 within the extractall functionality. This flaw allows maliciously crafted ZIP or TAR archives to write files outside the intended extraction directory, potentially enabling arbitrary file overwrite and remote code execution. The issue is fixed in version 5. 2. 2.
AI Analysis
Technical Summary
The gdown tool, used for downloading public files 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 in ZIP or TAR archives, allowing an attacker to craft archives that write files outside the target directory. This can lead to arbitrary file overwrite and potentially remote code execution. The vulnerability has a CVSS 3.1 score of 6.5 (medium severity). Version 5.2.2 of gdown contains a fix addressing this issue.
Potential Impact
Exploitation of this vulnerability can result in arbitrary file overwrite outside the intended extraction directory, which may lead to remote code execution if an attacker places malicious executable files. This compromises the integrity of the system where gdown is used. There are no known exploits in the wild at this time.
Mitigation Recommendations
Upgrade gdown to version 5.2.2 or later, where the path traversal vulnerability in the extractall functionality has been fixed. Patch status is confirmed by the version update. No additional vendor advisory is provided, so check the official gdown repository or release notes for the latest remediation details.
CVE-2026-40491: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in wkentaro gdown
Description
A path traversal vulnerability exists in wkentaro gdown versions prior to 5. 2. 2 within the extractall functionality. This flaw allows maliciously crafted ZIP or TAR archives to write files outside the intended extraction directory, potentially enabling arbitrary file overwrite and remote code execution. The issue is fixed in version 5. 2. 2.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The gdown tool, used for downloading public files 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 in ZIP or TAR archives, allowing an attacker to craft archives that write files outside the target directory. This can lead to arbitrary file overwrite and potentially remote code execution. The vulnerability has a CVSS 3.1 score of 6.5 (medium severity). Version 5.2.2 of gdown contains a fix addressing this issue.
Potential Impact
Exploitation of this vulnerability can result in arbitrary file overwrite outside the intended extraction directory, which may lead to remote code execution if an attacker places malicious executable files. This compromises the integrity of the system where gdown is used. There are no known exploits in the wild at this time.
Mitigation Recommendations
Upgrade gdown to version 5.2.2 or later, where the path traversal vulnerability in the extractall functionality has been fixed. Patch status is confirmed by the version update. No additional vendor advisory is provided, so check the official gdown repository or release notes for the latest remediation details.
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/18/2026, 2:53:24 AM
Last updated: 4/18/2026, 4:55:34 AM
Views: 8
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.