CVE-2019-10168

7.8 HIGH

📋 TL;DR

This vulnerability in libvirt allows read-only clients to execute arbitrary programs with libvirtd privileges by specifying a crafted path in the 'emulator' argument of certain APIs. It affects libvirt versions 4.x.x before 4.10.1 and 5.x.x before 5.4.1. Systems using libvirt for virtualization management are at risk.

💻 Affected Systems

Products:
  • libvirt
Versions: 4.x.x before 4.10.1, 5.x.x before 5.4.1
Operating Systems: Linux distributions using affected libvirt versions
Default Config Vulnerable: ⚠️ Yes
Notes: Systems with libvirtd running and accessible via read-only clients are vulnerable. Common in virtualization hosts using KVM/QEMU.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

An attacker with read-only access to libvirt could execute arbitrary code with libvirtd privileges (typically root), leading to full system compromise, data theft, or lateral movement within the environment.

🟠

Likely Case

Privilege escalation from a low-privileged user or service account to root, enabling further system exploitation and control over virtual machines.

🟢

If Mitigated

If proper access controls limit libvirt API access to trusted users only, impact is reduced to authorized users misusing privileges.

🌐 Internet-Facing: LOW
🏢 Internal Only: HIGH

🎯 Exploit Status

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

Exploitation requires read-only access to libvirt API. Public proof-of-concept exists, making weaponization likely.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: libvirt 4.10.1, 5.4.1, or later

Vendor Advisory: https://access.redhat.com/libvirt-privesc-vulnerabilities

Restart Required: Yes

Instructions:

1. Update libvirt packages to version 4.10.1+ or 5.4.1+ using your distribution's package manager. 2. Restart libvirtd service. 3. Verify the update with version check.

🔧 Temporary Workarounds

Restrict libvirt API access

linux

Limit access to libvirt API (e.g., via UNIX socket permissions or network firewall) to trusted users only.

chmod 750 /var/run/libvirt/libvirt-sock
chown root:libvirt /var/run/libvirt/libvirt-sock

🧯 If You Can't Patch

  • Restrict libvirt API access to minimal trusted users via UNIX socket permissions or network ACLs.
  • Monitor libvirtd logs for unusual emulator path executions and audit user access to libvirt.

🔍 How to Verify

Check if Vulnerable:

Check libvirt version with 'libvirtd --version' or package manager. If version is 4.x.x < 4.10.1 or 5.x.x < 5.4.1, system is vulnerable.

Check Version:

libvirtd --version

Verify Fix Applied:

After update, confirm version is >= 4.10.1 or >= 5.4.1. Test with a read-only client attempting to specify an emulator path; it should fail or be restricted.

📡 Detection & Monitoring

Log Indicators:

  • Unusual emulator path executions in libvirtd logs (e.g., /var/log/libvirt/libvirtd.log)
  • Failed authentication attempts or unexpected API calls from read-only clients.

Network Indicators:

  • Unexpected network connections to libvirt ports (default 16509 TCP) from unauthorized sources.

SIEM Query:

source="libvirtd.log" AND "emulator" AND NOT "qemu-system"

🔗 References

📤 Share & Export