CVE-2022-0088

7.4 HIGH

📋 TL;DR

CVE-2022-0088 is a Cross-Site Request Forgery (CSRF) vulnerability in YOURLS URL shortener software versions prior to 1.8.3. This allows attackers to trick authenticated administrators into performing unintended actions by visiting malicious web pages. All YOURLS installations with admin access are affected.

💻 Affected Systems

Products:
  • YOURLS (Your Own URL Shortener)
Versions: All versions prior to 1.8.3
Operating Systems: All operating systems running YOURLS
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects installations with admin access enabled. The vulnerability is in the admin interface CSRF protection.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete takeover of the YOURLS instance through admin account compromise, allowing attackers to modify all URLs, change settings, or delete the installation.

🟠

Likely Case

Unauthorized URL creation, modification, or deletion by tricking an admin into clicking a malicious link while logged into YOURLS.

🟢

If Mitigated

No impact if proper CSRF tokens are implemented and validated for all state-changing actions.

🌐 Internet-Facing: HIGH - YOURLS is typically deployed as an internet-facing URL shortener service, making it accessible to attackers.
🏢 Internal Only: MEDIUM - Even internal deployments are vulnerable if admins can be tricked into visiting malicious pages.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires the victim to be logged into YOURLS admin interface and visit a malicious page. Public proof-of-concept code is available.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.8.3

Vendor Advisory: https://github.com/yourls/yourls/commit/1de256d8694b0ec7d4df2ac1d5976d4055e09d59

Restart Required: No

Instructions:

1. Backup your YOURLS installation and database. 2. Download YOURLS 1.8.3 or later from GitHub. 3. Replace all files except user/config.php and user/plugins/. 4. Verify the installation works correctly.

🔧 Temporary Workarounds

Add CSRF Protection Headers

all

Implement custom CSRF token validation for all admin actions

Modify YOURLS admin PHP files to include CSRF token checks on all POST requests

Restrict Admin Access

all

Limit admin interface access to specific IP addresses or networks

Add IP restrictions in .htaccess or web server configuration for admin directory

🧯 If You Can't Patch

  • Implement strict SameSite cookie policies for admin sessions
  • Require re-authentication for all sensitive admin actions

🔍 How to Verify

Check if Vulnerable:

Check YOURLS version in admin interface or examine includes/version.php file for version number less than 1.8.3

Check Version:

grep "define( 'YOURLS_VERSION'," includes/version.php

Verify Fix Applied:

Verify version is 1.8.3 or higher and test that admin actions require valid CSRF tokens

📡 Detection & Monitoring

Log Indicators:

  • Multiple failed admin actions from same IP
  • Admin actions without proper referrer headers
  • Unexpected URL creations or modifications

Network Indicators:

  • HTTP POST requests to admin endpoints without CSRF tokens
  • Requests with mismatched referrer headers

SIEM Query:

source="yourls_logs" AND (action="create" OR action="delete" OR action="update") AND csrf_token=""

🔗 References

📤 Share & Export