LibRaw Stack Buffer Overflow Vulnerability

LibRaw Updated 02 Oct 2025

Summary

07/11/2023
N/A
Yes i
Unrated
Not published

ALSA-2023:6343: Moderate: LibRaw security update. Affects LibRaw versions < 0.20.2-6.el9. Fixed in 0.20.2-6.el9. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

LibRaw is a library designed for reading RAW files from digital photo cameras. It supports various file formats such as CRW/CR2, NEF, RAF, and DNG. The library provides functionality to extract and process data from these files. However, a vulnerability has been discovered in LibRaw that could allow an attacker to trigger a stack buffer overflow.

Vulnerability Detail

The vulnerability (CVE-2021-32142) exists in the LibRaw_buffer_datastream::gets() function in the src/libraw_datastream.cpp file. Due to improper input validation, an attacker can exploit this vulnerability by providing a specially crafted input, leading to a stack buffer overflow. This could potentially result in arbitrary code execution or a denial of service condition. The impact of this vulnerability is considered moderate.

How To Fix

Minimum fixed version

0.20.2-6.el9

This is the first release that contains the fix.

sudo dnf update LibRaw

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to update to the patched version of LibRaw to mitigate the risk.

Conclusion

The LibRaw stack buffer overflow vulnerability (CVE-2021-32142) poses a moderate risk to systems using the affected versions of LibRaw. To mitigate this vulnerability, it is crucial to update to version 0.20.2-6.el9 or later. Applying the necessary security updates will ensure that the stack buffer overflow issue is addressed. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for LibRaw →

Share this vulnerability

FAQ

LibRaw is a library used for reading RAW files from digital photo cameras. It supports various file formats and provides functionality to extract and process data from these files.

The vulnerability could allow an attacker to trigger a stack buffer overflow, potentially leading to arbitrary code execution or a denial of service condition. The impact is considered moderate.

To fix this vulnerability, update LibRaw to version 0.20.2-6.el9 or later. Apply any available security updates to ensure you are using the latest patched version.

No, there is no known workaround for this vulnerability. Updating to the patched version of LibRaw is necessary to mitigate the risk.

You can find more information about this vulnerability, including the CVE identifier, in the AlmaLinux Release Notes linked in the References section of the advisory.

Related vulnerabilities

Recent vulnerabilities recorded for LibRaw.

How To Fix

Minimum fixed version

0.20.2-6.el9

This is the first release that contains the fix.

sudo dnf update LibRaw

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback