Signal Desktop Path Traversal vulnerability in Attachment Saving
Signal Desktop used the attachment's fileName from a message without sanitisation when saving files, so a crafted name containing path traversal could write outside the chosen folder. An attacker could drop a file into the Windows Startup folder, potentially leading to code execution on the next login.
medium.com
Published on medium.com
I found a path-traversal bug in Signal Desktop’s attachment save feature. The app uses the attachment’s fileName from the message without cleaning or checking it.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The app used the untrusted attachment filename directly in path construction without normalising it or checking that the final path stayed inside the user's save folder.
Impact
An attacker could place files anywhere the process can write, potentially persisting code or dropping scripts that lead to code execution if the system picks them up.
What the attacker needed
Victim uses Signal Desktop; victim saves the attachment; attacker can send a message
The fix
The vulnerability was fixed by the Signal security team after the report.
How it was found
- The attacker sends an attachment whose fileName points to a location outside the save folder, such as the Windows Startup folder.
- The victim clicks Save in Signal Desktop.
- Signal joins the base directory and the attacker-controlled name without checking the result.
- The file is written to the outside location and may be picked up on next login.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When you save an attachment, the app picks a filename and a folder. If it trusts the filename from the sender, a name like '..\..\Startup\evil.txt' can make the app write outside the folder you chose. That could let an attacker place a file where Windows runs it automatically.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.