All vulnerabilities
CVE-2026-62858GHSA-f8ff-652m-j5rx

yourls/yourls: YOURLS: Unauthenticated File Inclusion

YOURLS yourls/yourlscomposerLibraries & packages
CVSS
5.3Medium
ExploitationPublic exploit codeCISA's assessment says proof of concept code is public, assessed 14 Oct 2026. Not in the KEV catalogCISA via CVE List
Exploit odds (EPSS)0.47%Chance of exploitation activity in the next 30 days, higher than 39% of CVEs. Scored 23 Oct 2026FIRST EPSS
Fixed in1.10.5Fixed versionGitHub
Published14 Oct 2026Updated 15 Oct 2026CVE List

What fixes it

  • 1.10.5yourls/yourls, composerGitHubcomposer require "yourls/yourls:^1.10.5"
  • 1.10.5yourls/yourls, PackagistOSVcomposer require "yourls/yourls:^1.10.5"

A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.

Description

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 (yourls_sanitize_url(), yourls_esc_url()) 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 file_exists() and later include() operations, enabling path traversal attacks.

Data Flow:

HTTP Request URI (with ../)
    ↓
yourls_get_request() (no sanitization)
    ↓
yourls_sanitize_url() (preserves / and .)
    ↓
yourls_esc_url() (permits / and . via regex)
    ↓
Keyword extraction (preserves ../)
    ↓
file_exists(YOURLS_PAGEDIR . "/$keyword.php")  ← Sink
    ↓
include(YOURLS_PAGEDIR . "/$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
phpinfo();
?>

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

Attack Request

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.
  1. 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.

Text from GitHub Advisory Database

Affected versions 21

  • yourls/yourls, composer<= 1.10.4GitHub
  • YOURLSaffected: < 1.10.5CVE List
  • yourls/yourls, Packagistfrom first release, fixed in 1.10.5OSV
  • yourls/yourls, Packagist1.10.0OSV
  • yourls/yourls, Packagist1.10.1OSV
  • yourls/yourls, Packagist1.10.2OSV
  • yourls/yourls, Packagist1.10.3OSV
  • yourls/yourls, Packagist1.10.4OSV
  • yourls/yourls, Packagist1.7.1OSV
  • yourls/yourls, Packagist1.7.2OSV
  • yourls/yourls, Packagist1.7.3OSV
  • yourls/yourls, Packagist1.7.4OSV
  • yourls/yourls, Packagist1.7.5OSV
  • yourls/yourls, Packagist1.7.6OSV
  • yourls/yourls, Packagist1.7.9OSV
  • yourls/yourls, Packagist1.8OSV
  • yourls/yourls, Packagist1.8.1OSV
  • yourls/yourls, Packagist1.8.2OSV
  • yourls/yourls, Packagist1.9OSV
  • yourls/yourls, Packagist1.9.1OSV
  • yourls/yourls, Packagist1.9.2OSV

References 6