Skip to main content
Vulnerability Database/CVE-2026-106111

CVE-2026-106111: ImageSharp Information Disclosure Flaw

CVE-2026-106111 is an information disclosure vulnerability in ImageSharp that allows attackers to expose process-local image data through malformed EXR files. This article covers technical details, affected versions, and mitigation.

Published:

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

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-106111 Overview

CVE-2026-106111 is an information disclosure vulnerability in SixLabors ImageSharp, a cross-platform 2D graphics library for .NET. The flaw affects versions 4.0.0 through 4.1.1 and resides in the OpenEXR (.exr) decoder. When ExrBaseDecompressor.UndoZipCompression accepts a ZIP or ZIPS inflate result shorter than the block's required size, the decoder still processes the full expected block from a pooled buffer. Residual bytes from a prior ImageSharp operation can then appear in the decoded pixels of an attacker-controlled EXR file. The issue is classified as [CWE-226] (Sensitive Information in Resource Not Removed Before Reuse).

Critical Impact

Applications that return decoded EXR pixels to untrusted clients may disclose process-local image data retained in reused buffers.

Affected Products

  • SixLabors.ImageSharp 4.0.0 through 4.1.1
  • Applications processing attacker-supplied OpenEXR files using the vulnerable versions
  • .NET services exposing decoded pixel output or re-encoded images to external users

Discovery Timeline

  • 2026-10-06 - CVE CVE-2026-106111 published to NVD
  • 2026-10-06 - Last updated in NVD database
  • Fixed version 4.1.2 released by SixLabors (Release v4.1.2)

Technical Details for CVE-2026-106111

Vulnerability Analysis

The vulnerability affects the EXR format decompression path in ImageSharp. ExrBaseDecompressor.UndoZipCompression reads from a BufferedReadStream and inflates the ZIP or ZIPS compressed scanline block. The previous check only rejected the result when totalRead == 0, which allowed non-empty but short inflate outputs to pass validation. ZipExrCompression.Decompress then reconstructed the returned prefix, but ExrDecoderCore continued to process the full expected block.

The destination span is obtained from the pooled memory manager via Configuration.Default. Because pool buffers are not zeroed between allocations, any trailing bytes beyond the inflated prefix contain residual data from an earlier ImageSharp operation. Those residual bytes are then interpreted as valid half-float or float pixel samples in the final decoded output.

Root Cause

The root cause is improper validation of inflate output length combined with reuse of a non-cleared buffer. The decoder trusted a non-zero totalRead as sufficient, violating the invariant that the uncompressed block must equal uncompressedBytes. Similar issues existed in sibling decompressors such as NoneExrCompression and B44ExrCompression, which did not receive or honor the uncompressedBytes parameter when reading partial scanline blocks.

Attack Vector

An attacker crafts a malicious EXR image whose ZIP or ZIPS compressed scanline blocks inflate to fewer bytes than the header advertises. The attacker submits the file to any service that decodes EXR with a vulnerable ImageSharp version and returns the decoded or re-encoded output. Successful decode yields pixels that contain fragments of memory previously used by the same process, potentially including prior image data, metadata, or other sensitive buffers.

text
// Patch: src/ImageSharp/Formats/Exr/Compression/ExrBaseDecompressor.cs
             totalRead += bytesRead;
         }
 
-        if (totalRead == 0)
+        if (totalRead != uncompressedBytes)
         {
             ExrThrowHelper.ThrowInvalidImageContentException("Could not read enough data for zip compressed EXR image data!");
         }

Source: ImageSharp commit 3c43cf5

text
// Patch: src/ImageSharp/Formats/Exr/Compression/Decompressors/NoneExrCompression.cs
-    public override void Decompress(BufferedReadStream stream, uint compressedBytes, Span<byte> buffer)
+    public override void Decompress(BufferedReadStream stream, uint compressedBytes, uint uncompressedBytes, Span<byte> buffer)
     {
-        int bytesRead = stream.Read(buffer, 0, Math.Min(buffer.Length, (int)this.BytesPerBlock));
-        if (bytesRead != (int)this.BytesPerBlock)
+        int bytesRead = stream.Read(buffer[..(int)uncompressedBytes]);
+        if (bytesRead != uncompressedBytes)
         {
             ExrThrowHelper.ThrowInvalidImageContentException("Could not read enough pixel data from the stream!");
         }

Source: ImageSharp commit 6ed2a27

Detection Methods for CVE-2026-106111

Indicators of Compromise

  • Inbound EXR files whose ZIP or ZIPS compressed blocks inflate to fewer bytes than the scanline block size declared in the header.
  • Decoded images that contain visually anomalous pixel bands inconsistent with the surrounding content, suggesting residual buffer data.
  • Application exceptions from ExrThrowHelper.ThrowInvalidImageContentException after upgrading to 4.1.2, indicating prior malformed inputs.

Detection Strategies

  • Inventory .NET build outputs and container images for SixLabors.ImageSharp.dll with assembly version between 4.0.0 and 4.1.1.
  • Add software composition analysis rules that flag ImageSharp package references below 4.1.2 in csproj, packages.lock.json, and NuGet lockfiles.
  • Instrument the EXR decoding path to log blocks where inflate length is less than the declared uncompressed size.

Monitoring Recommendations

  • Alert on repeated EXR upload failures or malformed EXR exceptions originating from a single source address.
  • Track outbound responses that return decoded or transcoded images from EXR inputs for anomalous entropy or size patterns.
  • Correlate image processing worker memory contents with upload sources to detect probing for residual data.

How to Mitigate CVE-2026-106111

Immediate Actions Required

  • Upgrade SixLabors.ImageSharp to version 4.1.2 or later across all applications and container images.
  • Rebuild and redeploy any .NET services that embed ImageSharp statically or via self-contained publish.
  • Audit public-facing endpoints that accept EXR uploads and temporarily disable EXR decoding where upgrade is not immediately possible.

Patch Information

The fix is included in ImageSharp v4.1.2 and tracked in pull request #3187 and GHSA-4q3p-rj5x-xv7p. The patch enforces that inflated output equals the expected uncompressedBytes and propagates the uncompressed size to all EXR decompressor implementations.

Workarounds

  • Remove EXR from the list of accepted image formats in upload and transcoding pipelines until patching is complete.
  • Validate uploaded files by MIME type and magic bytes, rejecting EXR (0x76 0x2F 0x31 0x01) at the edge.
  • Isolate image decoding workers in short-lived processes or containers so pooled memory does not persist across requests.
bash
# Upgrade ImageSharp in a .NET project
dotnet add package SixLabors.ImageSharp --version 4.1.2
dotnet restore
dotnet build --configuration Release

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

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.