CVE-2026-62858: YOURLS: Unauthenticated File Inclusion
YOURLS is a self-hosted, customizable URL shortener written in PHP. Prior to 1.10.5, yourlsgetrequest() extracted the request path without sanitization, after which yourlssanitizeurl() and yourlsescurl() preserved dot and slash traversal sequences before an attacker-controlled keyword reached fileexists() and include() under YOURLSPAGEDIR. An unauthenticated remote attacker could traverse outside the intended pages directory and include a local PHP file that was already present on the server, such as an uploaded or injected file, causing the file to execute in the YOURLS web process. This issue is fixed in version 1.10.5.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
YOURLSto a version that resolves this vulnerability.Fixed in 1.10.5
Event History
Frequently Asked Questions
Who is exposed to exploitation?
Instances of YOURLS prior to 1.10.5 are exposed because the vulnerable request handling can be reached by an unauthenticated remote attacker. Exploitation occurs through the YOURLS web process.
What does an attacker need to exploit this issue?
The attacker needs a way to supply a crafted request path containing traversal sequences. To achieve code execution, a suitable PHP file must already be present outside the intended pages directory, such as a file that was previously uploaded or injected onto the server.
What should be done if patching cannot happen immediately?
Limit exposure of the YOURLS instance to untrusted remote users and investigate or remove unauthorized uploaded or injected PHP files where possible. The underlying issue is fixed in YOURLS 1.10.5.
How can I assess whether a server may already be affected?
Review the YOURLS version and treat versions earlier than 1.10.5 as vulnerable. Also inspect the server for unexpected PHP files that could have been available for inclusion and review web request logs for suspicious path traversal sequences.