---
id: CVE-2026-61477
title: >-
  Libvirt: libvirt: newline injection in network xml dns txt/srv fields allows
  dnsmasq config directive injection
summary: >-
  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
  ver…
severity: low
cvss: 2.3
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:N'
cvssSource: cna
cwe:
  - CWE-93
vendor: Red Hat
product: libvirt
affected:
  - libvirt (all versions)
  - libvirt (all versions)
  - libvirt (all versions)
  - 'virt:rhel/libvirt (all versions)'
  - libvirt (all versions)
  - libvirt (all versions)
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-08-07T18:21:41.909047Z'
published: '2026-08-07'
updated: '2026-11-06'
sourceUpdated: '2026-11-06T19:08:41.712Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-61477'
references:
  - url: 'https://access.redhat.com/security/cve/CVE-2026-61477'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2512066'
    label: RHBZ#2512066
  - url: >-
      https://gitlab.com/libvirt/libvirt/-/commit/3cfc77963b512d809348fca07f97fe924fac9a05
tags:
  - cve.org
epss: 0.00163
epssPercentile: 0.05494
ingestedAt: '2026-11-06T20:03:04.290Z'
---

## Overview

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.

## Affected

- `libvirt (all versions)`
- `libvirt (all versions)`
- `libvirt (all versions)`
- `virt:rhel/libvirt (all versions)`
- `libvirt (all versions)`
- `libvirt (all versions)`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

### Workarounds

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
