Heap Buffer Overflow Vulnerability in libvips

libvips Updated 02 Oct 2025

Summary

06/01/2025
MEDIUM
Yes i
Medium
Not published

OSV-2025-6: Heap-buffer-overflow in next_marker. Affects libvips versions >= 7b47b07bcd0583c4f9d4afaac85d3abb5008edff, < 4689cda680c2b59bf8dca0b856fb58087196f60a. Fixed in 4689cda680c2b59bf8dca0b856fb58087196f60a. 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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

libvips is an open-source image processing library that is designed for high performance and low memory usage. It is widely used for processing large images and supports various image formats. However, like many libraries, it can be susceptible to vulnerabilities that may compromise its functionality and security. The specific vulnerability in question is a heap buffer overflow, which can lead to unexpected behavior or crashes in applications that utilize this library.

Vulnerability Detail

The vulnerability identified as OSV-2025-6 is a heap buffer overflow occurring in the 'next_marker' function of the libvips library. This issue was reported through OSS-Fuzz, indicating that it can lead to a crash or potentially allow for arbitrary code execution if exploited. The crash state shows that the overflow happens during the reading and consuming of markers, which can be triggered by malformed input data. This vulnerability poses a medium severity risk, as it can affect the stability and security of applications relying on libvips.

How To Fix

Minimum fixed version

4689cda680c2b59bf8dca0b856fb58087196f60a

This is the first release that contains the fix.

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

Workaround

As a temporary workaround, you can validate and sanitize input data before processing it with libvips to prevent malformed data from triggering the vulnerability. This can be done by implementing checks on the input format and size before passing it to the library functions.

Conclusion

The heap buffer overflow vulnerability in libvips poses a medium risk to applications using this library. It is crucial to update to the patched version to mitigate potential security risks. Additionally, implementing input validation can serve as a temporary workaround while the update is applied.

See every vulnerability recorded for libvips →

Share this vulnerability

FAQ

A heap buffer overflow occurs when a program writes more data to a buffer located on the heap than it was allocated for, potentially overwriting adjacent memory and leading to crashes or security vulnerabilities.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. By simply uploading your manifest file like package-lock.json, you can check if your application is affected by this vulnerability.

The consequences can include application crashes, data corruption, or even arbitrary code execution if an attacker exploits the vulnerability.

Yes, validating and sanitizing input data before processing it with libvips can help prevent exploitation of this vulnerability.

You can find more information about libvips on its official GitHub repository and check for reported vulnerabilities on platforms like OSS-Fuzz and Vulert.

Related vulnerabilities

Recent vulnerabilities recorded for libvips.

How To Fix

Minimum fixed version

4689cda680c2b59bf8dca0b856fb58087196f60a

This is the first release that contains the fix.

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