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-2025-54874

CVE-2025-54874: Uclouvain OpenJPEG Buffer Overflow Flaw

CVE-2025-54874 is a buffer overflow vulnerability in Uclouvain OpenJPEG that causes out-of-bounds heap memory writes in versions 2.5.1 through 2.5.3. This article covers technical details, affected versions, and mitigation.

Published: March 11, 2026

CVE-2025-54874 Overview

CVE-2025-54874 is an out-of-bounds heap memory write vulnerability affecting OpenJPEG, the open-source JPEG 2000 codec library. The vulnerability exists in OpenJPEG versions 2.5.1 through 2.5.3, where a call to opj_jp2_read_header may lead to out-of-bounds heap memory write when the data stream p_stream is too short and p_image is not initialized. This type of memory corruption vulnerability can potentially be exploited to achieve arbitrary code execution or cause application crashes.

Critical Impact

Uninitialized memory use combined with out-of-bounds heap write in OpenJPEG's JPEG 2000 header parsing can lead to memory corruption, potentially enabling code execution or denial of service when processing maliciously crafted JP2 files.

Affected Products

  • uclouvain openjpeg versions 2.5.1 through 2.5.3

Discovery Timeline

  • 2025-08-05 - CVE-2025-54874 published to NVD
  • 2025-09-26 - Last updated in NVD database

Technical Details for CVE-2025-54874

Vulnerability Analysis

The vulnerability stems from improper error handling in the opj_jp2_read_header function within the OpenJPEG library. When parsing a JPEG 2000 file header, the function fails to properly validate the return status before proceeding to access the image structure. If the data stream p_stream is truncated or malformed, the parsing operation may fail, leaving p_image in an uninitialized state. Subsequent code then attempts to set image color space properties on this uninitialized memory, resulting in an out-of-bounds heap write condition.

This vulnerability is classified under CWE-457 (Use of Uninitialized Variable), as the core issue involves accessing and writing to memory that has not been properly initialized due to insufficient error checking after the header parsing operation.

Root Cause

The root cause lies in the opj_jp2_read_header function in src/lib/openjp2/jp2.c. The original code checked if p_image and *p_image were valid pointers before setting color space properties, but it failed to verify that the preceding header parsing operation actually succeeded. This means that even when the parsing function returns an error (indicated by ret being false), the code would proceed to access and modify the image structure if the pointer happened to be non-null, leading to undefined behavior and potential heap corruption.

Attack Vector

The attack vector for this vulnerability requires local access, where an attacker must convince a user or application to process a specially crafted JPEG 2000 file. The attack scenario involves:

  1. An attacker creates a malicious JP2 file with a truncated or malformed data stream
  2. When OpenJPEG attempts to parse the header, the operation fails
  3. Due to missing error validation, the code proceeds to write to uninitialized memory
  4. This can result in heap corruption, potentially leading to code execution or application crash

The following patch addresses the vulnerability by ensuring the return status is checked before accessing the image structure:

c
                               p_image,
                               p_manager);
 
-    if (p_image && *p_image) {
+    if (ret && p_image && *p_image) {
         /* Set Image Color Space */
         if (jp2->enumcs == 16) {
             (*p_image)->color_space = OPJ_CLRSPC_SRGB;

Source: GitHub Commit Update

Detection Methods for CVE-2025-54874

Indicators of Compromise

  • Unexpected application crashes when processing JPEG 2000 (JP2, J2K) files
  • Memory access violations or segmentation faults in applications using OpenJPEG library
  • Presence of malformed or truncated JP2 files with abnormally short data streams
  • Anomalous heap corruption patterns in application memory during image processing

Detection Strategies

  • Monitor for crashes or exceptions in applications that utilize OpenJPEG for JPEG 2000 processing
  • Implement file integrity checks to detect truncated or malformed JP2 files before processing
  • Use memory sanitizers (AddressSanitizer, Valgrind) during development to detect heap corruption
  • Deploy endpoint detection to identify exploitation attempts targeting image processing libraries

Monitoring Recommendations

  • Enable crash dump collection for applications processing JPEG 2000 files to analyze potential exploitation attempts
  • Monitor system logs for repeated failures in image processing workflows
  • Implement anomaly detection for unusual patterns in JP2 file processing operations
  • Track OpenJPEG library versions across your environment to identify vulnerable installations

How to Mitigate CVE-2025-54874

Immediate Actions Required

  • Update OpenJPEG to a patched version that includes commit f809b80c67717c152a5ad30bf06774f00da4fd2d
  • Audit applications in your environment that depend on OpenJPEG versions 2.5.1 through 2.5.3
  • Implement input validation on JP2 files before processing to reject malformed or truncated files
  • Consider temporarily disabling JPEG 2000 processing in non-critical workflows until patched

Patch Information

The vulnerability has been addressed by the OpenJPEG maintainers. The fix ensures that the return status from header parsing is validated before any subsequent operations on the image structure. The patch is available via GitHub Commit Update. Additional technical discussion can be found in GitHub Pull Request #1573 and the associated GitHub Security Advisory GHSL-2025-057.

Workarounds

  • Validate JPEG 2000 file integrity and size before passing to OpenJPEG for processing
  • Implement application sandboxing to limit the impact of potential exploitation
  • Use file type validation to ensure JP2 files meet minimum size and structure requirements
  • Restrict processing of JPEG 2000 files from untrusted sources until the patch is applied
bash
# Check OpenJPEG version in your environment
opj_decompress -h 2>&1 | grep -i version

# Update OpenJPEG via package manager (example for apt)
sudo apt update && sudo apt install --only-upgrade libopenjp2-7

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

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechUclouvain Openjpeg

  • SeverityMEDIUM

  • CVSS Score6.6

  • EPSS Probability0.07%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-457
  • Technical References
  • GitHub Pull Request #1573

  • GitHub Security Advisory GHSL-2025-057
  • Vendor Resources
  • GitHub Commit Update
  • Related CVEs
  • CVE-2020-27844: Openjpeg Buffer Overflow Vulnerability
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