CVE-2026-61477: Libvirt: libvirt: newline injection in network xml dns txt/srv fields allows dnsmasq config directive injection

Published Aug 6, 2026
·
Updated

A flaw was found in libvirt. The network XML parser accepts XML numeric character references for line breaks ( / ) in DNS TXT record value attributes and SRV record domain/target attributes without sanitization. The network driver writes these values directly into the line-oriented dnsmasq configuration file as txt-record= or srv-host= directives. An embedded newline terminates the intended directive and begins a new one under attacker control (e.g., dhcp-script=/bin/sh -c '<cmd>'), which dnsmasq executes as root when the virtual network is started. Under the default libvirt deployment model, read-write access to the libvirt socket is already root-equivalent, and the <dnsmasq:options> raw namespace already provides a documented mechanism for arbitrary directive injection, making this a hardening issue only. However, under non-default polkit fine-grained access control configurations that grant only network.write and network.start permissions, this could represent a privilege boundary violation.

Other sources

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.

MITRE

Affected Software

1 affected component
libvirt libvirt

Event History

Aug 6, 2026
Data Sourced
via Red Hat·02:34 PM
DescriptionSeverityAffected Software
Aug 7, 2026
CVE Published
via MITRE·02:09 PM
Data Sourced
via MITRE·02:09 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:17 PM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-61477?

The severity of CVE-2026-61477 is classified as low.

2

How do I fix CVE-2026-61477?

To fix CVE-2026-61477, update to the latest version of libvirt where the vulnerability has been addressed.

3

What kind of injection is related to CVE-2026-61477?

CVE-2026-61477 is associated with CRLF injection in DNS TXT and SRV record fields.

4

What impact does CVE-2026-61477 have on dnsmasq configurations?

CVE-2026-61477 allows potential injection of configuration directives into dnsmasq due to unsanitized input.

5

Which software is affected by CVE-2026-61477?

CVE-2026-61477 affects the libvirt software specifically.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203