<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>Most recent entries from all</title>
    <link>https://vulnerability.circl.lu</link>
    <description>Contains only the most 10 recent entries.</description>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>python-feedgen</generator>
    <language>en</language>
    <lastBuildDate>Thu, 08 Oct 2026 19:07:58 +0000</lastBuildDate>
    <item>
      <title>CVE-2025-67720 — Pyrofork has a Path Traversal in download_media Method</title>
      <link>https://vulnerability.circl.lu/vuln/cve-2025-67720</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; Mayuri-Chan pyrofork&lt;/p&gt;
&lt;p&gt;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&amp;#39;s DocumentAttributeFilename and is controlled by the message sender. This issue is fixed in version 2.3.69.&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; Mayuri-Chan pyrofork&lt;/p&gt;
&lt;p&gt;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&amp;#39;s DocumentAttributeFilename and is controlled by the message sender. This issue is fixed in version 2.3.69.&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/cve-2025-67720</guid>
    </item>
    <item>
      <title>GHSA-6h2f-wjhf-4wjx — Pyrofork has a Path Traversal in download_media Method</title>
      <link>https://vulnerability.circl.lu/vuln/ghsa-6h2f-wjhf-4wjx</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; PyPI: pyrofork&lt;/p&gt;
&lt;p&gt;## Summary&lt;/p&gt;
&lt;p&gt;The `download_media` method in Pyrofork does not sanitize filenames received from Telegram messages before using them in file path construction. This allows a remote attacker to write files to arbitrary locations on the filesystem by sending a specially crafted document with path traversal sequences (e.g., `../`) or absolute paths in the filename.&lt;/p&gt;
&lt;p&gt;---&lt;/p&gt;
&lt;p&gt;## Details&lt;/p&gt;
&lt;p&gt;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. This attribute originates from Telegram&amp;#39;s `DocumentAttributeFilename` and is controlled by the message sender.&lt;/p&gt;
&lt;p&gt;### Vulnerable Code Path&lt;/p&gt;
&lt;p&gt;**Step 1**: In `pyrogram/methods/messages/download_media.py` (lines 145-151):&lt;/p&gt;
&lt;p&gt;```python
media_file_name = getattr(media, &amp;#34;file_name&amp;#34;, &amp;#34;&amp;#34;)  # Value from Telegram message&lt;/p&gt;
&lt;p&gt;directory, file_name = os.path.split(file_name)    # Split user&amp;#39;s path parameter
file_name = file_name or media_file_name or &amp;#34;&amp;#34;     # Falls back to media_file_name if empty
```&lt;/p&gt;
&lt;p&gt;When a user calls `download_media(message)` or `download_media(message, &amp;#34;downloads/&amp;#34;)`, the `os.path.split()` returns an empty filename, causing the code to use `media_file_name` which is attacker-controlled.&lt;/p&gt;
&lt;p&gt;**Step 2**: In `pyrogram/client.py` (line 1125):&lt;/p&gt;
&lt;p&gt;```python
temp_file_path = os.path.abspath(re.sub(&amp;#34;\\\\&amp;#34;, &amp;#34;/&amp;#34;, os.path.join(directory, file_name))) + &amp;#34;.temp&amp;#34;
```&lt;/p&gt;
&lt;p&gt;The `os.path.join()` function does not prevent path traversal. When `…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; PyPI: pyrofork&lt;/p&gt;
&lt;p&gt;## Summary&lt;/p&gt;
&lt;p&gt;The `download_media` method in Pyrofork does not sanitize filenames received from Telegram messages before using them in file path construction. This allows a remote attacker to write files to arbitrary locations on the filesystem by sending a specially crafted document with path traversal sequences (e.g., `../`) or absolute paths in the filename.&lt;/p&gt;
&lt;p&gt;---&lt;/p&gt;
&lt;p&gt;## Details&lt;/p&gt;
&lt;p&gt;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. This attribute originates from Telegram&amp;#39;s `DocumentAttributeFilename` and is controlled by the message sender.&lt;/p&gt;
&lt;p&gt;### Vulnerable Code Path&lt;/p&gt;
&lt;p&gt;**Step 1**: In `pyrogram/methods/messages/download_media.py` (lines 145-151):&lt;/p&gt;
&lt;p&gt;```python
media_file_name = getattr(media, &amp;#34;file_name&amp;#34;, &amp;#34;&amp;#34;)  # Value from Telegram message&lt;/p&gt;
&lt;p&gt;directory, file_name = os.path.split(file_name)    # Split user&amp;#39;s path parameter
file_name = file_name or media_file_name or &amp;#34;&amp;#34;     # Falls back to media_file_name if empty
```&lt;/p&gt;
&lt;p&gt;When a user calls `download_media(message)` or `download_media(message, &amp;#34;downloads/&amp;#34;)`, the `os.path.split()` returns an empty filename, causing the code to use `media_file_name` which is attacker-controlled.&lt;/p&gt;
&lt;p&gt;**Step 2**: In `pyrogram/client.py` (line 1125):&lt;/p&gt;
&lt;p&gt;```python
temp_file_path = os.path.abspath(re.sub(&amp;#34;\\\\&amp;#34;, &amp;#34;/&amp;#34;, os.path.join(directory, file_name))) + &amp;#34;.temp&amp;#34;
```&lt;/p&gt;
&lt;p&gt;The `os.path.join()` function does not prevent path traversal. When `…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/ghsa-6h2f-wjhf-4wjx</guid>
    </item>
  </channel>
</rss>
