CVE-2025-50952

6.5 MEDIUM

📋 TL;DR

This CVE describes a NULL pointer dereference vulnerability in openjpeg v2.5.0's DWT component that can cause denial of service. Attackers can crash applications using the library by providing specially crafted JPEG2000 images. This affects any software or system using vulnerable versions of the openjpeg library for JPEG2000 image processing.

💻 Affected Systems

Products:
  • openjpeg
  • software using libopenjp2 library
Versions: openjpeg version 2.5.0
Operating Systems: All platforms running vulnerable openjpeg versions
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using the openjpeg library for JPEG2000 image processing is vulnerable when processing untrusted images.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete application crash leading to denial of service, potentially disrupting critical image processing workflows or services.

🟠

Likely Case

Application crash when processing malicious JPEG2000 images, requiring restart of affected services.

🟢

If Mitigated

Minimal impact with proper input validation and sandboxing of image processing operations.

🌐 Internet-Facing: MEDIUM - Applications accepting user-uploaded JPEG2000 images could be crashed, but requires specific image format exploitation.
🏢 Internal Only: LOW - Requires internal users to process malicious JPEG2000 images, which is less likely in controlled environments.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires crafting a malicious JPEG2000 image that triggers the NULL pointer dereference. No authentication bypass needed if application accepts image uploads.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: openjpeg version 2.5.1 or later

Vendor Advisory: https://github.com/uclouvain/openjpeg/issues/1505

Restart Required: No

Instructions:

1. Update openjpeg to version 2.5.1 or later using your package manager. 2. For Debian/Ubuntu: sudo apt update && sudo apt upgrade libopenjp2-7. 3. Recompile any applications statically linked to openjpeg with the patched library.

🔧 Temporary Workarounds

Input validation and sanitization

all

Implement strict validation of JPEG2000 images before processing, rejecting malformed or suspicious files.

Sandbox image processing

all

Run openjpeg image processing in isolated containers or sandboxes to limit impact of crashes.

🧯 If You Can't Patch

  • Implement network segmentation to isolate systems using openjpeg from untrusted networks
  • Deploy web application firewalls to block malicious JPEG2000 file uploads

🔍 How to Verify

Check if Vulnerable:

Check openjpeg version: dpkg -l | grep libopenjp2 or openjp2 --version

Check Version:

openjp2 --version

Verify Fix Applied:

Verify version is 2.5.1 or later: openjp2 --version | grep -q '2.5.[1-9]\|2.[6-9]\|[3-9]'

📡 Detection & Monitoring

Log Indicators:

  • Application crashes with segmentation faults when processing JPEG2000 images
  • Error logs containing 'SIGSEGV' or 'segmentation fault' in openjpeg context

Network Indicators:

  • Unusual spikes in JPEG2000 file uploads followed by service restarts

SIEM Query:

source="application.logs" AND ("segmentation fault" OR "SIGSEGV") AND "openjpeg"

🔗 References

📤 Share & Export