High · published October 6, 2026
ImageSharp is a 2D graphics library. From 2.1.0 until 4.1.2, the TIFF CCITT Group 4 encoder allocates Width times rowsPerStrip bytes even though T6BitCompressor.CompressStrip can emit encoded row data and two 12-bit end-of-facsimile-block codes beyond that capacity. TiffCcittCompressor.WriteCode performs unchecked writes, and a decode-and-re-encode flow can inherit TiffCompression.CcittGroup4Fax and one-bit metadata from attacker-supplied input. The resulting out-of-bounds writes can corrupt memory and terminate the process. This issue is fixed in version 4.1.2.
| Product | Versions | Fixed in |
|---|---|---|
| sixlabors/imagesharp | ≥ 2.1.0, < 3.2.0 | 3.2.0 |
| sixlabors/imagesharp | ≥ 4.0.0, < 4.1.2 | 4.1.2 |