CVE-2019-5127

9.8 CRITICAL

📋 TL;DR

CVE-2019-5127 is an unauthenticated command injection vulnerability in YouPHPTube Encoder plugin that allows attackers to execute arbitrary commands on the server. This affects YouPHPTube Encoder 2.3 installations, potentially compromising the entire server. Attackers can exploit this remotely without authentication.

💻 Affected Systems

Products:
  • YouPHPTube Encoder
Versions: 2.3
Operating Systems: Any OS running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Affects YouPHPTube Encoder plugin specifically, not necessarily the main YouPHPTube application. Vulnerable in default configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete server compromise leading to data theft, ransomware deployment, or use as a pivot point for lateral movement within the network.

🟠

Likely Case

Remote code execution allowing attackers to install backdoors, steal data, or use the server for malicious activities like cryptocurrency mining.

🟢

If Mitigated

Limited impact if proper network segmentation, web application firewalls, and least privilege principles are implemented.

🌐 Internet-Facing: HIGH - Exploitable remotely without authentication via HTTP request to vulnerable endpoint.
🏢 Internal Only: MEDIUM - Still exploitable from internal networks but requires attacker to have network access.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: CONFIRMED
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Simple HTTP POST request with malicious base64Url parameter can trigger command injection. Public exploit code exists.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Update to YouPHPTube Encoder version 3.0 or later

Vendor Advisory: https://github.com/YouPHPTube/YouPHPTube-Encoder

Restart Required: No

Instructions:

1. Backup current installation. 2. Download latest version from official repository. 3. Replace vulnerable files. 4. Verify functionality. 5. Remove /objects/getImage.php if not needed.

🔧 Temporary Workarounds

Block vulnerable endpoint

all

Use web server configuration to block access to /objects/getImage.php

# Apache: RewriteRule ^objects/getImage\.php$ - [F,L]
# Nginx: location ~ ^/objects/getImage\.php$ { return 403; }

Input validation filter

all

Add input validation to sanitize base64Url parameter

# In getImage.php, add: $base64Url = preg_replace('/[^a-zA-Z0-9\/\+=]/', '', $_POST['base64Url']);

🧯 If You Can't Patch

  • Implement strict web application firewall rules to block suspicious requests to /objects/getImage.php
  • Isolate the vulnerable server in a DMZ with strict outbound network controls

🔍 How to Verify

Check if Vulnerable:

Check if /objects/getImage.php exists and accepts base64Url parameter. Test with controlled payload: curl -X POST -d 'base64Url=test' http://target/objects/getImage.php

Check Version:

Check plugin directory for version files or examine code comments for version information

Verify Fix Applied:

Verify /objects/getImage.php no longer exists or returns proper error. Test with same payload should not execute commands.

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests to /objects/getImage.php
  • Commands like 'whoami', 'id', 'ls', 'cat' in URL parameters
  • Multiple failed command injection attempts

Network Indicators:

  • HTTP POST requests to /objects/getImage.php with base64Url parameter containing shell metacharacters
  • Outbound connections from web server to suspicious IPs

SIEM Query:

source="web_logs" AND uri="/objects/getImage.php" AND method="POST" AND (param="*;*" OR param="*|*" OR param="*`*" OR param="*$(*" OR param="*&*" OR param="*>*" OR param="*<*")

🔗 References

📤 Share & Export