Out-of-bounds Write in SixLabors ImageSharp
Description
ImageSharp is a 2D graphics API. An Out-of-bounds Write vulnerability has been found in the ImageSharp gif decoder, allowing attackers to cause a crash using a specially crafted gif. This can potentially lead to denial of service. The problem has been patched. All users are advised to upgrade to v3.1.7 or v2.1.10.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
An out-of-bounds write vulnerability in ImageSharp's GIF decoder allows remote attackers to cause a denial of service by crafting a malicious GIF file.
Summary
An out-of-bounds write vulnerability exists in the GIF decoder of the SixLabors.ImageSharp library, a popular 2D graphics API for .NET. The flaw is triggered when decoding a specially crafted GIF file, leading to a write access violation that crashes the application [1][2].
Description
The root cause lies in the LzwDecoder.DecodePixelRow method, which fails to properly validate bounds when processing LZW-compressed GIF image data. An attacker can exploit this by providing a malicious GIF that causes the decoder to write beyond the allocated buffer, resulting in an AccessViolationException [2].
Impact
Successful exploitation allows an unauthenticated remote attacker to cause a denial of service by crashing the process that uses ImageSharp to decode the crafted GIF. No privileges or user interaction beyond opening the file is required [4].
Mitigation
The vulnerability has been patched in ImageSharp versions 3.1.7 and 2.1.10. Users are advised to upgrade to these patched versions immediately [1]. There are no known workarounds; updating the library is the only fix.
AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
SixLabors.ImageSharpNuGet | >= 3.0.0, < 3.1.7 | 3.1.7 |
SixLabors.ImageSharpNuGet | < 2.1.10 | 2.1.10 |
Affected products
2- SixLabors/ImageSharpv5Range: < 2.1.10
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
5- github.com/advisories/GHSA-2cmq-823j-5qj8ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-27598ghsaADVISORY
- github.com/SixLabors/ImageSharp/issues/2859ghsax_refsource_MISCWEB
- github.com/SixLabors/ImageSharp/pull/2890ghsax_refsource_MISCWEB
- github.com/SixLabors/ImageSharp/security/advisories/GHSA-2cmq-823j-5qj8ghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.