# CVE-2026-40491: gdown Affected by Arbitrary File Write via Path Traversal in gdown.extractall

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.58%, higher than 49% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-04-14T01:11:30.000Z
- Modified: 2026-10-26T21:10:00.170Z
- Also known as: GHSA-76hw-p97h-883f, PYSEC-2026-2158
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- wkentaro gdown: < 5.2.2; before 5.2.2
- gdown (PyPI): before 5.2.2

## Every score

- GitHub_M: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N`
- GitHub: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`

## References

- <https://github.com/wkentaro/gdown/security/advisories/GHSA-76hw-p97h-883f> (exploit, evidence, vendor-advisory, web)
- <https://github.com/wkentaro/gdown/commit/af569fc6ed300b7974dee66dc51e9f01b57b4dff> (fix, patch, web)
- <https://github.com/wkentaro/gdown/releases/tag/v5.2.2> (advisory, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-40491> (advisory)
- <https://github.com/wkentaro/gdown> (package)

## Sources

- CVE List: [CVE-2026-40491](https://www.cve.org/CVERecord?id=CVE-2026-40491), CVE Terms of Use, modified 2026-04-20
- GitHub Advisory Database: [GHSA-76hw-p97h-883f](https://github.com/advisories/GHSA-76hw-p97h-883f), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-40491](https://nvd.nist.gov/vuln/detail/CVE-2026-40491), Public domain, modified 2026-10-26
- PyPA Advisory Database: [PYSEC-2026-2158](https://osv.dev/vulnerability/PYSEC-2026-2158), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-40491 · Whole record: https://cve.day/CVE-2026-40491.json · Rebuilt by cve.day 2026-11-25T22:59:18.992Z
