---
id: "CVE-2026-120830"
kind: "vulnerability"
aliases: ["CVE-2026-120830"]
title: "libslirp: ICMP error handling can leak host memory to guests"
severity: "high"
cvss: 7.4
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "libslirp", "fixed": ["4.9.7"], "affected": "< 4.9.7 (first affected version not stated in sources)", "ecosystem": "upstream"}]
ecosystems: []
tags: ["containers", "libslirp", "package", "qemu", "virtual-machines"]
not_affected_if: ["no-libslirp", "other-network-backend"]
published_at: "2026-11-03T00:17:18+00:00"
first_seen_at: "2026-11-03T00:47:01+00:00"
updated_at: "2026-11-03T00:49:35+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-120830", "first_seen_at": "2026-11-03T00:47:01+00:00"}, {"source": "analyst", "url": null, "first_seen_at": "2026-11-03T00:49:35+00:00"}]
---

# libslirp: ICMP error handling can leak host memory to guests

libslirp is the user-mode networking library used by QEMU and similar virtual machine tools. A malformed or truncated IPv4 packet can make its ICMP error builder read past a heap buffer and copy the extra host memory into the error reply sent back to a guest or container.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- upstream:libslirp affected < 4.9.7 (first affected version not stated in sources) fixed 4.9.7

## How to check

- Run `pkg-config --modversion slirp`; versions below 4.9.7 (upstream) are not fixed unless your distro backported commit 21b33a6.
- Check whether QEMU uses user-mode networking (`-netdev user` / `-net user`) or links libslirp (`ldd $(which qemu-system-x86_64) | grep slirp`). Also check any container/VM tool (e.g. rootless network stacks) that bundles libslirp.
- QEMU builds with the bundled submodule (--enable-slirp=git) need QEMU rebuilt or updated with the fixed submodule.

## Fix

Upgrade libslirp to 4.9.7 (released 2026-10-30) or later; upstream commit 21b33a6 clamps the quoted IP length to the source mbuf length in icmp_forward_error(). Distributions that backport may keep an older version number: check your vendor's advisory.

## Timeline

- 2026-11-03T00:47:01+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-120830
- 2026-11-03T00:49:35+00:00 analyst — Upstream CHANGELOG lists the fix in 4.9.7 (2026-10-30); commit 21b33a6 adds the missing clamp (diff read). Red Hat page (reporter Piyusha Akash) lists no workaround and no fixed RHEL package yet. Introduction version of the bug not found; lower bound unknown. No exploitation or PoC found. Related sibling: CVE-2026-115449 (4.9.6).

## Documents

- [advisory] libslirp commit 21b33a6: icmp_forward_error: Fix Out-of-Bounds Heap Read & Information Disclosure https://gitlab.freedesktop.org/slirp/libslirp/-/commit/21b33a6c5588af9f58d15e528fdc1019452708e4
- [describes] Red Hat CVE-2026-120830 https://access.redhat.com/security/cve/cve-2026-120830
- [fix] libslirp CHANGELOG (4.9.7 - 2026-10-30) https://qemu.googlesource.com/libslirp/+/refs/heads/master/CHANGELOG.md

## From the sources

A flaw was found in libslirp in icmp_forward_error(). When building an ICMP error response, the length of the quoted original IPv4 packet was taken from the IP header without clamping it to the actual buffer length. A truncated or malformed packet could cause an out-of-bounds heap read, leaking host memory into the ICMP error packet returned to a guest or container.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
