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

CVE-2026-106117: ImageSharp TIFF Buffer Overflow Vulnerability

CVE-2026-106117 is a buffer overflow flaw in ImageSharp that occurs when decoding TIFF images with CCITT Group 3 or Modified Huffman compression. This post covers technical details, affected versions, impact, 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-106117 Overview

CVE-2026-106117 is an out-of-bounds write vulnerability [CWE-787] in SixLabors ImageSharp, a widely used .NET 2D graphics library. The flaw affects versions 3.0.0 through 4.1.0 and resides in the TIFF decoder's handling of CCITT Group 3 and Modified Huffman compression. An attacker-crafted strip TIFF can force the decoder to write expanded pixel runs beyond the strip buffer, corrupting heap memory and terminating the process. The issue is remotely triggerable through any application that decodes untrusted TIFF images with ImageSharp.

Critical Impact

Processing a malicious TIFF image can corrupt heap memory and crash the host process, producing a reliable denial-of-service condition against services that accept user-supplied images.

Affected Products

  • SixLabors ImageSharp 3.0.0 through 4.1.0
  • Applications and services embedding vulnerable ImageSharp builds for TIFF decoding
  • .NET workloads that accept untrusted user-supplied TIFF images

Discovery Timeline

  • 2026-10-06 - CVE-2026-106117 published to the National Vulnerability Database
  • 2026-10-06 - Last updated in NVD database

Technical Details for CVE-2026-106117

Vulnerability Analysis

The vulnerability lives in the TIFF strip decompression path for CCITT Group 3 (T4) and Modified Huffman compression. Decoded CCITT runs are untrusted length values controlled by the input stream. The decoder passed these expanded runs directly to BitWriterUtils.WriteBits without verifying that the run would fit within the remaining row width.

Two call sites are affected. T4TiffCompression.WritePixelRun accumulates oversized makeup-code runs before writing. ModifiedHuffmanTiffCompression.Decompress validates the row width only after it has already written the pixels. Both paths allow an attacker to overflow the strip buffer, producing heap corruption and process termination. The advisory distinguishes this strip-path flaw from a separate tiled decompressor width mismatch issue.

Root Cause

The root cause is missing input validation on decoded run lengths before they drive an unchecked bit writer. CCITT makeup codes can encode very large run values, and the decoder trusted those values without comparing them against this.Width - pixelsWritten for the current row.

Attack Vector

Exploitation requires only that a vulnerable application decode an attacker-supplied TIFF file. Image upload endpoints, thumbnail generators, document pipelines, and server-side image conversion workflows are all viable entry points. No authentication or user interaction is required when the service accepts anonymous uploads.

text
// Patch: src/ImageSharp/Formats/Tiff/Compression/Decompressors/ModifiedHuffmanTiffCompression.cs
            if (bitReader.RunLength > 0)
            {
+                // A decoded run is untrusted and must fit the current row before the unchecked bit writer is used.
+                if (bitReader.RunLength > (nuint)this.Width - pixelsWritten)
+                {
+                    TiffThrowHelper.ThrowImageFormatException("CCITT compression parsing error: decoded more pixels than the image width.");
+                }
+
                if (bitReader.IsWhiteRun)
                {
                    BitWriterUtils.WriteBits(buffer, bitsWritten, (int)bitReader.RunLength, this.whiteValue);

Source: GitHub Commit e8892ec

The fix adds a bounds check that compares the decoded RunLength against the remaining row width and throws TiffThrowHelper.ThrowImageFormatException before any write occurs. A companion change in T4BitReader.cs tightens the invalid code length error path:

text
// Patch: src/ImageSharp/Formats/Tiff/Compression/Decompressors/T4BitReader.cs
            if (this.CurValueBitsRead > this.maxCodeLength)
            {
-                TiffThrowHelper.ThrowImageFormatException("ccitt compression parsing error: invalid code length read");
+                TiffThrowHelper.ThrowImageFormatException("CCITT compression parsing error: invalid code length read.");
            }

            bool isMakeupCode = this.IsMakeupCode();

Source: GitHub Commit e8892ec

Detection Methods for CVE-2026-106117

Indicators of Compromise

  • Unexpected crashes or heap corruption termination of .NET processes that decode TIFF content, often correlated with recently uploaded images.
  • Application logs containing TiffImageFormatException or stack traces referencing T4TiffCompression.WritePixelRun, ModifiedHuffmanTiffCompression.Decompress, or BitWriterUtils.WriteBits.
  • TIFF files whose declared image width is inconsistent with large CCITT makeup-code runs encountered during decoding.

Detection Strategies

  • Inventory .NET build artifacts for SixLabors.ImageSharp versions between 3.0.0 and 4.1.0 using software composition analysis.
  • Monitor image-processing microservices for abnormal process exit codes and worker restarts following TIFF uploads.
  • Hunt for TIFF files uploaded prior to a crash and retain them for offline analysis in an isolated sandbox.

Monitoring Recommendations

  • Alert on repeated unhandled exceptions originating from the ImageSharp TIFF decoder across web front ends and queue workers.
  • Capture and centralize application exception telemetry so TIFF-related failures surface in security dashboards.
  • Track outbound image conversion failures tied to specific client sources to identify probing activity.

How to Mitigate CVE-2026-106117

Immediate Actions Required

  • Upgrade SixLabors.ImageSharp to version 4.1.1 or later across all applications and container images.
  • Rebuild and redeploy any .NET services that statically bundle ImageSharp to ensure the patched assembly is loaded.
  • Audit third-party NuGet packages for transitive dependencies on vulnerable ImageSharp versions.

Patch Information

The fix is published in ImageSharp 4.1.1. Technical details are available in GitHub Security Advisory GHSA-jj3q-cwqj-842r, GitHub Pull Request #3176, and the GitHub Release v4.1.1 notes. The patched code adds row-width validation before BitWriterUtils.WriteBits and normalizes CCITT error messages.

Workarounds

  • Restrict or disable TIFF decoding in applications that cannot immediately upgrade, rejecting files by MIME type and magic bytes.
  • Enforce strict image size and dimension limits at the edge before passing uploads to the decoder.
  • Isolate image processing workloads in sandboxed containers with automatic restart to limit the blast radius of process termination.
bash
# Upgrade the vulnerable package in a .NET project
dotnet add package SixLabors.ImageSharp --version 4.1.1

# Verify no vulnerable versions remain in the dependency graph
dotnet list package --include-transitive | grep -i SixLabors.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.