CVE-2021-32142 Memory corruption in n/a
A buffer overflow in LibRaw allows attackers to escalate privileges or execute code via crafted image data.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2021-32142?
CVE-2021-32142 is a high-severity memory corruption vulnerability in Libraw Libraw, published on 17 Feb 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
Buffer Overflow vulnerability in LibRaw linux/unix v0.20.0 allows attacker to escalate privileges via the LibRaw_buffer_datastream::gets(char*, int) in /src/libraw/src/libraw_datastream.cpp.
Weakness: CWE-787
Which versions are affected by CVE-2021-32142?
It affects 1 product.
Linux distribution packages (40)
LibRaw AlmaLinux:8 | All versions | 0.19.5-4.el8 |
LibRaw-devel AlmaLinux:8 | All versions | 0.19.5-4.el8 |
LibRaw AlmaLinux:9 | All versions | 0.20.2-6.el9 |
LibRaw-devel AlmaLinux:9 | All versions | 0.20.2-6.el9 |
LibRaw Red Hat:enterprise_linux:7::client | All versions | 0:0.19.4-2.el7_9 |
LibRaw-debuginfo Red Hat:enterprise_linux:7::client | All versions | 0:0.19.4-2.el7_9 |
LibRaw-devel Red Hat:enterprise_linux:7::client | All versions | 0:0.19.4-2.el7_9 |
LibRaw-static Red Hat:enterprise_linux:7::client | All versions | 0:0.19.4-2.el7_9 |
LibRaw Red Hat:enterprise_linux:7::server | All versions | 0:0.19.4-2.el7_9 |
LibRaw-debuginfo Red Hat:enterprise_linux:7::server | All versions | 0:0.19.4-2.el7_9 |
LibRaw-devel Red Hat:enterprise_linux:7::server | All versions | 0:0.19.4-2.el7_9 |
LibRaw-static Red Hat:enterprise_linux:7::server | All versions | 0:0.19.4-2.el7_9 |
LibRaw Red Hat:enterprise_linux:7::workstation | All versions | 0:0.19.4-2.el7_9 |
LibRaw-debuginfo Red Hat:enterprise_linux:7::workstation | All versions | 0:0.19.4-2.el7_9 |
LibRaw-devel Red Hat:enterprise_linux:7::workstation | All versions | 0:0.19.4-2.el7_9 |
LibRaw-static Red Hat:enterprise_linux:7::workstation | All versions | 0:0.19.4-2.el7_9 |
LibRaw Red Hat:enterprise_linux:8::appstream | All versions | 0:0.19.5-4.el8 |
LibRaw-debuginfo Red Hat:enterprise_linux:8::appstream | All versions | 0:0.19.5-4.el8 |
LibRaw-debugsource Red Hat:enterprise_linux:8::appstream | All versions | 0:0.19.5-4.el8 |
LibRaw-samples-debuginfo Red Hat:enterprise_linux:8::appstream | All versions | 0:0.19.5-4.el8 |
LibRaw-debuginfo Red Hat:enterprise_linux:8::crb | All versions | 0:0.19.5-4.el8 |
LibRaw-debugsource Red Hat:enterprise_linux:8::crb | All versions | 0:0.19.5-4.el8 |
LibRaw-devel Red Hat:enterprise_linux:8::crb | All versions | 0:0.19.5-4.el8 |
LibRaw-samples-debuginfo Red Hat:enterprise_linux:8::crb | All versions | 0:0.19.5-4.el8 |
LibRaw Red Hat:enterprise_linux:9::appstream | All versions | 0:0.20.2-6.el9 |
LibRaw-debuginfo Red Hat:enterprise_linux:9::appstream | All versions | 0:0.20.2-6.el9 |
LibRaw-debugsource Red Hat:enterprise_linux:9::appstream | All versions | 0:0.20.2-6.el9 |
LibRaw-samples-debuginfo Red Hat:enterprise_linux:9::appstream | All versions | 0:0.20.2-6.el9 |
LibRaw-debuginfo Red Hat:enterprise_linux:9::crb | All versions | 0:0.20.2-6.el9 |
LibRaw-debugsource Red Hat:enterprise_linux:9::crb | All versions | 0:0.20.2-6.el9 |
LibRaw-devel Red Hat:enterprise_linux:9::crb | All versions | 0:0.20.2-6.el9 |
LibRaw-samples-debuginfo Red Hat:enterprise_linux:9::crb | All versions | 0:0.20.2-6.el9 |
LibRaw Rocky Linux:8 | All versions | 0:0.19.5-4.el8 |
libraw SUSE:Linux Enterprise Module for Desktop Applications 15 SP4 | All versions | 0.20.2-150400.3.3.1 |
libraw SUSE:Linux Enterprise Software Development Kit 12 SP5 | All versions | 0.15.4-36.1 |
libraw SUSE:Linux Enterprise Workstation Extension 12 SP5 | All versions | 0.15.4-36.1 |
libraw SUSE:Linux Enterprise Workstation Extension 15 SP4 | All versions | 0.18.9-150000.3.17.1 |
libraw SUSE:Linux Enterprise Workstation Extension 15 SP4 | All versions | 0.20.2-150400.3.3.1 |
libraw openSUSE:Leap 15.4 | All versions | 0.18.9-150000.3.17.1 |
libraw openSUSE:Leap 15.4 | All versions | 0.20.2-150400.3.3.1 |
Products include Libraw Libraw.
How do I fix CVE-2021-32142?
Apply the vendor's patch.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2021-32142 being exploited?
There is no known exploitation of CVE-2021-32142 in the wild and no public exploit code.
Other vulnerabilities in Libraw Libraw
Sources
Also known as ALSA-2023:6343, ALSA-2024:2994, AZL-43756, AZL-45267, CLSA-2025-1745427138, DEBIAN-CVE-2021-32142 and 16 more.