CVE & CISA-KEV Catalog

CVE-2021-32142

HIGH
7.8
CVSS v3
NVD

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.

How to fix

Remediation Available
librawDebian
Fixed in:0.20.2-1+deb11u1CVE-2021-32142
Fixed in:0.20.2-2.1CVE-2021-32142
Fixed in:0.20.2-2.1CVE-2021-32142
Fixed in:0.20.2-2.1CVE-2021-32142
LibRawRocky
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
LibRawRed Hat / RHEL
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
LibRaw-debuginfoRed Hat / RHEL
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
LibRaw-debuginfoRocky
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
LibRaw-debugsourceRocky
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
LibRaw-debugsourceRed Hat / RHEL
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
LibRaw-develRocky
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
LibRaw-develRed Hat / RHEL
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
LibRaw-samples-debuginfoRed Hat / RHEL
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
LibRaw-samples-debuginfoRocky
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.19.5-4.el8RHSA-2024:2994
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
Fixed in:0:0.20.2-6.el9RHSA-2023:6343
LibRaw-staticRocky
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
LibRaw-staticRed Hat / RHEL
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
Fixed in:0:0.19.4-2.el7_9RHSA-2024:0343
digikamUbuntu
Fixed in:4:4.12.0-0ubuntu7+esm1USN-7266-1
Fixed in:4:5.6.0-0ubuntu10+esm1USN-7266-1
Fixed in:4:6.4.0+dfsg-3ubuntu0.1~esm1USN-7266-1
Fixed in:4:7.5.0-3ubuntu0.1~esm1USN-7266-1
librawUbuntu
Fixed in:0.19.5-1ubuntu1.2USN-6137-1
Fixed in:0.20.2-2ubuntu2.22.04.1USN-6137-1
Fixed in:0.20.2-2ubuntu2.22.10.1USN-6137-1
Fixed in:0.20.2-2ubuntu2.23.04.1USN-6137-1
libraw19Ubuntu
Fixed in:0.19.5-1ubuntu1.2USN-6137-1
libraw20Ubuntu
Fixed in:0.20.2-2ubuntu2.22.04.1USN-6137-1
Fixed in:0.20.2-2ubuntu2.22.10.1USN-6137-1
Fixed in:0.20.2-2ubuntu2.23.04.1USN-6137-1
showfotoUbuntu
Fixed in:4:4.12.0-0ubuntu7+esm1USN-7266-1
Fixed in:4:5.6.0-0ubuntu10+esm1USN-7266-1
Fixed in:4:6.4.0+dfsg-3ubuntu0.1~esm1USN-7266-1
Fixed in:4:7.5.0-3ubuntu0.1~esm1USN-7266-1

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorLocal
Attack ComplexityLow
Privileges RequiredNone
User InteractionRequired
ScopeUnchanged

Impact

ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Exploit Intelligence

0.42%probability of exploitation in 30 days
34thpercentile

Low risk: more likely to be exploited than 34% of all known CVEs.

References

Related Vulnerabilities

Other CWE-787 (Out-of-bounds Write) vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2025-22457Critical9.0100%KEV + RansomFix
CVE-2025-0282Critical9.0100%KEV + Ransom-
CVE-2015-3113Critical9.8100%KEVFix
CVE-2021-20038Critical9.8100%KEV + Ransom-
CVE-2023-4863High8.8100%KEVFix
CVE-2020-16040Medium6.5100%-Fix
Embed a live status badge for CVE-2021-32142
CVE-2021-32142 severity badge

Markdown

[![CVE-2021-32142](https://tridentstack.com/cve/badge/CVE-2021-32142.svg)](https://tridentstack.com/cve/CVE-2021-32142)

HTML

<a href="https://tridentstack.com/cve/CVE-2021-32142"><img src="https://tridentstack.com/cve/badge/CVE-2021-32142.svg" alt="CVE-2021-32142"></a>

Find and fix vulnerabilities across your fleet

TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.

Start free

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2025-03-19.