cve.bz

CVE-2021-4207 Classic Buffer Overflow

8.2 highExploit referenceEPSS 0.4%

High (8.2). EPSS 0.4% estimated probability of exploitation activity in the next 30 days.

On this page
A flaw was found in the QXL display device emulation in QEMU. A double fetch of guest controlled values `cursor->header.width` and `cursor->header.height` can lead to the allocation of a small cursor object followed by a subsequent heap-based buffer overflow. A malicious privileged guest user could use this flaw to crash the QEMU process on the host or potentially execute arbitrary code within the context of the QEMU process.

Severity

CVSS 3.1

8.2 high
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
EPSS
0.4% (unchanged from 0.4% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 35th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWEs
CWE-120 Buffer Copy without Checking Size of Input (Classic Buffer Overflow)
CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization (Race Condition)
OWASP Top 10
A06:2025 Insecure Design
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-4207 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-4207?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-4207?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-4207 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
qemu:qemubefore 7.0.0
redhat:enterprise_linux8.0
debian:debian_linux10.0
debian:debian_linux11.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10qemu1:3.1+dfsg-8+deb10u9DLA-3099-1
Debian11qemu1:5.2+dfsg-11+deb11u2DSA-5133-1
Debian12, 13, 14qemu1:7.0+dfsg-1DEBIAN-CVE-2021-4207
Ubuntu18.04:LTSqemu1:2.11+dfsg-1ubuntu7.40UBUNTU-CVE-2021-4207 USN-5489-1
Ubuntu20.04:LTSqemu1:4.2-3ubuntu6.23UBUNTU-CVE-2021-4207 USN-5489-1
Ubuntu22.04:LTSqemu1:6.2+dfsg-2ubuntu6.2UBUNTU-CVE-2021-4207 USN-5489-1
UbuntuPro:14.04:LTSqemu2.0.0+dfsg-2ubuntu1.47+esm6UBUNTU-CVE-2021-4207
UbuntuPro:16.04:LTSqemu1:2.5+dfsg-5ubuntu10.51+esm4UBUNTU-CVE-2021-4207
Red Hatadvanced_virtualization:8.4::el8SLOF0:20200717-1.gite18ddad8.module+el8.4.0+8855+a9e237a9RHSA-2022:5002
Red Hatadvanced_virtualization:8.4::el8hivex, perl-hivex, ruby-hivex and 10 more0:1.3.18-21.module+el8.4.0+11609+2eba841aRHSA-2022:5002
Red Hatadvanced_virtualization:8.4::el8libguestfs-winsupport0:8.2-2.module+el8.4.0+12717+0b0da9adRHSA-2022:5002
Red Hatadvanced_virtualization:8.4::el8libiscsi, libiscsi-devel, libiscsi-utils and 3 more0:1.18.0-8.module+el8.4.0+8855+a9e237a9RHSA-2022:5002
Red Hatadvanced_virtualization:8.4::el8libnbd, nbdfuse, libnbd-devel and 9 more0:1.6.0-5.module+el8.4.0+14155+dec4a5c7RHSA-2022:5002
Red Hatadvanced_virtualization:8.4::el8libtpms, libtpms-devel, libtpms-debuginfo and 1 more0:0.7.4-4.20201106git2452a24dab.module+el8.4.0+10596+32ba7df3RHSA-2022:5002
Red Hatadvanced_virtualization:8.4::el8libvirt, libvirt-nss, libvirt-docs and 51 more0:7.0.0-14.8.module+el8.4.0+15255+f7eff4ddRHSA-2022:5002
Red Hatadvanced_virtualization:8.4::el8libvirt-dbus, libvirt-dbus-debuginfo, libvirt-dbus-debugsource0:1.3.0-2.module+el8.4.0+8855+a9e237a9RHSA-2022:5002
Red Hatadvanced_virtualization:8.4::el8nbdkit, nbdkit-devel, nbdkit-server and 34 more0:1.24.0-1.module+el8.4.0+9341+96cf2672RHSA-2022:5002
Red Hatadvanced_virtualization:8.4::el8netcf, netcf-libs, netcf-devel and 3 more0:0.2.8-12.module+el8.4.0+8855+a9e237a9RHSA-2022:5002
Red Hatadvanced_virtualization:8.4::el8perl-Sys-Virt, libvirt-python, python3-libvirt and 4 more0:7.0.0-1.module+el8.4.0+9469+2eaf72bcRHSA-2022:5002
Red Hatadvanced_virtualization:8.4::el8python-pyvmomi, python3-pyvmomi0:6.7.1-7.module+el8.4.0+8855+a9e237a9RHSA-2022:5002
34 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 3 moreqemu3.1.1.1-150100.80.43.2SUSE-SU-2022:3768-1
SUSEEnterprise Storage 7, Linux Enterprise High Performance Computing 15 SP2-ESPOS, Linux Enterprise High Performance Computing 15 SP2-LTSS and 6 moreqemu4.2.1-150200.69.1SUSE-SU-2022:3594-1
SUSELinux Enterprise Micro 5.1, Linux Enterprise Micro 5.2, Linux Enterprise Module for Basesystem 15 SP3 and 1 moreqemu5.2.0-150300.115.2SUSE-SU-2022:2254-1
SUSELinux Enterprise Module for Basesystem 15 SP4, Linux Enterprise Module for Server Applications 15 SP4qemu6.2.0-150400.37.5.3SUSE-SU-2022:2260-1
SUSELinux Enterprise Server 12 SP2-BCLqemu2.6.2-41.76.1SUSE-SU-2023:2358-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5qemu3.1.1.1-69.1SUSE-SU-2023:3015-1
openSUSELeap 15.3qemu3.1.1.1-150100.80.43.2SUSE-SU-2022:3768-1
openSUSELeap 15.3qemu, qemu-linux-user5.2.0-150300.115.2SUSE-SU-2022:2254-1
openSUSELeap 15.3qemu-testsuite5.2.0-150300.115.4SUSE-SU-2022:2254-1
openSUSELeap 15.3, Leap 15.4qemu4.2.1-150200.69.1SUSE-SU-2022:3594-1
openSUSELeap 15.4qemu6.2.0-150400.37.5.3SUSE-SU-2022:2260-1
openSUSELeap 15.4qemu-linux-user6.2.0-150400.37.5.1SUSE-SU-2022:2260-1
openSUSELeap 15.4qemu-testsuite6.2.0-150400.37.5.5SUSE-SU-2022:2260-1
openSUSETumbleweedqemu7.0.0-53.1openSUSE-SU-2024:12209-1
AlmaLinux8SLOF20210217-1.module_el8.6.0+2880+7d9e3703ALSA-2022:5821
AlmaLinux8hivex, perl-hivex, ruby-hivex and 4 more1.3.18-23.module_el8.6.0+2880+7d9e3703ALSA-2022:5821
AlmaLinux8libguestfs-winsupport8.6-1.module_el8.6.0+2880+7d9e3703ALSA-2022:5821
AlmaLinux8libiscsi, libiscsi-devel, libiscsi-utils1.18.0-8.module_el8.6.0+2880+7d9e3703ALSA-2022:5821
AlmaLinux8libnbd, nbdfuse, libnbd-devel and 4 more1.6.0-5.module_el8.6.0+2880+7d9e3703ALSA-2022:5821
AlmaLinux8libtpms, libtpms-devel0.9.1-0.20211126git1ff6fe1f43.module_el8.6.0+2880+7d9e3703ALSA-2022:5821
AlmaLinux8libvirt, libvirt-nss, libvirt-docs and 25 more8.0.0-5.2.module_el8.6.0+3071+a07c0ea5ALSA-2022:5821
AlmaLinux8libvirt-dbus1.3.0-2.module_el8.6.0+2880+7d9e3703ALSA-2022:5821
AlmaLinux8nbdkit, nbdkit-devel, nbdkit-server and 16 more1.24.0-4.module_el8.6.0+2880+7d9e3703ALSA-2022:5821
AlmaLinux8netcf, netcf-libs, netcf-devel0.2.8-12.module_el8.6.0+2880+7d9e3703ALSA-2022:5821
AlmaLinux8perl-Sys-Virt, python3-libvirt8.0.0-1.module_el8.6.0+2880+7d9e3703ALSA-2022:5821
AlmaLinux8qemu-img, qemu-kvm, qemu-kvm-core and 12 more15:6.2.0-11.module_el8.6.0+3071+a07c0ea5.2ALSA-2022:5821
6 more for AlmaLinux in the JSON.
Rocky Linux8hivex0:1.3.18-23.module+el8.6.0+847+b490afddRLSA-2022:5821
Rocky Linux8hivex0:1.3.18-23.module+el8.7.0+1084+97b81f61RLSA-2022:5821
Rocky Linux8libguestfs1:1.44.0-5.module+el8.6.0+1052+ff61d164.rockyRLSA-2022:5821
Rocky Linux8libguestfs-winsupport0:8.6-1.module+el8.6.0+847+b490afddRLSA-2022:5821
Rocky Linux8libguestfs-winsupport0:8.6-1.module+el8.7.0+1084+97b81f61RLSA-2022:5821
Rocky Linux8libiscsi0:1.18.0-8.module+el8.4.0+534+4680a14eRLSA-2022:5821
Rocky Linux8libiscsi0:1.18.0-8.module+el8.6.0+847+b490afddRLSA-2022:5821
Rocky Linux8libiscsi0:1.18.0-8.module+el8.7.0+1084+97b81f61RLSA-2022:5821
Rocky Linux8libnbd0:1.6.0-5.module+el8.6.0+847+b490afddRLSA-2022:5821
Rocky Linux8libnbd0:1.6.0-5.module+el8.7.0+1084+97b81f61RLSA-2022:5821
Rocky Linux8libtpms0:0.9.1-0.20211126git1ff6fe1f43.module+el8.6.0+1052+ff61d164RLSA-2022:5821
Rocky Linux8libvirt0:8.0.0-5.2.module+el8.6.0+998+252a5635RLSA-2022:5821
17 more for Rocky Linux in the JSON.
Azure Linux2qemu6.2.0-13AZL-9619
Azure Linux3qemu6.2.0-18AZL-35155

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Releases of Red Hat OpenStack Platform 15 and newer consume fixes directly from the Red Hat Enterprise Linux 8 Advanced Virtualization repository. A future update may address this issue in Red Hat Enterprise Linux 8 and RHEL 8 Advanced Virtualization. The versions of `qemu-kvm` as shipped with Red Hat Enterprise Linux 9 are not affected by this flaw as they do not include support for QXL display device emulation.

ProductPackageStateAdvisory
Advanced Virtualization for RHEL 8.4.0.EUSvirt:av-8040020220517095834.522a0ee4Fixed 2022-06-13RHSA-2022:5002
Advanced Virtualization for RHEL 8.4.0.EUSvirt-devel:av-8040020220517095834.522a0ee4Fixed 2022-06-13RHSA-2022:5002
Red Hat Enterprise Linux 8virt-devel:rhel-8060020220616155742.ad008a3aFixed 2022-08-02RHSA-2022:5821
Red Hat Enterprise Linux 8virt:rhel-8060020220616155742.ad008a3aFixed 2022-08-02RHSA-2022:5821
Red Hat Enterprise Linux 6qemu-kvmOut of support scope
Red Hat Enterprise Linux 7qemu-kvmOut of support scope
Red Hat Enterprise Linux 7qemu-kvm-maOut of support scope
Red Hat Enterprise Linux 8 Advanced Virtualizationvirt:8.2/qemu-kvmWill not fix
Red Hat Enterprise Linux 8 Advanced Virtualizationvirt:av/qemu-kvmAffected
Red Hat Enterprise Linux 9qemu-kvmNot affected
Red Hat OpenStack Platform 10 (Newton)qemu-kvm-rhevOut of support scope
Red Hat OpenStack Platform 13 (Queens)qemu-kvm-rhevOut of support scope

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-4207.

Attack patterns (CAPEC)

  • CAPEC-26 Leveraging Race Conditions Likelihood: High · Severity: High
  • CAPEC-29 Leveraging Time-of-Check and Time-of-Use (TOCTOU) Race Conditions Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-120 (13).

References

Check your stackJSON