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

CVE-2026-106110: ImageSharp TIFF Buffer Overflow Vulnerability

CVE-2026-106110 is a buffer overflow flaw in ImageSharp's TIFF CCITT Group 3 encoder affecting versions 2.0.0 to 4.1.1. Attackers can corrupt memory and crash processes through malicious image operations. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

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-106110 Overview

CVE-2026-106110 is an out-of-bounds write vulnerability [CWE-787] in ImageSharp, a widely used .NET 2D graphics library maintained by SixLabors. The flaw resides in the TIFF CCITT Group 3 encoder, which allocates an undersized compressed-data buffer when processing narrow 1-bit images. The TiffCcittCompressor.Initialize method fails to reserve enough space for row data and T4 end-of-line codes, allowing T4BitCompressor.CompressStrip to perform unchecked writes beyond the output buffer. The issue affects versions 2.0.0 through 4.1.1 and is fixed in version 4.1.2.

Critical Impact

An attacker-controlled encode or decode-and-re-encode operation can corrupt process memory and terminate the hosting process, leading to denial of service in any application processing untrusted TIFF content.

Affected Products

  • SixLabors ImageSharp versions 2.0.0 through 4.1.1
  • .NET applications performing TIFF encoding with TiffCompression.CcittGroup3Fax
  • Services performing decode-and-re-encode flows that inherit CCITT Group 3 metadata from attacker-supplied TIFF files

Discovery Timeline

  • 2026-10-06 - CVE-2026-106110 published to NVD
  • 2026-10-06 - Last updated in NVD database

Technical Details for CVE-2026-106110

Vulnerability Analysis

The vulnerability resides in the T4 CCITT Group 3 Fax compression path within the ImageSharp TIFF format handler. When the encoder initializes the output buffer for a strip, it computes an allocation size that does not account for the worst-case bit expansion of T4 end-of-line (EOL) markers combined with pixel terminating codes.

For narrow 1-bit images, the per-row overhead becomes proportionally large compared to the pixel data itself. The CompressStrip routine then writes compressed codes into the pre-allocated span without bounds verification, assuming the initial allocation was sufficient. Because the write destination is a managed Span<byte> backing a native memory pool buffer, overruns corrupt adjacent heap regions and typically cause the .NET runtime to terminate the process.

Root Cause

The root cause is an undersized buffer calculation in TiffCcittCompressor.Initialize. The original formula omitted the cumulative cost of the leading EOL marker, per-row EOL codes, and the maximum 13-bit terminating code required per pixel. The patch introduces GetMaximumEncodedBits, which models the true worst-case bit budget per strip.

Attack Vector

Exploitation requires the target application to encode a TIFF image using TiffCompression.CcittGroup3Fax, either by explicit selection or by inheriting the compression setting from decoded metadata. An attacker who can submit a crafted TIFF for processing, or trigger a re-encode of attacker-controlled dimensions, can force the undersized allocation and the subsequent out-of-bounds write.

text
// Patch excerpt - T4BitCompressor.cs: worst-case buffer sizing
+    /// <inheritdoc />
+    protected override long GetMaximumEncodedBits(int rowsPerStrip)
+    {
+        // A pixel can require a 13-bit terminating code. Each row can also require
+        // an 8-bit zero-length white run and a 12-bit EOL, plus the initial EOL.
+        return 12L + ((((long)this.Width * 13) + 20) * rowsPerStrip);
+    }
+
     private void WriteEndOfLine(Span<byte> compressedData)
     {
         if (this.useModifiedHuffman)

// Patch excerpt - T6BitCompressor.cs: companion fix for CCITT Group 4
+    protected override long GetMaximumEncodedBits(int rowsPerStrip)
+    {
+        // Alternating pixels use at most 29 bits per two-pixel horizontal mode.
+        // Allow 16 bits per pixel, row transition overhead, and the final 24-bit EOFB.
+        return ((((long)this.Width * 16) + 24) * rowsPerStrip) + 24;
+    }

Source: SixLabors/ImageSharp commit a9498c6

Detection Methods for CVE-2026-106110

Indicators of Compromise

  • Unexpected process termination in .NET services that process TIFF uploads, with crash dumps referencing T4BitCompressor.CompressStrip or TiffCcittCompressor frames.
  • Access violation or heap corruption events (System.AccessViolationException, fail-fast exits) correlated with inbound TIFF file processing.
  • Repeated submission of narrow-width TIFF images (small pixel widths with CCITT Group 3 Fax compression) from a single source.

Detection Strategies

  • Inventory .NET applications and dependencies for SixLabors.ImageSharp versions between 2.0.0 and 4.1.1 using software composition analysis.
  • Monitor application crash telemetry for stack traces originating in the ImageSharp TIFF encoder modules.
  • Inspect ingress TIFF payloads for Compression tag value 3 (CCITT T.4) combined with unusually small ImageWidth values before passing them to vulnerable services.

Monitoring Recommendations

  • Enable Windows Error Reporting or equivalent crash collection on hosts running image-processing workloads to capture faulting module data.
  • Instrument image-processing endpoints with request-level logging that records input image dimensions, compression type, and processing outcome.
  • Alert on repeated worker process restarts in containers or Kubernetes pods hosting image conversion services.

How to Mitigate CVE-2026-106110

Immediate Actions Required

  • Upgrade SixLabors.ImageSharp to version 4.1.2 or later across all affected projects and redeploy dependent services.
  • Audit application code for direct use of TiffCompression.CcittGroup3Fax and for decode-and-re-encode flows that preserve input compression metadata.
  • Reject or sanitize untrusted TIFF uploads at the gateway until all downstream consumers are patched.

Patch Information

The fix is delivered in ImageSharp Release v4.1.2 via Pull Request #3187 and commit a9498c6db3642ef92c712ebc81e706914ac16a95. Additional context is available in GitHub Security Advisory GHSA-j9gm-c75j-xc9q. The patch introduces a GetMaximumEncodedBits method that correctly sizes the compressed output buffer for both T4 (Group 3) and T6 (Group 4) encoders.

Workarounds

  • Override inherited TIFF compression metadata and force a safe compression type such as TiffCompression.Deflate or TiffCompression.Lzw on re-encode operations.
  • Validate input TIFF dimensions and compression tags, rejecting images that declare CCITT Group 3 Fax compression until the library is upgraded.
  • Isolate TIFF processing in a sandboxed worker process with automatic restart to limit the blast radius of memory corruption induced crashes.
bash
# Update the ImageSharp package reference to the patched version
dotnet add package SixLabors.ImageSharp --version 4.1.2

# Verify no vulnerable versions remain in the dependency graph
dotnet list package --include-transitive | grep -i ImageSharp

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.