{"id":"CVE-2026-62858","aliases":["EUVD-2026-101285","GHSA-f8ff-652m-j5rx"],"status":"published","title":"YOURLS: Unauthenticated File Inclusion","description":"YOURLS is a self-hosted, customizable URL shortener written in PHP. Prior to 1.10.5, yourls_get_request() extracted the request path without sanitization, after which yourls_sanitize_url() and yourls_esc_url() preserved dot and slash traversal sequences before an attacker-controlled keyword reached file_exists() and include() under YOURLS_PAGEDIR. 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.","severity":{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00468,"percentile":0.40806,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-98"],"published":"2026-10-14T15:42:51Z","modified":"2026-10-28T02:30:47Z","fixes":[{"ecosystem":"Packagist","package":"yourls/yourls","fixed_in":["1.10.5"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Packagist","package":"yourls/yourls","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"1.10.4"},{"fixed":"1.10.5"}]}]},{"source":"osv","ecosystem":"Packagist","package":"yourls/yourls","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.10.5"}]}],"versions":["1.10.0","1.10.1","1.10.2","1.10.3","1.10.4","1.7.1","1.7.2","1.7.3","1.7.4","1.7.5","1.7.6","1.7.9","1.8","1.8.1","1.8.2","1.9","1.9.1","1.9.2"]}],"products":[{"vendor":"yourls","product":"yourls"}],"references":[{"url":"https://github.com/YOURLS/YOURLS/security/advisories/GHSA-f8ff-652m-j5rx","tags":["x_refsource_CONFIRM","exploit","advisory","web"]},{"url":"https://github.com/YOURLS/YOURLS/pull/4142","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/YOURLS/YOURLS/commit/4e85972160a96e03a419a442d5bd8f21f2f02ddb","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/YOURLS/YOURLS/releases/tag/1.10.5","tags":["x_refsource_MISC","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-62858","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-f8ff-652m-j5rx"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/62xxx/CVE-2026-62858.json","tags":["advisory"]},{"url":"https://github.com/YOURLS/YOURLS","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-62858","title":"YOURLS: Unauthenticated File Inclusion","description":"YOURLS is a self-hosted, customizable URL shortener written in PHP. Prior to 1.10.5, yourls_get_request() extracted the request path without sanitization, after which yourls_sanitize_url() and yourls_esc_url() preserved dot and slash traversal sequences before an attacker-controlled keyword reached file_exists() and include() under YOURLS_PAGEDIR. 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.","status":"published","published":"2026-10-14T15:42:51.362Z","modified":"2026-10-14T17:47:22.055Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium","assessor":"cna"}],"cwes":["CWE-98"],"updated_at":"2026-11-02T14:20:14.665567Z"}],"euvd":[{"id":"EUVD-2026-101285","description":"YOURLS is a self-hosted, customizable URL shortener written in PHP. Prior to 1.10.5, yourls_get_request() extracted the request path without sanitization, after which yourls_sanitize_url() and yourls_esc_url() preserved dot and slash traversal sequences before an attacker-controlled keyword reached file_exists() and include() under YOURLS_PAGEDIR. 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.","status":"published","published":"2026-10-14T15:42:51Z","modified":"2026-10-14T17:47:22Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium"}],"updated_at":"2026-11-02T17:27:13.785562Z"}],"ghsa":[{"id":"GHSA-f8ff-652m-j5rx","title":"YOURLS: Unauthenticated File Inclusion","description":"## Summary\n\nYOURLS 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.\n\n## Details\n\nThe 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.\n\nThe unsanitized keyword is then directly concatenated into a filesystem path and passed to `file_exists()` and later `include()` operations, enabling path traversal attacks.\n\n**Data Flow:**\n```\nHTTP Request URI (with ../)\n    ↓\nyourls_get_request() (no sanitization)\n    ↓\nyourls_sanitize_url() (preserves / and .)\n    ↓\nyourls_esc_url() (permits / and . via regex)\n    ↓\nKeyword extraction (preserves ../)\n    ↓\nfile_exists(YOURLS_PAGEDIR . \"/$keyword.php\")  ← Sink\n    ↓\ninclude(YOURLS_PAGEDIR . \"/$keyword.php\")      ← Code Execution\n```\n\n## Proof of Concept (POC)\n\nIn 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`)\n\n### Setup\nPlace a test file in web root:\n\n`./test.php`:\n```php\n\u003c?php\nphpinfo();\n?\u003e\n```\n\u003cimg width=\"502\" height=\"126\" alt=\"image\" src=\"https://github.com/user-attachments/assets/14f33f90-625b-4c65-8abf-244af2385f68\" /\u003e\n\n\n### Attack Request\n```http\nGET /../../test HTTP/1.1\nHost: target.com\nConnection: close\n```\n\n### Response (Apache Environment)\n\n\u003cimg width=\"1704\" height=\"614\" alt=\"image\" src=\"https://github.com/user-attachments/assets/8750a3c0-a96c-4896-a087-d7b5cfeccd30\" /\u003e\n\n\n## Impact\n1. 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.\n\n2. 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.","status":"published","published":"2026-10-15T20:13:02Z","modified":"2026-10-15T20:13:04Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium"}],"cwes":["CWE-98"],"updated_at":"2026-11-02T14:41:32.483482Z"}],"nvd":[{"id":"CVE-2026-62858","description":"YOURLS is a self-hosted, customizable URL shortener written in PHP. Prior to 1.10.5, yourls_get_request() extracted the request path without sanitization, after which yourls_sanitize_url() and yourls_esc_url() preserved dot and slash traversal sequences before an attacker-controlled keyword reached file_exists() and include() under YOURLS_PAGEDIR. 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.","status":"published","published":"2026-10-14T16:17:47.617Z","modified":"2026-10-16T20:04:29.76Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium","assessor":"secondary"}],"cwes":["CWE-98"],"updated_at":"2026-11-02T14:12:58.99337Z"}],"osv":[{"id":"CVE-2026-62858","title":"YOURLS: Unauthenticated File Inclusion","description":"YOURLS is a self-hosted, customizable URL shortener written in PHP. Prior to 1.10.5, yourls_get_request() extracted the request path without sanitization, after which yourls_sanitize_url() and yourls_esc_url() preserved dot and slash traversal sequences before an attacker-controlled keyword reached file_exists() and include() under YOURLS_PAGEDIR. 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.","status":"published","published":"2026-10-14T15:42:51.362Z","modified":"2026-10-28T02:30:47.582283089Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium"}],"cwes":["CWE-98"],"updated_at":"2026-11-02T15:45:13.306117Z"},{"id":"GHSA-f8ff-652m-j5rx","title":"YOURLS: Unauthenticated File Inclusion","description":"## Summary\n\nYOURLS 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.\n\n## Details\n\nThe 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.\n\nThe unsanitized keyword is then directly concatenated into a filesystem path and passed to `file_exists()` and later `include()` operations, enabling path traversal attacks.\n\n**Data Flow:**\n```\nHTTP Request URI (with ../)\n    ↓\nyourls_get_request() (no sanitization)\n    ↓\nyourls_sanitize_url() (preserves / and .)\n    ↓\nyourls_esc_url() (permits / and . via regex)\n    ↓\nKeyword extraction (preserves ../)\n    ↓\nfile_exists(YOURLS_PAGEDIR . \"/$keyword.php\")  ← Sink\n    ↓\ninclude(YOURLS_PAGEDIR . \"/$keyword.php\")      ← Code Execution\n```\n\n## Proof of Concept (POC)\n\nIn 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`)\n\n### Setup\nPlace a test file in web root:\n\n`./test.php`:\n```php\n\u003c?php\nphpinfo();\n?\u003e\n```\n\u003cimg width=\"502\" height=\"126\" alt=\"image\" src=\"https://github.com/user-attachments/assets/14f33f90-625b-4c65-8abf-244af2385f68\" /\u003e\n\n\n### Attack Request\n```http\nGET /../../test HTTP/1.1\nHost: target.com\nConnection: close\n```\n\n### Response (Apache Environment)\n\n\u003cimg width=\"1704\" height=\"614\" alt=\"image\" src=\"https://github.com/user-attachments/assets/8750a3c0-a96c-4896-a087-d7b5cfeccd30\" /\u003e\n\n\n## Impact\n1. 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.\n\n2. 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.","status":"published","published":"2026-10-15T20:13:02Z","modified":"2026-10-15T20:30:06.075275041Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium"}],"cwes":["CWE-98"],"updated_at":"2026-11-02T15:46:46.006631Z"}]}}
