CVE-2021-32142 json
Buffer Overflow vulnerability in LibRaw linux/unix v0.20.0 allows attacker to escalate privileges via the LibRaw_buffer_datastream::gets(ch…
published 2023-02-17 3 y ago modified 2026-06-17 4 mo ago also EUVD-2021-19000
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 33%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- libraw Debian 14, Debian 13, Debian 12 0.20.2-2.1
debian advisories DEBIAN-CVE-2021-32142
- libraw Ubuntu 20.04 LTS 0.19.5-1ubuntu1.2
- libraw Ubuntu 22.04 LTS 0.20.2-2ubuntu2.22.04.1
- digikam Ubuntu Pro 20.04 LTS 4:6.4.0+dfsg-3ubuntu0.1~esm1
ubuntu advisories UBUNTU-CVE-2021-32142
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- LibRaw RHEL 8 0.19.5-4.el8
- LibRaw RHEL 7 0.19.4-2.el7_9
- LibRaw RHEL 9 0.20.2-6.el9
red hat advisories RHSA-2024:2994RHSA-2024:0343RHSA-2023:6343
- libraw SLE Workstation Extension 15 SP4, SLE Module for Desktop Applications 15 SP4, openSUSE Leap 15.4 0.20.2-150400.3.3.1
- libraw SLE Workstation Extension 15 SP4, openSUSE Leap 15.4 0.18.9-150000.3.17.1
- libraw SLE Workstation Extension 12 SP5, SLE Software Development Kit 12 SP5 0.15.4-36.1
suse advisories SUSE-SU-2023:0512-1SUSE-SU-2023:0511-1SUSE-SU-2023:0510-1
- LibRaw AlmaLinux 8 0.19.5-4.el8
- LibRaw AlmaLinux 9 0.20.2-6.el9
almalinux advisories ALSA-2024:2994ALSA-2023:6343
- LibRaw Rocky Linux 8 0.19.5-4.el8
rocky linux advisories RLSA-2024:2994
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-32142 updated cvss 5.3
LibRaw: stack buffer overflow in LibRaw_buffer_datastream::gets() in src/libraw_datastream.cpp
-
Red Hat CodeReady Linux Builder (v. 9) LibRaw-devel 0.20.2-6.el9, LibRaw-debuginfo 0.20.2-6.el9, LibRaw-debugsource 0.20.2-6.el9, LibRaw-samples-debuginfo 0.20.2-6.el9fixed: vendor fix RHSA-2023:6343
-
Red Hat Enterprise Linux AppStream (v. 8) LibRaw 0.19.5-4.el8fixed: vendor fix RHSA-2024:2994
-
Red Hat Enterprise Linux AppStream (v. 9) LibRaw 0.20.2-6.el9fixed: vendor fix RHSA-2023:6343
-
Red Hat Enterprise Linux Client (v. 7) LibRaw 0.19.4-2.el7_9 Red Hat Enterprise Linux Client Optional (v. 7) LibRaw-devel 0.19.4-2.el7_9, LibRaw-static 0.19.4-2.el7_9, LibRaw-debuginfo 0.19.4-2.el7_9fixed: vendor fix RHSA-2024:0343
-
Red Hat Enterprise Linux CRB (v. 8) LibRaw-devel 0.19.5-4.el8, LibRaw-debuginfo 0.19.5-4.el8, LibRaw-debugsource 0.19.5-4.el8, LibRaw-samples-debuginfo 0.19.5-4.el8fixed: vendor fix RHSA-2024:2994
-
Red Hat Enterprise Linux Server (v. 7) LibRaw 0.19.4-2.el7_9 Red Hat Enterprise Linux Server Optional (v. 7) LibRaw-devel 0.19.4-2.el7_9, LibRaw-static 0.19.4-2.el7_9, LibRaw-debuginfo 0.19.4-2.el7_9 Red Hat Enterprise Linux Workstation (v. 7) LibRaw 0.19.4-2.el7_9 Red Hat Enterprise Linux Workstation Optional (v. 7) LibRaw-devel 0.19.4-2.el7_9, LibRaw-static 0.19.4-2.el7_9, LibRaw-debuginfo 0.19.4-2.el7_9fixed: vendor fix RHSA-2024:0343
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 19 mo ago
Exploit prediction
0.39% chance of exploitation in the next 30 days, higher than 33% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/LibRaw/LibRaw/issues/400 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CISA ADP | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| CNA | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Classification
- Weakness
-
- CWE-787 Out-of-bounds Write
References
-
github.com
/LibRaw/LibRaw/commit/bc3aaf4223fdb70d52d470dae65c5a7923ea2a49
patch
-
github.com
/LibRaw/LibRaw/issues/400
exploit, issue-tracking
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/E7TEZ7CLRNYYQZJ5NJGZXK6YJU46WH2L/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/5ICTVDRGBWGIFBTUWJLGX7QM5GWBWUG7/
vendor-advisory
-
debian.org
/security/2023/dsa-5412
vendor-advisory
-
github.com
/gtt1995
not-applicable
-
libraw.org
/
product
-
lists.debian.org
/debian-lts-announce/2023/05/msg00025.html
mailing-list
Sources
- CVE List CVE-2021-32142
- NVD CVE-2021-32142
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.