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-106112 Overview
CVE-2026-106112 is an out-of-bounds write vulnerability [CWE-787] in SixLabors ImageSharp, a widely used 2D graphics library for .NET. The flaw affects versions 4.0.0 through 4.1.1 and resides in the International Color Consortium (ICC) profile LUT16 conversion path. The ClutCalculator.Calculate and LutEntryCalculator.CalculateLut routines store intermediate and output values in a Vector4 structure, but accept ICC profiles that declare more than four output channels. A malformed embedded profile can direct interpolation and output-LUT operations to write one float per declared channel beyond the four-float destination, corrupting memory and terminating the process.
Critical Impact
A remote attacker can supply a crafted image containing a malicious ICC profile to trigger memory corruption and crash any .NET application that decodes images with DecoderOptions.ColorProfileHandling set to Convert.
Affected Products
- SixLabors ImageSharp 4.0.0 through 4.1.1
- .NET applications processing untrusted images with ICC color profile conversion enabled
- Web services and image pipelines using ImageSharp with ColorProfileHandling.Convert
Discovery Timeline
- 2026-10-06 - CVE-2026-106112 published to the National Vulnerability Database
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-106112
Vulnerability Analysis
The vulnerability resides in ImageSharp's ICC profile conversion pipeline, specifically in LUT16 (16-bit lookup table) processing. ImageSharp represents color values internally using System.Numerics.Vector4, a fixed four-float SIMD structure. The ICC specification permits color profiles to declare arbitrary channel counts, and the affected calculators did not validate this count against the four-float Vector4 destination.
When the decoder processes an image with DecoderOptions.ColorProfileHandling set to Convert, interpolation and output-LUT operations iterate over the declared channel count. For a malformed profile declaring more than four output channels, each additional channel causes a float write past the end of the Vector4 buffer, corrupting adjacent memory and terminating the hosting process. The default Preserve mode does not invoke ICC conversion and is not affected.
Root Cause
The root cause is missing input validation on ICC profile channel counts. Both ClutCalculator and LutEntryCalculator trusted the InputChannelCount and OutputChannelCount values from the embedded profile without checking the ceiling imposed by the Vector4 storage format.
Attack Vector
An attacker uploads or serves an image file embedding a crafted ICC profile with more than four input or output channels. Any downstream service that decodes the image with ICC conversion enabled will write past the destination buffer and crash. The attack requires no authentication and can be delivered through any network endpoint accepting image uploads.
// Patch in src/ImageSharp/ColorProfiles/Icc/Calculators/ClutCalculator.cs
Guard.NotNull(clut, nameof(clut));
Guard.MustBeGreaterThan(clut.InputChannelCount, 0, nameof(clut.InputChannelCount));
Guard.MustBeGreaterThan(clut.OutputChannelCount, 0, nameof(clut.OutputChannelCount));
+ if (clut.InputChannelCount > 4 || clut.OutputChannelCount > 4)
+ {
+ throw new InvalidIccProfileException("ICC conversion supports at most four input and output channels.");
+ }
this.inputCount = clut.InputChannelCount;
this.outputCount = clut.OutputChannelCount;
Source: GitHub Commit b03f0ed
Detection Methods for CVE-2026-106112
Indicators of Compromise
- Unexpected process termination or AccessViolationException crashes in .NET services that decode user-supplied images.
- Image files containing ICC profiles that declare InputChannelCount or OutputChannelCount greater than 4.
- InvalidIccProfileException entries referencing "ICC conversion supports at most four input and output channels" after patching.
Detection Strategies
- Inventory .NET applications and container images for SixLabors.ImageSharp package versions between 4.0.0 and 4.1.1.
- Instrument image-processing endpoints to log DecoderOptions.ColorProfileHandling configuration and flag any use of the Convert mode on untrusted input.
- Parse ICC profile headers at the ingestion edge to inspect declared channel counts before invoking the decoder.
Monitoring Recommendations
- Alert on repeated worker process restarts or application pool recycles correlated with image upload activity.
- Monitor crash telemetry (Watson, Application Insights, or equivalent) for faults originating in ClutCalculator or LutEntryCalculator.
- Track network ingress of image formats that commonly embed ICC profiles (JPEG, PNG, TIFF) for anomalous profile sizes.
How to Mitigate CVE-2026-106112
Immediate Actions Required
- Upgrade SixLabors.ImageSharp to version 4.1.2 or later across all .NET projects and container images.
- Audit application code for DecoderOptions.ColorProfileHandling = ColorProfileHandling.Convert and temporarily switch to Preserve where feasible until patched.
- Rebuild and redeploy affected services; verify the new package version is reflected in production manifests.
Patch Information
The fix is published in ImageSharp Release v4.1.2. The patch, discussed in GitHub Pull Request #3187, rejects ICC profiles declaring more than four input or output channels by throwing InvalidIccProfileException in both ClutCalculator and LutEntryCalculator. Full details are documented in GitHub Security Advisory GHSA-ffp7-56pq-64mr.
Workarounds
- Set DecoderOptions.ColorProfileHandling to ColorProfileHandling.Preserve to bypass the vulnerable ICC conversion path entirely.
- Strip ICC profiles from untrusted images at the gateway using a separate sanitizer before passing them to ImageSharp.
- Reject images whose ICC profile headers declare more than four input or output channels during pre-processing validation.
# Upgrade the vulnerable package to the patched release
dotnet add package SixLabors.ImageSharp --version 4.1.2
# Verify no project still references a vulnerable version
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

