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-106118 Overview
CVE-2026-106118 is a heap out-of-bounds write [CWE-787] in ImageSharp, a widely used 2D graphics library for .NET. The flaw affects tiled TIFF decoding in versions 3.0.0 through 4.1.0. When TileWidth is smaller than ImageWidth, the decoder allocates a destination buffer sized by TileWidth while the T4, T6, and Modified Huffman CCITT decompressors are constructed using the full frame width. Attacker-crafted TIFF files can direct frame-width fax scanlines into the undersized tile buffer. The result is attacker-controlled out-of-bounds writes, heap corruption, and process termination. The issue is fixed in version 4.1.1.
Critical Impact
A single malicious TIFF processed by a vulnerable ImageSharp instance can corrupt the managed heap and terminate the host process, enabling remote denial of service against image-processing services.
Affected Products
- SixLabors ImageSharp 3.0.0 through 4.1.0
- Applications and services embedding ImageSharp for TIFF decoding
- .NET workloads exposing user-supplied image upload or conversion endpoints
Discovery Timeline
- 2026-10-06 - CVE-2026-106118 published to NVD
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-106118
Vulnerability Analysis
The vulnerability lives in ImageSharp's tiled TIFF decoding path. TiffDecoderCore.DecodeTilesChunky allocates a per-tile destination buffer sized by TileWidth. However, TiffDecompressorsFactory.Create instantiates the CCITT T4, T6, and Modified Huffman decompressors with the full ImageWidth. The two code paths disagree on the row length used for decoded fax scanlines.
When a TIFF declares TileWidth < ImageWidth, the decompressor emits scanlines sized to the frame while the caller expects tile-sized rows. Even with legal per-row run codes, the decompressor writes past the end of the tile buffer. The attacker controls run lengths and fill bytes, giving precise control over the out-of-bounds data. This path is distinct from the previously disclosed oversized CCITT run issue in strip-based decoding.
Root Cause
The root cause is a buffer-size mismatch between the allocator and the consumer. The tile decoder sizes its destination by TileWidth, but the decompressor factory passes width (the full image width) into fax decompressors that write one row at a time. There is no reconciliation step for the tiled case before the first scanline is produced.
Attack Vector
Exploitation requires only that a vulnerable application decode an attacker-supplied TIFF file. No authentication or user interaction is needed when the host application accepts images over the network. The confirmed primary impact is heap corruption leading to availability loss (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H). Memory-safety corruption in managed heaps can also create secondary conditions for further exploitation depending on runtime state.
// Patch: src/ImageSharp/Formats/Tiff/Compression/TiffDecompressorsFactory.cs
int tileWidth = 0,
int tileHeight = 0)
{
+ // Fax compression emits one decoded row at a time, so tiled images must use
+ // the tile row width that was used to size the caller's destination buffer.
+ int faxWidth = isTiled ? tileWidth : width;
+
switch (method)
{
case TiffDecoderCompressionType.None:
Source: GitHub commit 9ee7d1d
The fix routes the correct per-row width into the fax decompressor construction when the TIFF is tiled, so emitted scanlines match the caller's buffer size.
// Patch: src/ImageSharp/Formats/Tiff/Compression/Decompressors/T6TiffCompression.cs
int runLength = (int)bitReader.RunLength;
if (runLength > (uint)(scanline.Length - unpacked))
{
- TiffThrowHelper.ThrowImageFormatException("ccitt compression parsing error");
+ TiffThrowHelper.ThrowImageFormatException("CCITT compression parsing error: decoded more pixels than the image width.");
}
scanline.Slice(unpacked, runLength).Fill(fillByte);
Source: GitHub commit 9ee7d1d
Detection Methods for CVE-2026-106118
Indicators of Compromise
- Unexpected process termination or unhandled AccessViolationException / IndexOutOfRangeException in services that call ImageSharp TIFF decoders.
- TIFF uploads where IFD metadata shows TileWidth smaller than ImageWidth combined with CCITT compression (Compression=3, 4, or Modified Huffman 2).
- Spikes in image-processing worker crashes or container restarts correlated with image upload traffic.
Detection Strategies
- Inventory .NET projects for SixLabors.ImageSharp package versions >=3.0.0,<4.1.1 using SBOM scanning or dotnet list package --vulnerable.
- Inspect inbound TIFF files at the application gateway and flag or reject files that combine tiled layout with CCITT fax compression.
- Enable crash telemetry on image-processing services and alert on recurring faults within ImageSharp TIFF decoder stack frames.
Monitoring Recommendations
- Centralize application crash logs and correlate restarts with recent image uploads to spot targeted abuse.
- Monitor dependency manifests in CI/CD for pinned vulnerable ImageSharp versions and fail builds that reintroduce them.
- Track EPSS and advisory updates for GHSA-v76p-62qx-wwq2 to adjust prioritization as exploit maturity changes.
How to Mitigate CVE-2026-106118
Immediate Actions Required
- Upgrade SixLabors.ImageSharp to version 4.1.1 or later across all applications and container images.
- Audit transitive dependencies that re-package ImageSharp and rebuild downstream artifacts.
- Restrict or reject TIFF uploads at the perimeter until patched builds are deployed.
Patch Information
The fix is delivered in ImageSharp 4.1.1. See the GitHub Release v4.1.1, the GitHub Pull Request #3176, and the GitHub Security Advisory GHSA-v76p-62qx-wwq2. The patch passes a tile-aware width into the CCITT decompressor factory and tightens error messaging in T6TiffCompression.
Workarounds
- Disable TIFF decoding paths in applications that do not require TIFF support by removing or disabling the ImageSharp TIFF format provider.
- Pre-validate incoming TIFFs and reject files whose IFD declares TileWidth < ImageWidth with CCITT compression.
- Isolate image-processing workers in least-privilege sandboxes or short-lived containers to limit the impact of a crash or heap corruption.
# Upgrade ImageSharp to the patched release
dotnet add package SixLabors.ImageSharp --version 4.1.1
# Verify no vulnerable versions remain in the solution
dotnet list package --vulnerable --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

