{"answers":{"affected":"It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-3782 in the wild and no public exploit code.","fix":"Apply the vendor's patch.","what":"CVE-2021-3782 is a medium-severity vulnerability in wayland, published on 23 Sep 2022. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-3782 and fix it if it is affected.\n\nWhat it is: CVE-2021-3782 is a medium-severity vulnerability in wayland, published on 23 Sep 2022. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-3782 in the wild and no public exploit code.\n\nAffected product: wayland. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-3782/ (Markdown: https://insights.sbomify.com/CVE-2021-3782/index.md)","id":"CVE-2021-3782","markdown":"https://insights.sbomify.com/CVE-2021-3782/index.md","name":"CVE-2021-3782","record":{"aliases":["ALSA-2023:2786","AZL-11019","DEBIAN-CVE-2021-3782","GHSA-pvw2-9h4r-c5cr","JLSEC-2026-97","MGASA-2022-0418","OESA-2022-1920","RHSA-2023:2786","RLSA-2023:2786","SUSE-SU-2023:1860-1","SUSE-SU-2023:1864-1","SUSE-SU-2023:1873-1","SUSE-SU-2023:1874-1","UBUNTU-CVE-2021-3782","USN-5614-1","USN-5614-2"],"analysis":{"component_type":"operating_system","fix_type":"patch","impacts":["code_execution","data_read"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Wayland compositor","requires_auth":"low_privilege","summary":"Integer overflow in Wayland buffer pool reference counting allows use-after-free, potentially leading to code execution or memory leakage.","user_interaction":"not_required","vuln_class":"integer_overflow"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"redhat","cpe":[{"product":"wayland","vendor":"wayland"}],"cvss":{"score":6.6,"severity":"medium","source":"cisa-adp","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H","version":"3.1"},"cwes":[{"id":"CWE-190","name":"Integer Overflow or Wraparound"}],"description":"An internal reference count is held on the buffer pool, incremented every time a new buffer is created from the pool. The reference count is maintained as an int; on LP64 systems this can cause the reference count to overflow if the client creates a large number of wl_shm buffer objects, or if it can coerce the server to create a large number of external references to the buffer storage. With the reference count overflowing, a use-after-free can be constructed on the wl_shm_pool tracking structure, where values may be incremented or decremented; it may also be possible to construct a limited oracle to leak 4 bytes of server-side memory to the attacking client at a time.","ecosystems":["AlmaLinux:8","Red Hat:enterprise_linux:8::appstream","Rocky Linux:8","SUSE:Enterprise Storage 7","SUSE:Enterprise Storage 7.1","SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS","SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS","SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS","SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS","SUSE:Linux Enterprise Micro 5.2","SUSE:Linux Enterprise Micro 5.3","SUSE:Linux Enterprise Micro 5.4","SUSE:Linux Enterprise Module for Basesystem 15 SP4","SUSE:Linux Enterprise Real Time 15 SP3","SUSE:Linux Enterprise Server 12 SP5","SUSE:Linux Enterprise Server 15 SP1-LTSS","SUSE:Linux Enterprise Server 15 SP2-LTSS","SUSE:Linux Enterprise Server 15 SP3-LTSS","SUSE:Linux Enterprise Server for SAP Applications 12 SP5","SUSE:Linux Enterprise Server for SAP Applications 15 SP1","SUSE:Linux Enterprise Server for SAP Applications 15 SP2","SUSE:Linux Enterprise Server for SAP Applications 15 SP3","SUSE:Linux Enterprise Software Development Kit 12 SP5","SUSE:Manager Proxy 4.2","SUSE:Manager Server 4.2","openSUSE:Leap 15.4","openSUSE:Leap Micro 5.3"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Integer overflow in wayland","id":"CVE-2021-3782","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"integer_overflow","year":"2021"},"n_packages":43,"n_references":1,"next":{"headline":"Cross-site Scripting (XSS) - Reflected in yourls/yourls","id":"CVE-2021-3783"},"packages":[{"ecosystem":"AlmaLinux:8","fixed":["1.21.0-1.el8"],"introduced":["0"],"last_affected":[],"package":"libwayland-client","purl":"pkg:rpm/almalinux/libwayland-client","source":"ALSA-2023:2786"},{"ecosystem":"AlmaLinux:8","fixed":["1.21.0-1.el8"],"introduced":["0"],"last_affected":[],"package":"libwayland-cursor","purl":"pkg:rpm/almalinux/libwayland-cursor","source":"ALSA-2023:2786"},{"ecosystem":"AlmaLinux:8","fixed":["1.21.0-1.el8"],"introduced":["0"],"last_affected":[],"package":"libwayland-egl","purl":"pkg:rpm/almalinux/libwayland-egl","source":"ALSA-2023:2786"},{"ecosystem":"AlmaLinux:8","fixed":["1.21.0-1.el8"],"introduced":["0"],"last_affected":[],"package":"libwayland-server","purl":"pkg:rpm/almalinux/libwayland-server","source":"ALSA-2023:2786"},{"ecosystem":"AlmaLinux:8","fixed":["1.21.0-1.el8"],"introduced":["0"],"last_affected":[],"package":"wayland-devel","purl":"pkg:rpm/almalinux/wayland-devel","source":"ALSA-2023:2786"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:1.21.0-1.el8"],"introduced":["0"],"last_affected":[],"package":"libwayland-client","purl":"pkg:rpm/redhat/libwayland-client","source":"RHSA-2023:2786"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:1.21.0-1.el8"],"introduced":["0"],"last_affected":[],"package":"libwayland-client-debuginfo","purl":"pkg:rpm/redhat/libwayland-client-debuginfo","source":"RHSA-2023:2786"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:1.21.0-1.el8"],"introduced":["0"],"last_affected":[],"package":"libwayland-cursor","purl":"pkg:rpm/redhat/libwayland-cursor","source":"RHSA-2023:2786"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:1.21.0-1.el8"],"introduced":["0"],"last_affected":[],"package":"libwayland-cursor-debuginfo","purl":"pkg:rpm/redhat/libwayland-cursor-debuginfo","source":"RHSA-2023:2786"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:1.21.0-1.el8"],"introduced":["0"],"last_affected":[],"package":"libwayland-egl","purl":"pkg:rpm/redhat/libwayland-egl","source":"RHSA-2023:2786"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:1.21.0-1.el8"],"introduced":["0"],"last_affected":[],"package":"libwayland-egl-debuginfo","purl":"pkg:rpm/redhat/libwayland-egl-debuginfo","source":"RHSA-2023:2786"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:1.21.0-1.el8"],"introduced":["0"],"last_affected":[],"package":"libwayland-server","purl":"pkg:rpm/redhat/libwayland-server","source":"RHSA-2023:2786"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:1.21.0-1.el8"],"introduced":["0"],"last_affected":[],"package":"libwayland-server-debuginfo","purl":"pkg:rpm/redhat/libwayland-server-debuginfo","source":"RHSA-2023:2786"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:1.21.0-1.el8"],"introduced":["0"],"last_affected":[],"package":"wayland","purl":"pkg:rpm/redhat/wayland","source":"RHSA-2023:2786"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:1.21.0-1.el8"],"introduced":["0"],"last_affected":[],"package":"wayland-debuginfo","purl":"pkg:rpm/redhat/wayland-debuginfo","source":"RHSA-2023:2786"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:1.21.0-1.el8"],"introduced":["0"],"last_affected":[],"package":"wayland-debugsource","purl":"pkg:rpm/redhat/wayland-debugsource","source":"RHSA-2023:2786"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:1.21.0-1.el8"],"introduced":["0"],"last_affected":[],"package":"wayland-devel","purl":"pkg:rpm/redhat/wayland-devel","source":"RHSA-2023:2786"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:1.21.0-1.el8"],"introduced":["0"],"last_affected":[],"package":"wayland-devel-debuginfo","purl":"pkg:rpm/redhat/wayland-devel-debuginfo","source":"RHSA-2023:2786"},{"ecosystem":"Rocky Linux:8","fixed":["0:1.21.0-1.el8"],"introduced":["0"],"last_affected":[],"package":"wayland","purl":"pkg:rpm/rocky-linux/wayland?distro=rocky-linux-8\u0026epoch=0","source":"RLSA-2023:2786"},{"ecosystem":"SUSE:Enterprise Storage 7","fixed":["1.18.0-150200.3.3.1"],"introduced":["0"],"last_affected":[],"package":"wayland","purl":"pkg:rpm/suse/wayland\u0026distro=SUSE%20Enterprise%20Storage%207","source":"SUSE-SU-2023:1873-1"},{"ecosystem":"SUSE:Enterprise Storage 7.1","fixed":["1.18.0-150200.3.3.1"],"introduced":["0"],"last_affected":[],"package":"wayland","purl":"pkg:rpm/suse/wayland\u0026distro=SUSE%20Enterprise%20Storage%207.1","source":"SUSE-SU-2023:1873-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS","fixed":["1.16.0-150100.7.3.1"],"introduced":["0"],"last_affected":[],"package":"wayland","purl":"pkg:rpm/suse/wayland\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP1-LTSS","source":"SUSE-SU-2023:1874-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS","fixed":["1.18.0-150200.3.3.1"],"introduced":["0"],"last_affected":[],"package":"wayland","purl":"pkg:rpm/suse/wayland\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP2-LTSS","source":"SUSE-SU-2023:1873-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS","fixed":["1.18.0-150200.3.3.1"],"introduced":["0"],"last_affected":[],"package":"wayland","purl":"pkg:rpm/suse/wayland\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-ESPOS","source":"SUSE-SU-2023:1873-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS","fixed":["1.18.0-150200.3.3.1"],"introduced":["0"],"last_affected":[],"package":"wayland","purl":"pkg:rpm/suse/wayland\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-LTSS","source":"SUSE-SU-2023:1873-1"},{"ecosystem":"SUSE:Linux Enterprise Micro 5.2","fixed":["1.18.0-150200.3.3.1"],"introduced":["0"],"last_affected":[],"package":"wayland","purl":"pkg:rpm/suse/wayland\u0026distro=SUSE%20Linux%20Enterprise%20Micro%205.2","source":"SUSE-SU-2023:1873-1"},{"ecosystem":"SUSE:Linux Enterprise Micro 5.3","fixed":["1.19.0-150400.3.3.1"],"introduced":["0"],"last_affected":[],"package":"wayland","purl":"pkg:rpm/suse/wayland\u0026distro=SUSE%20Linux%20Enterprise%20Micro%205.3","source":"SUSE-SU-2023:1860-1"},{"ecosystem":"SUSE:Linux Enterprise Micro 5.4","fixed":["1.19.0-150400.3.3.1"],"introduced":["0"],"last_affected":[],"package":"wayland","purl":"pkg:rpm/suse/wayland\u0026distro=SUSE%20Linux%20Enterprise%20Micro%205.4","source":"SUSE-SU-2023:1860-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Basesystem 15 SP4","fixed":["1.19.0-150400.3.3.1"],"introduced":["0"],"last_affected":[],"package":"wayland","purl":"pkg:rpm/suse/wayland\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP4","source":"SUSE-SU-2023:1860-1"},{"ecosystem":"SUSE:Linux Enterprise Real Time 15 SP3","fixed":["1.18.0-150200.3.3.1"],"introduced":["0"],"last_affected":[],"package":"wayland","purl":"pkg:rpm/suse/wayland\u0026distro=SUSE%20Linux%20Enterprise%20Real%20Time%2015%20SP3","source":"SUSE-SU-2023:1873-1"},{"ecosystem":"SUSE:Linux Enterprise Server 12 SP5","fixed":["1.13.0-3.3.1"],"introduced":["0"],"last_affected":[],"package":"wayland","purl":"pkg:rpm/suse/wayland\u0026distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5","source":"SUSE-SU-2023:1864-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP1-LTSS","fixed":["1.16.0-150100.7.3.1"],"introduced":["0"],"last_affected":[],"package":"wayland","purl":"pkg:rpm/suse/wayland\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP1-LTSS","source":"SUSE-SU-2023:1874-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP2-LTSS","fixed":["1.18.0-150200.3.3.1"],"introduced":["0"],"last_affected":[],"package":"wayland","purl":"pkg:rpm/suse/wayland\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP2-LTSS","source":"SUSE-SU-2023:1873-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP3-LTSS","fixed":["1.18.0-150200.3.3.1"],"introduced":["0"],"last_affected":[],"package":"wayland","purl":"pkg:rpm/suse/wayland\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP3-LTSS","source":"SUSE-SU-2023:1873-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 12 SP5","fixed":["1.13.0-3.3.1"],"introduced":["0"],"last_affected":[],"package":"wayland","purl":"pkg:rpm/suse/wayland\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP5","source":"SUSE-SU-2023:1864-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP1","fixed":["1.16.0-150100.7.3.1"],"introduced":["0"],"last_affected":[],"package":"wayland","purl":"pkg:rpm/suse/wayland\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP1","source":"SUSE-SU-2023:1874-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP2","fixed":["1.18.0-150200.3.3.1"],"introduced":["0"],"last_affected":[],"package":"wayland","purl":"pkg:rpm/suse/wayland\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP2","source":"SUSE-SU-2023:1873-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP3","fixed":["1.18.0-150200.3.3.1"],"introduced":["0"],"last_affected":[],"package":"wayland","purl":"pkg:rpm/suse/wayland\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP3","source":"SUSE-SU-2023:1873-1"},{"ecosystem":"SUSE:Linux Enterprise Software Development Kit 12 SP5","fixed":["1.13.0-3.3.1"],"introduced":["0"],"last_affected":[],"package":"wayland","purl":"pkg:rpm/suse/wayland\u0026distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2012%20SP5","source":"SUSE-SU-2023:1864-1"},{"ecosystem":"SUSE:Manager Proxy 4.2","fixed":["1.18.0-150200.3.3.1"],"introduced":["0"],"last_affected":[],"package":"wayland","purl":"pkg:rpm/suse/wayland\u0026distro=SUSE%20Manager%20Proxy%204.2","source":"SUSE-SU-2023:1873-1"}],"prev":{"headline":"Command injection in ghostscript","id":"CVE-2021-3781"},"products":["wayland"],"published":"2022-09-23","related":[],"sources":[{"class":"attribution","licence":"MIT","name":"AlmaLinux","prefix":"ALSA"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"BSD","name":"Rocky Linux","prefix":"RLSA"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"SUSE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-05-22","vendors":["n/a"]},"summary":"Integer overflow in Wayland buffer pool reference counting allows use-after-free, potentially leading to code execution or memory leakage.","url":"https://insights.sbomify.com/CVE-2021-3782/"}