CVE-2026-62858: YOURLS: Unauthenticated File Inclusion

Published Oct 14, 2026
·
Updated

Summary

YOURLS versions ≤1.10.4 contain an unauthenticated path traversal vulnerability that allows attackers to include and execute arbitrary PHP files on the server without any credentials.

Details

The vulnerability exists because YOURLS uses URL sanitization functions (yourlssanitizeurl(), yourlsescurl()) to filter request paths, but these functions are designed to clean URLs, not filesystem paths. They preserve / and . characters, allowing ../ sequences to pass through unfiltered.

The unsanitized keyword is then directly concatenated into a filesystem path and passed to fileexists() and later include() operations, enabling path traversal attacks.

Data Flow: HTTP Request URI (with ../) ↓ yourlsgetrequest() (no sanitization) ↓ yourlssanitizeurl() (preserves / and .) ↓ yourlsescurl() (permits / and . via regex) ↓ Keyword extraction (preserves ../) ↓ fileexists(YOURLSPAGEDIR . "/$keyword.php") ← Sink ↓ include(YOURLSPAGEDIR . "/$keyword.php") ← Code Execution

Proof of Concept (POC)

In the concept validation, we assume that the attacker has uploaded a test.php file to the web root directory, but it cannot be accessed directly. (Of course, it could also be any path, such as /tmp/test.php)

Setup Place a test file in web root:

./test.php: php <?php phpinfo(); ?> <img width="502" height="126" alt="image" src="https://github.com/user-attachments/assets/14f33f90-625b-4c65-8abf-244af2385f68" />

Attack Request http GET /../../test HTTP/1.1 Host: target.com Connection: close

Response (Apache Environment)

<img width="1704" height="614" alt="image" src="https://github.com/user-attachments/assets/8750a3c0-a96c-4896-a087-d7b5cfeccd30" />

Impact 1. Remote execution of uploaded PHP files – An attacker uploads a malicious PHP file to an arbitrary location on the server (e.g., via another vulnerability or file upload feature), obtains its absolute path but cannot access it directly. The attacker then leverages this vulnerability to include and execute the PHP file, gaining code execution privileges.

2. Indirect triggering of PHP code injection – If a PHP code injection point exists on the system (e.g., log injection, session injection) but the injected file cannot be accessed directly due to configuration restrictions, the attacker can use this vulnerability to include and execute the injected code, achieving remote command execution or further compromise.

Other sources

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.

— MITRE

Affected Software

3 affected componentsFixes available
Yourls Yourls<1.10.5
composer/yourls/yourls<=1.10.4
1.10.5
composer/yourls/yourls<=1.10.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/yourls/yourls to a version that resolves this vulnerability.

    Fixed in 1.10.5
  2. Upgrade

    Upgrade YOURLS to a version that resolves this vulnerability.

    Fixed in 1.10.5

Event History

Oct 14, 2026
CVE Published
via MITRE·03:42 PM
Data Sourced
via MITRE·03:42 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:17 PM
DescriptionSeverityWeakness
Oct 15, 2026
Advisory Published
via GitHub·08:13 PM
Data Sourced
via GitHub·08:13 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via Packagist·08:13 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

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.

2

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.

3

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.

4

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203