Executive summary
CVE-2026-140371 is an information disclosure vulnerability in ImageMagick's DJVU decoder. Processing a maliciously crafted DJVU file can expose uninitialized memory through the decoder's output. Depending on the application and its processing pipeline, an attacker may recover fragments of earlier images, buffers, file paths, or other transient data retained in the ImageMagick process.
The affected versions are ImageMagick before 6.9.13-61 and 7.x before 7.1.2-36. The vulnerability is remotely reachable in deployments that accept DJVU files supplied by untrusted parties, such as image-conversion APIs, thumbnail services, upload processors, and media-indexing systems.
NVD assigns a CVSS base score of 3.7, or Low severity. No active exploitation or public exploit code is identified in the supplied advisory, and CVE-2026-140371 is not listed in the CISA Known Exploited Vulnerabilities catalog. The disclosed data is limited to residual process memory, but that limitation may matter more in multi-tenant services where one customer's processing can occur alongside another customer's data.
Affected systems
The vulnerability affects:
- ImageMagick 6.x builds earlier than 6.9.13-61
- ImageMagick 7.x builds earlier than 7.1.2-36
Any application, server, container image, or downstream product that embeds one of these versions may be in scope when it processes attacker-controlled DJVU input. The source advisory does not identify specific downstream distributions, appliances, or third-party products, so operators should compare the version reported by their own ImageMagick installation against the relevant fixed release.
A vulnerable deployment is especially exposed when it:
- Accepts DJVU uploads from remote or untrusted users
- Returns decoded images or converted derivatives to the requester
- Processes multiple users' files in the same long-running ImageMagick process
- Stores processed output where an attacker can access it
Systems that reject DJVU files before decoding or prevent external users from reaching the affected coder are not exposed through the primary attack path.
Technical details
The defect lies in the handling of memory used during DJVU decoding. A crafted or malformed image can cause the decoder to return output that includes bytes never explicitly initialized for that image. Those bytes may retain residual contents from earlier heap or stack allocations, allowing information outside the supplied DJVU document to cross into the decoded result.
This creates a possible data flow from process memory to attacker-visible output:
- An attacker provides a crafted DJVU file to an ImageMagick-backed service.
- The service invokes the DJVU decoder.
- Uninitialized bytes enter the decoded image or related output buffer.
- The attacker obtains the image, a converted derivative, or another representation that preserves the leaked bytes.
The exact contents disclosed are not predictable in advance. They depend on the process history, allocator behavior, platform, and application architecture. Previously processed image fragments or temporary metadata are plausible exposures, while high-value credentials such as private keys are not the primary expected target.
Some workflows may unintentionally hide the leak by resizing, re-encoding, cropping, or otherwise regenerating the decoded pixel data. Other workflows may expose it directly by returning the original decoded bytes or by storing a lossless derivative that preserves them.
Real-world impact
The practical impact is generally limited because the issue affects confidentiality rather than integrity or availability. It also requires DJVU input to reach the vulnerable decoder, and useful leakage depends on the target process containing sensitive residual data at the time of decoding. The CVSS score of 3.7 and the absence of recorded exploitation support a Low severity assessment.
The risk can rise in shared or multi-tenant environments. A service that processes files for unrelated customers and returns the decoded result may enable cross-tenant disclosure even when the leaked material is limited. Repeated attempts could also increase the opportunity to collect varied memory fragments, although the supplied advisory does not quantify the reliability or extent of such collection.
Mitigation
Patch
Upgrade ImageMagick to 6.9.13-61 or 7.1.2-36, or to a later release containing the fix. Availability should be confirmed with the upstream project or the relevant distribution vendor before deployment.
Temporary workaround
If an upgrade cannot be completed promptly, disable DJVU handling through ImageMagick's policy.xml, typically by restricting the DJVU coder pattern within the policy configuration. This prevents the vulnerable decoder from processing DJVU files but may break legitimate workflows.
At the application boundary, rejecting DJVU uploads is another way to remove the vulnerable input path. Transcoding through a controlled process that does not preserve raw decoder output may reduce exposure, but it is less definitive than applying the fixed release or disabling the coder.
Detection and validation
Security teams can look for:
- Unusually high volumes of DJVU requests or processing activity
- DJVU uploads arriving from untrusted sources
- Decoder errors associated with malformed or unusual DJVU files
- Decoded test images containing unexpected data outside the expected image region
AddressSanitizer or MemorySanitizer testing with representative malformed inputs can help validate decoder behavior. Production monitoring alone cannot reliably distinguish leaked memory from legitimate image content.
Expert insight
The central security concern is not the ability to crash the decoder or alter an image, but the boundary violation created when uninitialized process memory becomes part of a user-visible result. In shared services, image bytes can become a transport for data belonging to an earlier request. That makes process isolation and data-retention behavior relevant alongside ordinary patch management.
The fixed-version cutoffs should not be treated as a substitute for service-level review. Applications differ in whether they return raw decoded content, regenerate it, invoke separate worker processes, or accept DJVU through indirect upload pipelines. Those architectural differences determine whether the flaw presents an isolated low-impact defect or a repeatable cross-request disclosure path.
No evidence in the supplied source indicates active exploitation, weaponized exploit code, or exploitation of the CISA Known Exploited Vulnerabilities catalog. For that reason, the issue is appropriately assessed as Low severity despite its network reachability.