Repository navigation
Update dependency SixLabors.ImageSharp to v3.2.0 [SECURITY] - #253
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/nuget-sixlabors.imagesharp-vulnerability
branch
from
October 13, 2026 15:47
b68bbd9 to
c779142
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
[3.1.12]→[3.2.0]ImageSharp: ICC CLUT parsing allocates from unvalidated channel and grid dimensions
CVE-2026-106114 / GHSA-gwg2-r3hj-4w44
More information
Details
Summary
A malformed embedded ICC profile can make ImageSharp allocate memory from attacker-controlled CLUT channel and grid dimensions before verifying that the declared CLUT values are present.
In published v1 through v3 packages, the public lazy ICC parser allocates approximately 115 MB from the 200-byte test profile before rejecting the truncated tag. In published v4 packages, decoding with ICC conversion enabled requests an 860,934,420-byte managed float array from the same profile.
Affected package and versions
SixLabors.ImageSharp(NuGet)>= 1.0.0-beta0001, <= 4.1.10815358f9202a78bc7f3b83e19282dc3654b500fcorresponds to release v4.1.1.The parser defect is present from the first published NuGet prerelease,
1.0.0-beta0001, through the latest published release, 4.1.1. The automaticImage.Loadconversion path used by the main PoC exists in>= 4.0.0, <= 4.1.1; earlier versions expose the same parser defect through the publicIccProfile.Entriesaccessor.Details
The reproduced profile has an
A2B0multi-process-elements (mpet) tag with aclutelement declaring 15 input channels, 15 output channels, and three gridpoints per input channel.
ReadClutF32computes
3^15 * 15and allocates that many floats before reading any CLUTvalues or verifying that the tag has enough remaining data. The supplied
200-byte profile ends immediately after the CLUT grid descriptor.
In v4, the path is reached when an application decodes an embedded ICC profile using
DecoderOptions.ColorProfileHandling = ColorProfileHandling.Convert. Thedefault setting,
Preserve, does not parse the profile for conversion.In v1 through v3,
ReadClutF32uses a jagged representation. Loading an ICC-bearing JPEG and then accessingdecoded.Metadata.IccProfile.Entriesreaches the public lazy parser. The malformed profile allocates the3^15-entry outer array before the missing CLUT values are detected.Reproduction environment and result
The supplied automatic-conversion exploit and control were run against the published NuGet 4.1.1
net8.0DLL in Docker on Debian 12 / Linux arm64 with .NET SDK 8.0.424 and.NET runtime 8.0.30. The same conversion fixture was run against published 4.0.0 and 4.1.0 with the same result.
Published 1.0.0, 2.0.0, 2.1.13, 3.0.0, and 3.1.12 were tested through public JPEG decode followed by
IccProfile.Entries; each allocated approximately 114.9 MB, skipped the malformed tag, and exited normally. The published1.0.0-beta0001publicIccProfile(bytes).Entriespath allocated 114,813,528 bytes before a catchable managed bounds exception.One exploit decode increased
GC.GetTotalAllocatedBytes(true)by approximately861.5 million bytes, then returned
InvalidIccProfileException: Invalid conversion method.The reader catches the truncated-tag error and drops that tag. The identical
input with
ColorProfileHandling.Preservecompleted successfully with roughly0.5 million allocated bytes in the harness.
One complete exploit run produced:
The control from the same image produced:
The exact allocation counter includes runtime allocations and varies slightly
between processes; the requested CLUT array itself is 860,934,420 bytes.
No active exploitation is known.
Impact
This report demonstrates a large attacker-controlled transient allocation in
the ICC conversion path. It does not demonstrate unhandled process termination:
allocation failure is caught while parsing the malformed tag, so the impact
should be limited to memory pressure / input-validation failure unless a
reproduction demonstrates a stronger result.
Complete PoC files
Program.cs:
Project file:
Dockerfile:
Run:
docker build -t imagesharp-gwg2-poc . docker run --rm imagesharp-gwg2-poc exploit docker run --rm imagesharp-gwg2-poc controlSeverity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
ImageSharp: HistogramEqualization uses an unvalidated luminance as an unchecked histogram index
CVE-2026-106113 / GHSA-j3p4-wp97-rph4
More information
Details
Summary
SixLabors.ImageSharpcan terminate a process when an application decodesan attacker-supplied 32-bit floating-point TIFF as
Image<HalfVector4>and appliesHistogramEqualization(). An IEEE positive-infinity TIFF sample reaches a non-finite or otherwise out-of-rangeHalfVector4component, depending on the release. The histogram equalization path derives a luminance-basedhistogram index without validating that result, reaching an unsafe out-of-range
access.
This report covers
HistogramEqualizationonly. It does not claim AdaptiveHistogram Equalization or AutoLevel behavior.
Affected package and versions
SixLabors.ImageSharp(NuGet)>= 2.0.0, <= 4.1.10815358f9202a78bc7f3b83e19282dc3654b500fcorresponds to release v4.1.1.TIFF decoding first shipped in v2.0.0; v1.0.4 has no TIFF decoder. The unsafe luminance-derived histogram index is present from v2.0.0 through v4.1.1. The positive-infinity TIFF PoC terminates published 2.0.0, 3.1.12, 4.0.0, and 4.1.1 with
AccessViolationException, while the finite0.5control completes on each tested release.Details
ColorNumerics.GetBT709Luminancecan produce a luminance that does not map to a valid histogram index.GrayscaleLevelsRowOperation.Invokethen uses that result as an uncheckedUnsafe.Addoffset into the histogram.The reproduction reaches this code through the public
HistogramEqualization()extension. It does not test or claim the Adaptive Histogram Equalization orAutoLevelpaths.Tested environment
The reproduction uses the DLL in the published NuGet 4.1.1 package:
Reproduction
Build the supplied Dockerfile and run the exploit. The harness creates a valid
8x1 uncompressed, 32-bit IEEE floating-point TIFF whose samples are positive infinity,
decodes it through the public API, and invokes
HistogramEqualization().Observed result:
The control is identical except samples are
0.5:When the same exploit binary was invoked through a shell inside the container,
the shell printed
Abortedand reported status 134. The directdocker runresult above is the result for the supplied Docker commands.
No active exploitation is known.
Complete PoC files
Program.cs:
Project file:
Dockerfile:
Run:
docker build -t imagesharp-j3p4-poc . docker run --rm imagesharp-j3p4-poc exploit docker run --rm imagesharp-j3p4-poc controlSeverity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
ImageSharp: TIFF CCITT T4 encoder can write past its compressed output buffer
CVE-2026-106110 / GHSA-j9gm-c75j-xc9q
More information
Details
Summary
ImageSharp's TIFF CCITT Group 3 (T4) encoder can write beyond its allocated compressed-data buffer when encoding narrow 1-bit images. The unchecked writes can corrupt process memory and terminate the process.
This report concerns only the T4
CcittGroup3Faxencoder path. It replaces the prior, unrelated ICC content.Affected package and versions
SixLabors.ImageSharp(NuGet)>= 2.0.0, <= 4.1.10815358f9202a78bc7f3b83e19282dc3654b500fcorresponds to release v4.1.1.The T4 encoder and its undersized buffer calculation first shipped in v2.0.0. The narrow-image exploit terminates published v2.0.0 and v4.1.1 while the same-height 64-pixel control succeeds on both. Every release through v4.1.1 retains the vulnerable allocation and unchecked bit-write structure.
Preconditions and impact
The affected path is reached when the application encodes 1-bit image data with
TiffCompression.CcittGroup3Fax. This can happen when an application explicitly selectsTiffEncoder.BitsPerPixel = Bit1andTiffEncoder.Compression = CcittGroup3Fax. It can also occur when an application decodes a TIFF and re-encodes it using the defaultTiffEncoder, because ImageSharp retains TIFF frame metadata including the compression and bit depth.TiffCompressorFactorycreatesT4BitCompressorforCcittGroup3Fax.TiffCcittCompressor.InitializeallocatesWidth * rowsPerStripbytes, but non-modified T4 writes a 12-bit EOL before row data and an additional 12-bit EOL per row.WriteCodecallsBitWriterUtils.WriteBitandWriteZeroBit, both of which useUnsafe.Addwithout a capacity check. Thus the encoded bit stream can exceed the allocated span.A 1-pixel-wide, 2000-row alternating bilevel image caused a fatal
System.AccessViolationExceptionduring T4 compression. This is a memory-corruption and availability issue for applications that expose this encoding flow to attacker-controlled input.Tested environment
SixLabors.ImageSharp4.1.1net8.0No active exploitation is known.
Reproduction
In a
net8.0project that references the publishedSixLabors.ImageSharp4.1.1 binary, save the following asProgram.cs. Rundotnet run -- exploit 2000for the trigger anddotnet run -- control 2000for the control.Against the published 4.1.1 package, this produced:
A 64-pixel-wide, 2000-row control using the same Group 3 metadata completed successfully:
The direct public configuration path also triggers with:
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
ImageSharp: BigTIFF IFD count can keep a decoder thread in a non-progressing loop
CVE-2026-106116 / GHSA-wmxv-xphr-5c9g
More information
Details
Summary
SixLabors.ImageSharp4.1.1 can spend an attacker-controlled duration decoding asmall malformed BigTIFF. The BigTIFF IFD entry-count field is 64-bit. The reader
iterates once per declared entry, but when fewer than 20 bytes remain for an entry,
the entry read returns without advancing. A 24-byte input can therefore run billions
of iterations without consuming input.
One decoder invocation occupied one executing thread for more than five seconds in
the tested environment. This report makes no worker-pool exhaustion claim.
Affected package and versions
SixLabors.ImageSharp(NuGet)>= 2.0.0, <= 4.1.10815358f9202a78bc7f3b83e19282dc3654b500fcorresponds to release v4.1.1.BigTIFF decoding and the unbounded
ReadValues64loop first appear in v2.0.0. Every release tag from v2.0.0 through v4.1.1 retains that loop without constraining the entry count or terminating when a truncated entry makes no progress. The 24-byte PoC exceeded the five-second timeout on published v2.0.0 and v4.1.1; the one-entry control returned promptly on both.Details
ReadValues64trusts the 64-bit IFD count and loops once per declared entry. When fewer than 20 bytes remain,ReadValue64returns without advancing the stream or ending the outer loop.Tested environment
The reproduction uses the DLL in the published NuGet 4.1.1 package:
Reproduction
The public
Image.Load(Stream)call receives a 24-byte little-endian BigTIFFwith its first IFD at offset 16 and entry count
5000000000. There are no bytesfor an entry. Run the supplied container under a five-second timeout.
Complete observed output:
timeoutexit code 124 means the decoder had not returned after five seconds.The control is identical except the entry count is
1:The control rejects malformed input promptly; it does not time out.
No active exploitation is known.
Complete PoC files
Program.cs:
Project file:
Dockerfile:
Run:
docker build -t imagesharp-wmxv-poc . timeout 5 docker run --rm imagesharp-wmxv-poc 5000000000 docker run --rm imagesharp-wmxv-poc 1Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
ImageSharp: TIFF CCITT T6 encoder writes beyond an undersized output buffer
CVE-2026-106115 / GHSA-jjfr-hcj7-qf5w
More information
Details
Summary
The TIFF CCITT Group 4 (T6) encoder writes beyond its logical compressed-data buffer when encoding a 1-bit image. A valid 1×1 Group 4 TIFF decoded and re-encoded with the default
TiffEncoderterminates the process with an unhandled exception.Affected package and versions
SixLabors.ImageSharp(NuGet)>= 2.1.0, <= 4.1.10815358f9202a78bc7f3b83e19282dc3654b500fcorresponds to release v4.1.1.The T6 compressor was introduced by commit
3c9eb470a07a15012c2a29ad84090dcc804a7975, first released in v2.1.0, with the sameWidth * rowsPerStripallocation and unchecked code writes. The 1×1 exploit terminates published v2.1.0 and v4.1.1; its uncompressed control succeeds. Source history shows no capacity fix through v4.1.1.Details
TiffCcittCompressor.InitializeallocatesWidth * rowsPerStripbytes. A 1×1 strip therefore receives one byte.After encoding the row,
T6BitCompressor.CompressStripappends two 12-bit EOFB codes.WriteCodewrites those bits without checking the destination capacity. The final checked slice detects the oversized byte count and throwsArgumentOutOfRangeException, after the unchecked writes have exceeded the one-byte span.The default TIFF encoder can inherit
CcittGroup4Faxand 1-bit settings from decoded frame metadata. The reproduction uses that decode-and-re-encode path.Tested environment
SixLabors.ImageSharp4.1.1net8.0No active exploitation is known.
Reproduction
Create a
net8.0project referencing the published 4.1.1 assembly and use thisProgram.cs:Run:
The exploit produced exit code 134:
The control completed with exit code 0:
Impact
One attacker-supplied Group 4 TIFF can select this unsafe encoder path when an application decodes it and re-encodes it with inherited TIFF metadata. The demonstrated result is an unhandled exception and process termination in the reproduction. The report is limited to the T6 encoder path.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
SixLabors/ImageSharp (SixLabors.ImageSharp)
v3.2.0What's Changed
Full Changelog: SixLabors/ImageSharp@v3.1.12...v3.2.0
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.