Skip to main content

libvips CVE-2026-70654

| EUVDEUVD-2026-63656 MEDIUM
Heap-based Buffer Overflow (CWE-122)
2026-08-20 security-advisories@github.com
5.8
CVSS 4.0 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply crafted small PPM stream via custom VipsSource
  2. Delivery
    Trigger vips_source_read_to_memory read loop
  3. Exploit
    VIPS_MAX selects 4096 over remaining bytes
  4. Execution
    Write up to 4032 bytes past heap allocation
  5. Impact
    Heap corruption causes process crash or memory damage

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Heap buffer bounds checking
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires three simultaneous conditions: the target application must define and use a custom VipsSource object (not the standard libvips file or memory source), it must process untrusted or attacker-controlled uncompressed PPM image data through that source, and the attacker must have at least low-privileged local access or the ability to supply input to the image processing pipeline (PR:L, AV:L per CVSS 4.0). The AT:P metric (attack requirements present) confirms that a specific, non-default implementation pattern - custom source objects - must be in use. Standard libvips API consumers that do not define custom sources are not affected. Exploitation is further limited by high attack complexity (AC:H), meaning preconditions such as heap layout may need to be favorable. There is no requirement for user interaction (UI:N). The absence of confidentiality impact (VC:N) indicates the overflow does not expose memory contents in the standard exploitation path.

Impact

Real-world risk is constrained by the CVSS 4.0 vector AV:L/AC:H/AT:P/PR:L, which indicates local access, high attack complexity, specific prerequisite attack requirements (AT:P), and low-privilege access - all of which must align simultaneously. The primary impact is high availability loss (process crash) with only incidental integrity exposure (VI:L) and no confidentiality impact (VC:N). There is no CISA KEV listing and no known public exploit or proof-of-concept code, consistent with the narrow triggering conditions. EPSS data was not provided, but the constrained exploitation path suggests low probability of opportunistic exploitation. The most significant real-world risk applies to web services or pipelines that accept untrusted image uploads and route them through custom libvips source implementations for PPM parsing - a non-default configuration. Standard libvips users processing images via the conventional API are not affected by this code path. The patch is a one-line fix (VIPS_MAX to VIPS_MIN) confirmed by the upstream commit, and upgrading to 8.18.3 fully resolves the issue with no functional trade-offs.

Exploit ScenarioDerived

An attacker who can supply a crafted uncompressed PPM image file to a locally-running service that uses a custom libvips VipsSource object sends an image whose stream length is much smaller than 4096 bytes; during buffered reading, vips_source_read_to_memory computes VIPS_MAX instead of VIPS_MIN and writes up to 4032 bytes past the end of the allocated heap buffer. Depending on heap layout, this can corrupt adjacent allocations and crash the process, potentially requiring a service restart and causing denial of service. No public proof-of-concept code exists at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 20, 2026

Heap buffer overflow in libvips prior to 8.18.3 allows up to 4032 bytes to be written beyond an allocated heap buffer during processing of untrusted uncompressed PPM images via custom source objects, potentially causing memory corruption or a process crash. The flaw exists specifically in vips_source_read_to_memory in libvips/iofuncs/source.c, where VIPS_MAX was used instead of VIPS_MIN when computing the remaining read size. No public exploit code exists and this is not listed in CISA KEV; the CVSS 4.0 score of 5.8 reflects meaningful constraints including local attack vector, high complexity, and a prerequisite of non-default custom source configuration.

RemediationAI

Upgrade libvips to version 8.18.3 or later, as confirmed by the upstream GitHub release tag https://github.com/libvips/libvips/releases/tag/v8.18.3 and the fix commit https://github.com/libvips/libvips/commit/80e021c6cdda0f80b756c2109d99839c94c03258. For deployments where an immediate upgrade is not possible, compensating controls should target the specific triggering conditions: disable or avoid exposing the custom VipsSource code path to untrusted input, restrict processing of uncompressed PPM images from external or user-supplied sources (PPM is a rarely-used format in modern web workflows and may be safely blocked at ingress), and ensure the service processes images in an isolated subprocess or container so a triggered crash does not cascade into broader service disruption. The GitHub Security Advisory is available at https://github.com/libvips/libvips/security/advisories/GHSA-rjmm-3qch-m9rg for additional vendor context.

Affected VersionsENISA

libvips < 8.18.3

Affected Packages

euvd libvips fix: 8.18.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

libvips is a C-based image processing library (libvips project, GitHub) widely embedded in web application stacks for fast, low-memory image manipulation. The vulnerable code path is vips_source_read_to_memory() in libvips/iofuncs/source.c, which reads image data into a heap-allocated buffer. The commit diff confirms the root cause: the macro VIPS_MAX(4096, source->length - read_position) was used to select a read chunk size, but the semantically correct operation is VIPS_MIN - to cap the read at 4096 or the remaining bytes, whichever is smaller. With VIPS_MAX, when fewer than 4096 bytes remain, the function computes the maximum rather than the remainder, directing reads up to 4096 bytes from a buffer that may have far fewer bytes allocated, resulting in a heap overwrite of up to 4032 bytes. CWE-122 (Heap-based Buffer Overflow) accurately characterizes this as a classic heap write-past-end defect caused by wrong operator selection. The trigger requires uncompressed PPM image input through a custom-defined VipsSource object, which is not the default source type used by standard libvips API consumers.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (github) PRIMARY 5.8 MEDIUM
CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N
vuln.today AI 5.3 MEDIUM

Local access and custom source prerequisite drive AV:L and AC:H; PR:L reflects low-privilege requirement; primary impact is process crash (A:H) with minor heap integrity effect (I:L) and no confidentiality exposure.

3.1 AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H
4.0 AV:L/AC:H/AT:P/PR:L/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N
Red Hat 4.4 MEDIUM

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Local
Attack Complexity
High
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Aug 20, 2026 - 22:04 EUVD

DescriptionCVE.org

libvips is a fast image processing library with low memory needs. Prior to version 8.18.3, applications that define unusual custom libvips sources and use them to process untrusted uncompressed PPM images can trigger a max/min error in vips_source_read_to_memory in libvips/iofuncs/source.c. The function uses VIPS_MAX instead of VIPS_MIN when selecting the remaining read size, allowing up to 4032 bytes to be written beyond the allocated heap buffer and causing memory corruption or a process crash. This issue is fixed in version 8.18.3.

Threat Intelligence Overview

EPSS Score
0.1%
Top 98% exploitable
Prevalence
Medium
popular open-source image library, embedded in many web stacks
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

29
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +29
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

A heap overflow occurs when a program writes data beyond the bounds of a buffer allocated in the heap memory region.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy