CVE-2025-67720 Pyrofork has a Path Traversal in download_media Method
Attackers can exploit unsanitized filenames in Pyrofork's download_media method to write or read arbitrary files on the host system.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2025-67720?
CVE-2025-67720 is a medium-severity path traversal vulnerability in Mayuri-Chan pyrofork, published on 11 Dec 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
Pyrofork is a modern, asynchronous MTProto API framework. Versions 2.3.68 and earlier do not properly sanitize filenames received from Telegram messages in the download_media method before using them in file path construction. When downloading media, if the user does not specify a custom filename (which is the common/default usage), the method falls back to using the file_name attribute from the media object. The attribute originates from Telegram's DocumentAttributeFilename and is controlled by the message sender. This issue is fixed in version 2.3.69.
Weakness: CWE-22
Which versions are affected by CVE-2025-67720?
3 open source packages ship an affected version, including pyrofork.
| Package | Affected | Fixed in |
|---|---|---|
pyrofork PyPI | All versions | 2.3.69 |
pyrofork PyPI | All versions | 2.3.69 |
pyrofork PyPI | All versions | 2.3.69 |
How do I fix CVE-2025-67720?
Upgrade pyrofork to 2.3.69 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2025-67720 being exploited?
There is no known exploitation of CVE-2025-67720 in the wild and no public exploit code.
Sources
Also known as GHSA-6h2f-wjhf-4wjx, PYSEC-2026-1841.