Skip to content
Fencer Intel
high 7.8

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 3y ago modified 4mo 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

  • LibRaw Azure Linux 3.0 0.21.3-1

azure linux advisories AZL-45267

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Is CVE-2021-32142 in your stack? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

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.el9
    fixed: vendor fix RHSA-2023:6343
  • Red Hat Enterprise Linux AppStream (v. 8) LibRaw 0.19.5-4.el8
    fixed: vendor fix RHSA-2024:2994
  • Red Hat Enterprise Linux AppStream (v. 9) LibRaw 0.20.2-6.el9
    fixed: 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_9
    fixed: 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.el8
    fixed: 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_9
    fixed: 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
last yr.

Exploit prediction

0.39% chance of exploitation in the next 30 days, higher than 33% of all scored CVEs (FIRST EPSS, 2026-11-09).

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

References

Sources

Fencer Intel 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.