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-106114 Overview
CVE-2026-106114 affects SixLabors ImageSharp, a widely used 2D graphics library for .NET. The vulnerability resides in the International Color Consortium (ICC) Color Lookup Table (CLUT) parsing logic. Affected versions calculate allocation sizes from attacker-declared channel and grid dimensions before confirming the profile actually contains those values. A truncated ICC profile can therefore trigger large memory allocations through IccDataReader.ReadClutF32 and the public IccProfile.Entries parsing paths. The flaw is categorized under [CWE-789] Memory Allocation with Excessive Size Value. The maintainers fixed the issue in ImageSharp version 4.1.2.
Critical Impact
A short, malformed ICC profile embedded in an image can force ImageSharp to allocate oversized float arrays and jagged structures, producing memory pressure and input-validation failures in the host process.
Affected Products
- SixLabors ImageSharp versions 1.0.0-beta0001 through 4.1.1
- ImageSharp version 4 deployments using DecoderOptions.ColorProfileHandling = Convert
- .NET applications that accept untrusted images and invoke ImageSharp decoders
Discovery Timeline
- 2026-10-06 - CVE-2026-106114 published to NVD
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-106114
Vulnerability Analysis
The vulnerability resides in ImageSharp's ICC profile parser, specifically in the CLUT reading routines inside IccDataReader.Lut.cs. ICC profiles describe color transformations using multidimensional lookup tables. The parser derives the total CLUT storage from the input channel count, output channel count, and per-channel grid point counts declared in the profile header. The parser used these attacker-controlled values to size allocations before confirming the file contained the declared data.
As a result, IccDataReader.ReadClutF32 can request a large float array, and earlier IccProfile.Entries parsing paths can allocate a large jagged representation, both triggered by a short truncated profile. The demonstrated outcome is memory pressure and an input-validation failure rather than process termination. In ImageSharp 4, automatic image conversion only reaches the vulnerable parser when DecoderOptions.ColorProfileHandling is set to Convert; the default Preserve mode avoids the conversion path.
Root Cause
The root cause is unchecked arithmetic over attacker-declared dimensions prior to I/O validation. The parser raised the per-channel grid point count to the power of the channel count to compute total entries without verifying that the underlying byte stream actually contained that many values.
Attack Vector
An attacker crafts an image file containing an embedded ICC profile that declares inflated channel counts and grid point values but omits the corresponding data. When a .NET application decodes the image with color profile conversion enabled, ImageSharp allocates oversized buffers derived from the forged header fields.
// Security patch in src/ImageSharp/Metadata/Profiles/ICC/DataReader/IccDataReader.Lut.cs
// Validate ICC CLUT storage before allocation
public IccClut ReadClut8(int inChannelCount, int outChannelCount, byte[] gridPointCount)
{
- int length = 0;
- for (int i = 0; i < inChannelCount; i++)
- {
- length += (int)Math.Pow(gridPointCount[i], inChannelCount);
- }
-
- length /= inChannelCount;
+ int length = this.GetClutLength(inChannelCount, outChannelCount, gridPointCount, 1);
const float Max = byte.MaxValue;
Source: SixLabors/ImageSharp commit 8de892a. The patched routine delegates length computation to GetClutLength, which validates the declared size against remaining profile bytes before any allocation.
Detection Methods for CVE-2026-106114
Indicators of Compromise
- Sustained managed-heap growth and large object heap (LOH) allocations in .NET processes that invoke ImageSharp decoders.
- OutOfMemoryException or allocation failures originating from SixLabors.ImageSharp.Metadata.Profiles.Icc stack frames.
- Inbound image uploads containing truncated ICC profiles with inflated channel or grid point declarations.
Detection Strategies
- Inspect application logs for exceptions raised by IccDataReader.ReadClutF32 or IccProfile.Entries parsing paths.
- Correlate image upload endpoints with abrupt increases in process working set and garbage collection pressure.
- Scan dependency manifests (packages.config, .csproj, packages.lock.json) for SixLabors.ImageSharp versions below 4.1.2.
Monitoring Recommendations
- Instrument .NET processes with runtime counters for allocation rate, LOH size, and GC pause times on image-processing hosts.
- Alert on repeated failed decode operations from the same client IP or authenticated identity.
- Capture and retain the first 1KB of rejected image uploads for offline review of ICC profile headers.
How to Mitigate CVE-2026-106114
Immediate Actions Required
- Upgrade all projects referencing SixLabors.ImageSharp to version 4.1.2 or later.
- Audit application code for DecoderOptions.ColorProfileHandling = Convert and switch to the default Preserve mode where feasible until patching completes.
- Restrict maximum request body size and image dimensions on endpoints that accept user-supplied images.
Patch Information
The fix ships in ImageSharp Release v4.1.2 and is implemented in GitHub Pull Request #3187. The patch introduces GetClutLength, which validates declared CLUT storage against the remaining profile stream before allocation. See GitHub Security Advisory GHSA-gwg2-r3hj-4w44 for the maintainer-authored advisory.
Workarounds
- Leave DecoderOptions.ColorProfileHandling at the default Preserve value to bypass the vulnerable conversion path.
- Strip ICC profiles from untrusted images at an upload proxy before invoking ImageSharp.
- Enforce per-process memory limits and request timeouts for services that decode user-submitted images.
# Update ImageSharp to the patched release
dotnet add package SixLabors.ImageSharp --version 4.1.2
dotnet restore
dotnet list package --vulnerable --include-transitive
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

