CVE-2025-27142 LocalSend path traversal vulnerability in the file upload endpoint allows nearby devices to execute arbitrary commands
Nearby attackers can exploit path traversal in LocalSend to write arbitrary files, potentially achieving remote code execution via startup folders or shell scripts.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2025-27142?
CVE-2025-27142 is a medium-severity path traversal vulnerability in localsend, published on 25 Feb 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
LocalSend is a free, open-source app that allows users to securely share files and messages with nearby devices over their local network without needing an internet connection. Prior to version 1.17.0, due to the missing sanitization of the path in the `POST /api/localsend/v2/prepare-upload` and the `POST /api/localsend/v2/upload` endpoint, a malicious file transfer request can write files to the arbitrary location on the system, resulting in the remote command execution. A malicious file transfer request sent by nearby devices can write files into an arbitrary directory. This usually allows command execution via the startup folder on Windows or Bash-related files on Linux. If the user enables the `Quick Save` feature, it will silently write files without explicit user interaction. Version 1.17.0 fixes this issue.
Weakness: CWE-22
Which versions are affected by CVE-2025-27142?
It affects 1 product.
Products include Localsend Localsend.
How do I fix CVE-2025-27142?
No fix has been published for CVE-2025-27142 yet. Limit exposure of the affected software until one is available.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2025-27142 being exploited?
There is no known exploitation of CVE-2025-27142 in the wild and no public exploit code.
Other vulnerabilities in localsend
Sources
Also known as GHSA-f7jp-p6j4-3522.