Memory Corruption Vulnerability in LibRaw

libraw Updated 02 Oct 2025

Summary

16/05/2017
N/A
Yes i
Critical
9.8

CVE-2017-6886: An error within the "parse_tiff_ifd()" function (internal/dcraw_common.cpp) in LibRaw versions before 0.18.2 can be exploited to corrupt memory. Affects libraw across 2 version ranges.

< 0.17.2-r1 < d7c3d2cb460be10a3ea7b32e9443a83c243b2251

Fixed in 0.17.2-r1. 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 Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

LibRaw is an open-source library for reading RAW files from digital cameras. It provides a set of functions and utilities to process and manipulate RAW image data. The library is widely used in various applications and frameworks that deal with RAW image processing. However, a vulnerability has been discovered in versions of LibRaw prior to 0.18.2, which can lead to memory corruption.

Vulnerability Detail

The vulnerability, identified as CVE-2017-6886, originates from an error within the 'parse_tiff_ifd()' function in the internal/dcraw_common.cpp file of LibRaw. This error can be exploited to corrupt memory. An attacker could potentially craft a malicious TIFF image file that, when processed by an application using LibRaw, triggers the vulnerability. This could result in arbitrary code execution or a denial of service condition. The severity of this vulnerability is rated as critical, with a CVSS score of 9.8.

How To Fix

Minimum fixed version

0.17.2-r1

This is the first release that contains the fix.

sudo apk add --upgrade 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 apply the official fix by updating to the patched version of LibRaw.

Conclusion

The memory corruption vulnerability in LibRaw (CVE-2017-6886) poses a significant risk to applications utilizing the library for RAW image processing. It is crucial to update to the fixed version (0.18.2 or later) to mitigate the vulnerability and ensure the security of the software. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for libraw →

Share this vulnerability

FAQ

LibRaw is an open-source library for reading RAW files from digital cameras. It provides functions and utilities to process and manipulate RAW image data.

The vulnerability allows an attacker to corrupt memory, potentially leading to arbitrary code execution or a denial of service condition.

Versions of LibRaw prior to 0.18.2 are affected by this vulnerability.

To fix this vulnerability, update LibRaw to version 0.18.2 or later.

No, there is no known workaround for this vulnerability. Updating to the patched version is the recommended solution.

Related vulnerabilities

Recent vulnerabilities recorded for libraw.

How To Fix

Minimum fixed version

0.17.2-r1

This is the first release that contains the fix.

sudo apk add --upgrade 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