Skip to main content

libvirt CVE-2026-61477

| EUVDEUVD-2026-54487 LOW
Improper Neutralization of CRLF Sequences ('CRLF Injection') (CWE-93)
2026-08-07 secalert@redhat.com GHSA-f6jp-rhmm-v59g
2.3
CVSS 3.1 · Vendor: redhat
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain libvirt network-definition API permission
  2. Delivery
    Craft network XML with newline-injected DNS TXT or SRV attribute
  3. Exploit
    Submit definition to libvirt API
  4. Execution
    Newline written verbatim into dnsmasq config file
  5. Persist
    libvirt restarts dnsmasq with injected dhcp-script directive
  6. Impact
    dnsmasq executes attacker-controlled script as root

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization CRLF sequence sanitization
Exploitation Conditions

Exploitation requires the attacker to hold explicit permission to define or modify virtual networks via the libvirt API - this is a high-privilege operation typically restricted to root or members of the libvirt administrative group, though it may be delegated in multi-tenant or cloud orchestration environments via polkit rules or libvirt access control lists. The target host must be running libvirt's virtual network driver with dnsmasq enabled for DNS/DHCP service (the default configuration for NAT-mode virtual networks). The attacker must be able to submit a network XML definition containing a DNS TXT record value or SRV record domain/target attribute with embedded newline characters. Exploitation is blocked in environments where all libvirt network-definition access is restricted to root-equivalent administrators, where AppArmor/SELinux profiles confine dnsmasq to prevent dhcp-script execution, or where virtual networks exclusively use external DNS/DHCP rather than libvirt's built-in dnsmasq integration.

Impact

The official CVSS score of 2.3 (AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:N) represents a significant apparent understatement: the description explicitly states that successful exploitation leads to arbitrary command execution as root, yet the vector records only low integrity impact and unchanged scope. This discrepancy strongly suggests the official scoring assessed the injection step in isolation (writing a newline into a config file = I:L) rather than scoring the resultant impact chain (dhcp-script execution as root = C:H/I:H/A:H with S:C). Security teams should treat the described root RCE as the operative impact, not the CVSS score, and verify independently with Red Hat's advisory at https://access.redhat.com/security/cve/CVE-2026-61477. EPSS data was not provided in available intelligence. KEV status is negative - no confirmed active exploitation. The attack vector is local with high-privilege prerequisites, meaningfully constraining the exposure surface: only accounts explicitly granted libvirt network-definition rights can trigger the flaw. In multi-tenant virtualization environments or environments with delegated libvirt API access, this privilege boundary is thinner than on single-administrator deployments.

Exploit ScenarioDerived

An attacker holding libvirt API credentials with permission to define virtual networks - such as a cloud tenant in a delegated-access environment or an insider with limited virtualization management rights - submits a crafted network XML document containing a DNS TXT record whose value attribute embeds a newline followed by 'dhcp-script=/tmp/backdoor.sh'. When libvirt regenerates the dnsmasq configuration and restarts dnsmasq, the injected directive causes dnsmasq to execute the attacker's script as root on every DHCP lease event. No public exploit code has been identified at time of analysis, though the attack technique is straightforward given knowledge of the dnsmasq configuration format.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 07, 2026

CRLF injection in libvirt's virtual network driver enables privileged users holding network-definition rights to inject arbitrary dnsmasq configuration directives - including dhcp-script - into the generated dnsmasq config file, ultimately achieving arbitrary command execution as root on the hypervisor host. The root cause is the network XML parser's failure to strip newline characters from DNS TXT record value attributes and SRV record domain/target attributes before writing them verbatim into the dnsmasq configuration. No public exploit has been identified at time of analysis, though an upstream fix commit exists in the libvirt GitLab repository; the official CVSS score of 2.3 appears to critically understate the impact relative to the described root code execution primitive.

RemediationAI

The primary fix is to apply the upstream libvirt patch available at https://gitlab.com/libvirt/libvirt/-/commit/3cfc77963b512d809348fca07f97fe924fac9a05, which sanitizes newline characters from DNS TXT and SRV record attributes before writing them to the dnsmasq configuration. Red Hat-based distributions (RHEL, CentOS Stream, Fedora) should monitor https://access.redhat.com/security/cve/CVE-2026-61477 for updated libvirt package releases. As a compensating control where patching is not immediately possible, restrict libvirt network-definition permissions exclusively to fully trusted system administrators by auditing and tightening polkit rules and libvirt access controls - this eliminates the untrusted-user attack surface without disabling virtual networking entirely. Trade-off: tightening libvirt ACLs in multi-tenant environments may break delegated self-service network provisioning workflows. An additional defense-in-depth measure is to review existing virtual network XML definitions for unexpected newline characters in DNS TXT values or SRV domain/target fields as an indicator of prior exploitation.

Affected ProductsAI

The affected product is libvirt (virtual network driver), reported by Red Hat security (secalert@redhat.com) and tracked in Red Hat Bugzilla at https://bugzilla.redhat.com/show_bug.cgi?id=2512066. Specific affected version ranges are not explicitly stated in the available CVE data; the upstream fix is identified by GitLab commit 3cfc77963b512d809348fca07f97fe924fac9a05 in the libvirt project repository. Affected versions are inferred as all releases prior to the commit merge point. Red Hat's advisory at https://access.redhat.com/security/cve/CVE-2026-61477 should be consulted for specific package versions across RHEL and derivative distributions.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

libvirt is an open-source API, daemon, and management tool for managing platform virtualization, widely used in KVM/QEMU hypervisor stacks. Its virtual network driver generates dnsmasq configuration files to provide DNS and DHCP services to guest VMs. The vulnerable code path parses virtual network XML definitions and writes DNS TXT record values and SRV record domain/target fields verbatim into the generated dnsmasq config without first sanitizing newline (CRLF) characters. CWE-93 (Improper Neutralization of Special Elements - CRLF Injection) describes exactly this failure mode: an application that writes externally influenced data into a structured configuration format without escaping structural delimiters allows an attacker to break out of the intended field boundary and inject arbitrary new directives. In dnsmasq, the dhcp-script directive specifies an external script executed as root by the dnsmasq process for DHCP lease events, making it the canonical injection target for privilege escalation. The upstream fix is available at GitLab commit 3cfc77963b512d809348fca07f97fe924fac9a05 in the libvirt repository.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (redhat) PRIMARY 2.3 LOW
AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:N
vuln.today AI 8.2 HIGH

Injection escalates to root RCE via dhcp-script beyond the caller's privilege scope, warranting S:C and C/I/A:H despite the PR:H prerequisite.

3.1 AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Primary rating from Vendor (redhat).

CVSS VectorVendor: redhat

Attack Vector
Local
Attack Complexity
Low
Privileges Required
High
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None

DescriptionCVE.org

An injection vulnerability was found in libvirt's virtual network driver. The network XML parser does not strip newline characters from DNS TXT record value attributes and SRV record domain/target attributes. These values are written verbatim into the dnsmasq configuration file generated by the network driver, allowing a user with permission to define virtual networks to inject arbitrary dnsmasq configuration directives such as dhcp-script, leading to arbitrary command execution as root.

Threat Intelligence Overview

EPSS Score
0.2%
Top 85% exploitable
Prevalence
Medium
core virtualization daemon in KVM/QEMU and OpenStack deployments
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

12
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +12
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy