CVE-2015-1877

8.8 HIGH

📋 TL;DR

This vulnerability in xdg-open allows remote attackers to execute arbitrary commands by tricking users into opening a malicious file. It affects Debian systems using dash shell with xdg-utils 1.1.0 rc1. The flaw stems from improper handling of local variables in the open_generic_xdg_mime function.

💻 Affected Systems

Products:
  • xdg-utils
Versions: 1.1.0 rc1
Operating Systems: Debian Linux
Default Config Vulnerable: ⚠️ Yes
Notes: Specifically affects Debian systems using dash as the default shell. Other distributions using bash may not be vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise via remote code execution with user privileges, potentially leading to privilege escalation, data theft, or complete system takeover.

🟠

Likely Case

Local privilege escalation or arbitrary command execution when a user opens a malicious file, potentially leading to malware installation or data exfiltration.

🟢

If Mitigated

Limited impact with proper user education about opening untrusted files and network segmentation reducing attack surface.

🌐 Internet-Facing: MEDIUM - Requires user interaction (opening a file) but can be triggered via web downloads or email attachments.
🏢 Internal Only: MEDIUM - Similar risk internally if users open malicious files from network shares or internal systems.

🎯 Exploit Status

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

Exploitation requires user interaction (opening a malicious file). Proof of concept code was published in security advisories.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: xdg-utils 1.1.0-1+deb8u1 or later

Vendor Advisory: http://www.debian.org/security/2015/dsa-3165

Restart Required: No

Instructions:

1. Update package: sudo apt-get update && sudo apt-get install xdg-utils
2. Verify version: dpkg -l xdg-utils | grep ^ii
3. Ensure version is 1.1.0-1+deb8u1 or higher

🔧 Temporary Workarounds

Change default shell

linux

Temporarily change default shell from dash to bash to avoid the vulnerability

sudo dpkg-reconfigure dash
Select 'No' when prompted to use dash as default shell

Disable xdg-open

linux

Remove or restrict xdg-open execution permissions

sudo chmod -x /usr/bin/xdg-open
sudo mv /usr/bin/xdg-open /usr/bin/xdg-open.disabled

🧯 If You Can't Patch

  • Implement strict file handling policies: block execution of untrusted files and educate users about risks
  • Use application whitelisting to prevent unauthorized command execution and monitor for suspicious xdg-open activity

🔍 How to Verify

Check if Vulnerable:

Check xdg-utils version and shell: dpkg -l xdg-utils | grep '1.1.0 rc1' && readlink -f /bin/sh | grep dash

Check Version:

dpkg -l xdg-utils | grep ^ii

Verify Fix Applied:

Verify updated version: dpkg -l xdg-utils | grep -E '1.1.0-1\+deb8u1|1.1.1'

📡 Detection & Monitoring

Log Indicators:

  • Unusual xdg-open processes spawning shells
  • Suspicious command execution following file opens
  • Failed privilege escalation attempts

Network Indicators:

  • Outbound connections from xdg-open processes
  • Unexpected network activity after file operations

SIEM Query:

process_name:xdg-open AND (child_process:bash OR child_process:sh OR child_process:dash)

🔗 References

📤 Share & Export