The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-25988

CVE-2026-25988: ImageMagick Use-After-Free Vulnerability

CVE-2026-25988 is a use-after-free vulnerability in ImageMagick that causes memory leaks when msl.c fails to update stack indexes. This article covers the technical details, affected versions, security impact, and mitigation.

Published: February 27, 2026

CVE-2026-25988 Overview

A memory leak vulnerability has been identified in ImageMagick, the widely-used open-source image processing software suite. The vulnerability exists in msl.c where the stack index fails to update properly under certain conditions, causing images to be stored in incorrect slots and never freed when errors occur. This leads to memory leaks that can be exploited to cause denial of service through resource exhaustion.

Critical Impact

Attackers can exploit this memory leak vulnerability remotely without authentication to cause denial of service conditions by exhausting available memory resources on systems running vulnerable ImageMagick versions.

Affected Products

  • ImageMagick versions prior to 7.1.2-15
  • ImageMagick versions prior to 6.9.13-40
  • Applications and services that process images using vulnerable ImageMagick libraries

Discovery Timeline

  • 2026-02-24 - CVE-2026-25988 published to NVD
  • 2026-02-25 - Last updated in NVD database

Technical Details for CVE-2026-25988

Vulnerability Analysis

This vulnerability is classified as CWE-401 (Missing Release of Memory after Effective Lifetime), a memory leak condition that occurs within ImageMagick's MSL (Magick Scripting Language) processing component. The flaw stems from improper stack index management during image processing operations.

When processing certain image operations, the msl.c component fails to properly update its internal stack index tracking mechanism. This causes images to be stored in incorrect memory slots during error conditions. Since the images are stored in the wrong slot, the error handling code cannot properly locate and free them, resulting in orphaned memory allocations that persist until the process terminates.

The vulnerability is network-accessible, meaning attackers can trigger it by submitting specially crafted image files or MSL scripts to applications that use ImageMagick for image processing. This is particularly concerning for web applications that allow user-uploaded images to be processed by ImageMagick.

Root Cause

The root cause lies in the improper synchronization between the stack index state and the actual storage location of image objects within msl.c. During error handling paths, the code assumes the current stack index points to the allocated image, but due to the missing update, the image resides in a different slot. The cleanup routine then operates on the wrong memory location, leaving the actual image allocation unreleased.

Attack Vector

The attack vector is network-based and requires no authentication or user interaction. An attacker can exploit this vulnerability by:

  1. Crafting malicious image files or MSL scripts designed to trigger error conditions in the vulnerable code path
  2. Submitting these files to any service that processes images using vulnerable ImageMagick versions
  3. Repeatedly triggering the vulnerability to gradually exhaust server memory
  4. Causing denial of service when memory resources are depleted

The vulnerability mechanism involves the MSL parser's stack management during image processing operations. When errors occur in specific processing paths, the stack index is not properly decremented or updated, causing a mismatch between expected and actual image storage locations. Technical details can be found in the GitHub Security Advisory.

Detection Methods for CVE-2026-25988

Indicators of Compromise

  • Abnormal memory growth in processes using ImageMagick libraries
  • Gradual memory exhaustion on servers processing user-uploaded images
  • Process crashes or OOM (Out of Memory) killer events related to ImageMagick processes
  • Increased swap usage correlating with image processing activity

Detection Strategies

  • Monitor ImageMagick process memory usage for unusual growth patterns over time
  • Implement memory consumption thresholds and alerts for image processing services
  • Log and analyze image processing errors, particularly those involving MSL operations
  • Deploy application-level monitoring to track memory allocation patterns

Monitoring Recommendations

  • Configure system monitoring to alert on processes exceeding expected memory thresholds
  • Implement process-level resource limits (cgroups, ulimit) to contain memory leak impact
  • Monitor for repeated image processing failures that might indicate exploitation attempts
  • Track memory utilization trends on systems running ImageMagick-dependent applications

How to Mitigate CVE-2026-25988

Immediate Actions Required

  • Upgrade ImageMagick to version 7.1.2-15 or later for the 7.x branch
  • Upgrade ImageMagick to version 6.9.13-40 or later for the 6.x branch
  • Implement memory limits for ImageMagick processes as a temporary measure
  • Review and restrict image processing capabilities to only required formats

Patch Information

The ImageMagick project has released patched versions that correct the stack index management issue in msl.c. The fix ensures proper synchronization between stack index updates and image storage operations, preventing orphaned allocations during error conditions.

Patched Versions:

  • ImageMagick 7.1.2-15 and later (7.x branch)
  • ImageMagick 6.9.13-40 and later (6.x branch)

For detailed information about the vulnerability and the patch, refer to the GitHub Security Advisory GHSA-782x-jh29-9mf7.

Workarounds

  • Implement process-level memory limits using cgroups or container resource constraints
  • Configure ImageMagick policy.xml to disable MSL processing if not required
  • Deploy process watchdogs to restart ImageMagick-dependent services if memory thresholds are exceeded
  • Consider using isolated containers for image processing to limit blast radius of memory exhaustion
bash
# Configuration example - Limit ImageMagick resource usage via policy.xml
# Edit /etc/ImageMagick-7/policy.xml or /etc/ImageMagick-6/policy.xml

# Add memory limits to prevent DoS from memory leaks
<policy domain="resource" name="memory" value="256MiB"/>
<policy domain="resource" name="map" value="512MiB"/>
<policy domain="resource" name="disk" value="1GiB"/>

# Disable MSL if not required by your application
<policy domain="coder" rights="none" pattern="MSL"/>

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeUse After Free

  • Vendor/TechImagemagick

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-401
  • Technical References
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-28687: ImageMagick Use-After-Free Vulnerability

  • CVE-2026-28688: ImageMagick Use-After-Free Vulnerability

  • CVE-2026-28691: ImageMagick Use-After-Free Vulnerability

  • CVE-2026-25983: ImageMagick Use-After-Free Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English