Repository navigation
Releases
3.19.33
FreeImage 3.19.33
Security fixes for JPEG XR, HDR, IFF, PICT and WBMP loading, and a SharpYUV WebP save flag. Upgrading is recommended for any application that loads untrusted images.
Security fixes
| Advisory | Format | Issue | Reporter |
|---|---|---|---|
| GHSA-gwj3-px9g-x6gf | JPEG XR | Heap buffer overflow in metadata parsing (BUILD_JXR=ON) |
marcellomaugeri |
| GHSA-2jrc-675j-96jw | JPEG XR | Out-of-bounds stack read in container signature parsing | marcellomaugeri |
| GHSA-994h-2f6q-8wh6 | JPEG XR | Out-of-bounds stack read in codestream signature parsing | marcellomaugeri |
| GHSA-hv6w-96fr-cc96 | HDR | Negative height or width causes an out-of-bounds heap write | michaelknap |
| GHSA-jxrm-w825-p3xp | IFF | Malformed FORM or chunk size causes an infinite loop | michaelknap |
| GHSA-q9vw-fx7r-5qmp | PICT | Truncated input causes an infinite loop | michaelknap |
| GHSA-65pp-rfw7-4xq6 | WBMP | Truncated extension header causes an infinite loop | michaelknap |
- JPEG XR metadata:
ReadBinaryData()sized its buffer asuCount + 2in 32-bit arithmetic, so a count of 0xFFFFFFFE or 0xFFFFFFFF wrapped to a 0 or 1 byte allocation while the stream was still asked for the full count. The count is now widened tosize_tfirst, and counts that would overflow are rejected. - JPEG XR signatures: the container (
II) and codestream (WMPHOTO) signatures were read into unterminated stack buffers and checked withstrstr(), which ran past the buffer on non-zero input. Both are now compared withmemcmp(). - HDR: header dimensions were parsed through signed
%dinto unsigned values. They are now rejected unless positive. - IFF: FORM and chunk sizes, odd-length padding and offsets are now validated before chunks are skipped.
- PICT:
Read8()returned a synthetic zero at end of file, which the header loop treated as padding forever. Failed reads now stop parsing. - WBMP: a failed read left the continuation bit set so the parser never advanced. Every header read must now return its byte.
Regression tests (JxrMetadataCountTest, JxrSignatureTest, and the HDR, IFF, PICT and WBMP tests) reproduce these bugs under AddressSanitizer without the fixes.
New
WEBP_SHARPYUVsave flag for SharpYUV RGB to YUV conversion in lossy WebP. Combine it with a quality value.
Notes
- No bundled library versions changed since 3.19.32. LibJXR carries local fixes in
JXRMeta.c,JXRGlueJxr.candstrdec.c; keep them when re-syncing jxrlib. - The JPEG XR advisories only affect builds with
BUILD_JXR=ON, which is on by default on Windows.
Contributors
Thanks to everyone who contributed to this release:
-
@michaelknap: reported and fixed the HDR, IFF, PICT and WBMP vulnerabilities (GHSA-hv6w-96fr-cc96, GHSA-jxrm-w825-p3xp, GHSA-q9vw-fx7r-5qmp, GHSA-65pp-rfw7-4xq6)
-
@marcellomaugeri: reported the JPEG XR vulnerabilities (GHSA-gwj3-px9g-x6gf, GHSA-2jrc-675j-96jw, GHSA-994h-2f6q-8wh6)
-
@danoli3: JPEG XR fixes, the
WEBP_SHARPYUVflag and the release -
@michaelknap is both reporter and fix author. The four commits (47e48ab, 31af402, 8d57767, b92f945) are authored under that GitHub login.
-
@marcellomaugeri is a reporter only. The JPEG XR fixes themselves were written by @danoli3.
-
@danoli3 authored the other commits in the range.
Full changelog: https://github.com/danoli3/FreeImage/blob/3.19.33/CHANGELOG.md
Compare: 3.19.32...3.19.33
What's Changed
- Add WEBP_SHARPYUV save flag (SharpYUV for lossy WebP) by @danoli3 in #278
- FreeImage 3.19.33 by @danoli3 in #279
- Fix JPEG XR signature out-of-bounds stack reads by @danoli3 in #280
Full Changelog: 3.19.32...3.19.33
3.19.32
FreeImage 3.19.32
zlib 1.4, MSVC v142 packaging support and an optional libjpeg-turbo build.
Changes
- zlib 1.4: bundled zlib updated from 1.3.2 to 1.4. (#270)
- MSVC v142 support: added the FREEIMAGE_MSVC_VECTOR_ALGORITHMS option and vs2019-v142/vs2022-v142 presets. A v142 application can now link a package built with matching tools. An installed package built with a different toolset now reports the mismatch and how to fix it, instead of failing at link time with _std* errors. (#266, #272)
- Optional libjpeg-turbo: new USE_LIBJPEG_TURBO option (default OFF) builds against a system libjpeg-turbo through the libjpeg API. It requires BUILD_LIBJPEG=ON, and lossless JPEG transforms are unavailable in this mode. (#273)
- Metadata hardening: debug builds verify that the TagLib constant tables are sorted, and lookups reject NULL keys and names. (#271)
- Apple builds: silenced libtool "has no symbols" warnings for static Xcode builds. (#274)
Notes
- The only bundled-library change is zlib 1.3.2 to 1.4. Other bundled versions are unchanged.
- FreeImage_GetVersion() returns 3.19.32.
Full changelog: 3.19.31...3.19.32
What's Changed
- Archive SourceForge patches and document submission candidates by @danoli3 in #264
- Update bundled zlib to 1.4 by @danoli3 in #270
- Use constant metadata tables and per-model string pools by @andre-rosa in #265
- Harden constant metadata tag tables (follow-up to #265) by @danoli3 in #271
- Add MSVC STL vector-algorithm switch and VS2019/v142 support by @danoli3 in #272
- Add USE_LIBJPEG_TURBO option by @danoli3 in #273
- Silence libtool empty-object warnings for static Xcode builds by @danoli3 in #274
- FreeImage 3.19.32 by @danoli3 in #275
New Contributors
- @andre-rosa made their first contribution in #265
Full Changelog: 3.19.31...3.19.32
3.19.31
FreeImage 3.19.31 release notes
Security
- Fix BMP RLE8 signed integer overflow that could cause an out-of-bounds heap write when loading crafted images. Also harden RLE4 cursor arithmetic. Reported by ooq (@jini135wii). Security advisory (https://github.com/danoli3/FreeImage/security/advisories/GHSA-7pp5-4w3w-437c).
- Update bundled OpenJPH from 0.32.0 to 0.33.0, including the HTJ2K allocation fix for CVE-2026-111151, NLT marker bounds checks, and Windows SIMD fixes.
What's Changed
Full Changelog: 3.19.30...3.19.31
3.19.30
FreeImage 3.19.30
This release adds metadata stripping, optional read-only HEIF/AVIF and JPEG XL builds, and security fixes in metadata handling and bundled libraries.
- Metadata stripping: Use FREEIMAGE_STRIP when loading or saving, or FreeImage_StripMetadata() on an existing bitmap, to remove EXIF, XMP, IPTC, ICC profiles, comments and embedded thumbnails. Animation controls are preserved, and stripping during saving leaves the source bitmap unchanged. Combining the flag with JPEG_EXIFROTATE applies orientation before removing metadata. Removing ICC profiles does not convert pixel colors.
- Read-only codec builds: Disable HEIF/AVIF saving with FREEIMAGE_HEIF_EXPORT=OFF, JPEG XL saving with FREEIMAGE_JXL_EXPORT=OFF, or both with FREEIMAGE_CODEC_EXPORT=OFF. Bundled read-only HEIF/AVIF builds omit Kvazaar and libaom’s AV1 encoder. Saving remains enabled by default.
- TIFF safety fix: Correct IPTC profile lengths for libtiff fields reported as byte counts, preventing an out-of-bounds metadata read.
- Bundled library updates: OpenEXR 3.5.2 → 3.5.3, Little CMS 2.19.1 → 2.20, and libaom 3.15.2 → 3.15.3. These updates include malformed-file handling, crash and integer-overflow fixes.
- Build improvements: Add FREEIMAGE_METADATA_STRIP=OFF to compile out metadata stripping, reduce MSVC warning noise, remove deprecated libjxl build flags, and expand CI coverage for codec export options.
- Release tooling and documentation: Add a version-bump script with dry-run support and byte-preserving edits, plus a security policy documenting private vulnerability reporting.
What's Changed
- Fix MSVC C4163 warning on 32-bit builds by @haobinnan in #245
- Allow HEIF/AVIF saving to be compiled out by @danoli3 in #246
- Allow JPEG XL saving to be compiled out, and add FREEIMAGE_CODEC_EXPORT by @danoli3 in #247
- Drop deprecated libjxl build flags by @nyfair in #248
- Disable MSVC warnings C4389 and C4505 by @haobinnan in #250
- Add metadata stripping for image loading and saving by @danoli3 in #243
- Update bundled OpenEXR to 3.5.3, Little CMS to 2.20 and libaom to 3.15.3 by @danoli3 in #255
- Add a security policy by @danoli3 in #253
- FreeImage 3.19.30 by @danoli3 in #257
New Contributors
Full Changelog: 3.19.29...3.19.30
3.19.29
FreeImage 3.19.29
Large-file TIFF input, stream hardening, and Windows build improvements.
New API
- 64-bit TIFF/BigTIFF input. FreeImage_Load64 and FreeImage_LoadFromHandle64 read single-image TIFF and BigTIFF files beyond 2 GiB and 4 GiB through a new FreeImageIO64 callback table, including header-only loading, Exif metadata and thumbnails. The existing FreeImageIO and Plugin layouts are unchanged. For now these entry points only read TIFF; saving, multipage and memory-stream limits are unchanged. (#197)
Security and robustness
- Memory-stream write overflow. The write end position is now checked before the addition, preventing signed overflow and out-of-bounds writes after seeking near INT_MAX. This mainly affects Windows, where long is 32-bit. (#228)
- JP2/J2K stream length probes. Invalid stream lengths, including failed seek/tell callbacks and empty or backwards lengths, are now rejected before decoding instead of reaching OpenJPEG assertions. (#232)
- No new CVE IDs in this release. The CNA has since published CVE-2026-118752 (https://www.cve.org/CVERecord?id=CVE-2026-118752) (IFF/LBM PBM RLE, fixed in 3.19.22) and CVE-2026-118753 (https://www.cve.org/CVERecord?id=CVE-2026-118753) (GIF_PLAYBACK, fixed in 3.19.25), and the changelog now names both. (#244)
Windows and Visual Studio
- Portable multi-platform solution via the vs2022-all and vs2026-all presets, covering Win32, x64, ARM64, ARM64EC and All Platforms. It uses relative paths, so the tree can be moved. (#240)
- English diagnostics in nested MSVC codec builds by default; set FREEIMAGE_CODEC_ENGLISH_MESSAGES=OFF to keep localized messages. (#237, #241)
- Fewer MSVC warnings from bundled sources, and LibRaw's NO_LCMS macro is no longer redefined. Thanks to @haobinnan. (#229)
- Copyright text in Windows resources now displays correctly on every code page, and the copyright information includes the GitHub URL. (#231)
- Experimental ARM64X build with native ARM64 smoke tests. (#210)
Dependencies
- libaom 3.15.1 → 3.15.2. All other bundled codecs are unchanged from 3.19.28. (#227)
Testing
- Large-file TIFF/BigTIFF fixtures are published as the test-fixtures-io64-v1 prerelease, and CI exercises the 64-bit APIs on all platforms. The openFrameworks job now uses Xcode 27.1. (#197, #233)
Feature
What's Changed
- Update bundled libaom to 3.15.2 by @danoli3 in #227
- Suppress and resolve compilation warnings from third-party libraries … by @haobinnan in #229
- FreeImageIO: bound _MemoryWriteProc end position (Windows 32-bit long overflow) by @danoli3 in #228
- Fix Windows copyright encoding and add GitHub links by @danoli3 in #231
- Prevent JP2/J2K assertions after failed stream length probes by @danoli3 in #232
- Publish per-case large-file fixtures as prerelease assets by @danoli3 in #233
- Test merged Windows ARM64X DLLs on ARM runners by @danoli3 in #210
- Use English diagnostics in nested MSVC codec builds by @danoli3 in #237
- Audit MSVC output with actual Chinese compiler resources by @danoli3 in #241
- Add a portable multi-platform Visual Studio solution by @danoli3 in #240
- Prepare FreeImage 3.19.29 by @danoli3 in #242
- Declared CVE-2026-118752 and CVE-2026-118753 in the changelog by @danoli3 in #244
Full Changelog: 3.19.28...3.19.29
Large-file I/O test fixtures (test-fixtures-io64-v1)
FreeImage large-file I/O test fixtures
These are synthetic test inputs, not a FreeImage software release. All images
are generated from scratch and may be redistributed under CC0-1.0.
Each fixture has its own sparse .tar.gz release asset. manifest.json records
its filename, SHA-256, compressed size, logical size, intended decode/reject
result and expected pixel color. Download only the payload being tested.
Large TIFF files target the additive 64-bit input API in PR #197; the legacy
loading API and other viewers may not support those offsets.
The Python runner downloads/extracts one payload into a temporary directory,
runs the decoder, and removes that directory before advancing to the next
case. Failures and timeouts also trigger cleanup. Windows files are explicitly
marked sparse. Logical lengths above 4 GiB do not consume that much disk.
Example (replace DECODER with the future loader test executable):
python scripts/tests/io64-fixtures.py run --manifest manifest.json \
--release-url https://github.com/danoli3/FreeImage/releases/download/TAG \
-- DECODER '{format}' '{expect}' '{path}'
Pin the manifest SHA-256 with --manifest-sha256 in CI. To extract a single
previously downloaded asset, use the extract subcommand with --manifest and
--output-dir. GNU tar and macOS bsdtar also understand these sparse archives.
Avoid tools that expand sparse holes when copying the extracted images.
Paths include spaces, Cyrillic, Greek, Arabic, Hindi, Chinese, Japanese,
Korean, combining characters and emoji, with valid and broken images in each.
Four malformed strip/offset cases return a bitmap on PR #197 head
6c964f3. Their intended result remains
reject; known_behavior records the baseline. This corpus exposes those
failures without including loader fixes. No external/private images are used.
3.19.28
FreeImage 3.19.28 includes security hardening, dependency updates, and Windows codec fixes:
- Fix out-of-bounds writes in TARGA RLE decoding (CVE-2024-28581). #215 (https://github.com/danoli3/FreeImage/pull/215)
- Fix BMP RLE4 pixel-count overflow, including protection for 32-bit targets (CVE-2023-47994). #216 (https://github.com/danoli3/FreeImage/pull/216), #221 (https://github.com/danoli3/FreeImage/pull/221)
- Harden memory-stream reads and writes against byte-count overflow, addressing the CVE-2023-47992 bug class. #217 (https://github.com/danoli3/FreeImage/pull/217)
- Fix JPEG XL decoding crashes with upstream MinGW GCC; expand lossy, progressive, and upsampling regression coverage. #212 (https://github.com/danoli3/FreeImage/pull/212)
- Update bundled libheif to 1.23.7, Brotli to 1.2.1, and LibRaw to 0.22.3, incorporating upstream security and decoding fixes. #223 (https://github.com/danoli3/FreeImage/pull/223), #219 (https://github.com/danoli3/FreeImage/pull/219), #222 (https://github.com/danoli3/FreeImage/pull/222)
- Prevent parallel Windows test DLL deployment races. #225 (https://github.com/danoli3/FreeImage/pull/225)
- Expand upstream-version reporting to 20 dependencies and retry MSYS2 setup after mirror timeouts. #220 (https://github.com/danoli3/FreeImage/pull/220), #224 (https://github.com/danoli3/FreeImage/pull/224)
What's Changed
- Fix JPEG XL crash with upstream MinGW GCC (#211) by @danoli3 in #212
- Check bundled subdependency versions and report current libraries by @danoli3 in #220
- PluginTARGA: bound RLE decode by image rows (CVE-2024-28581) by @w4ffl35 in #215
- Update bundled Brotli to 1.2.1 (CVE-2026-111497) by @danoli3 in #219
- PluginBMP: size_t arithmetic in LoadPixelDataRLE4 (CVE-2023-47994) by @w4ffl35 in #216
- Retry MSYS2 setup once on mirror timeouts by @danoli3 in #224
- Sync bundled LibRaw 0.22.2 -> 0.22.3 by @danoli3 in #222
- Update bundled libheif to 1.23.7 by @danoli3 in #223
- FreeImageIO: overflow-safe _MemoryReadProc total (CVE-2023-47992) by @w4ffl35 in #217
- Prevent parallel Windows test DLL deployment races by @danoli3 in #225
- PluginBMP: 32-bit bound for RLE4 pixel count (stacked on #216) by @danoli3 in #221
- Prepare FreeImage 3.19.28 by @danoli3 in #226
New Contributors
Special thanks to:
- @herb52 for reporting the JPEG XL crash and providing the call stack that helped identify the stack-alignment problem on 64-bit Windows with MinGW GCC. #211 (https://github.com/danoli3/FreeImage/issues/211)
- @haobinnan for continued community feedback for backward compatibility and the 64-bit API proposals, CMake suggestions, and dependency-update reports. #209 (https://github.com/danoli3/FreeImage/issues/209), #213 (https://github.com/danoli3/FreeImage/issues/213)
- @w4ffl35 for contributing the TARGA, BMP, and memory-stream security fixes. #215 (https://github.com/danoli3/FreeImage/pull/215), #216 (https://github.com/danoli3/FreeImage/pull/216), #217 (https://github.com/danoli3/FreeImage/pull/217)
- @thbeu for the initial large-file support patch, API/ABI compatibility guidance, and testing the proposed 64-bit TIFF I/O implementation. #196 (https://github.com/danoli3/FreeImage/pull/196), #205 (https://github.com/danoli3/FreeImage/issues/205)
Full Changelog: 3.19.27...3.19.28
3.19.27
FreeImage 3.19.27
- HEIF thumbnail fix: Preserve the primary image when an embedded thumbnail fails to decode. Add regression tests for malformed thumbnails. (#206 (https://github.com/danoli3/FreeImage/pull/206))
- Updated libheif: Bundle version 1.23.6 and recognize .hif filenames. (#203 (https://github.com/danoli3/FreeImage/pull/203))
- Windows debug symbols: Install compiler PDBs for static MSVC Debug builds and linker PDBs for DLL builds. (#203 (https://github.com/danoli3/FreeImage/pull/203))
- Portable JPEG XR builds: Supply the missing ANSI definition and C declarations for non-Windows builds. Add JP2/JXR loading, memory-I/O and display-preview diagnostics, with sample-file CI coverage. Native HDR and 16-bit output remains unchanged. (#207 (https://github.com/danoli3/FreeImage/pull/207))
- Automatic codec build parallelism: Detect available logical CPUs and honor CMAKE_BUILD_PARALLEL_LEVEL. Retain FREEIMAGE_CODEC_BUILD_JOBS for explicit overrides. (#202 (https://github.com/danoli3/FreeImage/pull/202))
- Optional AOM dependency: Set FREEIMAGE_BUNDLE_AOM=OFF to build bundled HEIF without AOM or its Perl requirement. HEVC support remains available; AVIF is disabled. (#195 (https://github.com/danoli3/FreeImage/pull/195))
- Updated documentation: Refresh supported formats, bundled library versions, build options and image-conversion guidance. (#208 (https://github.com/danoli3/FreeImage/pull/208))
What's Changed
- Make bundled AOM optional for HEIF builds by @danoli3 in #195
- Make bundled codec build parallelism configurable by @danoli3 in #202
- Install MSVC Debug symbols for static and shared builds by @haobinnan and @danoli3 in #203
- Keep valid HEIF images when embedded thumbnail decoding fails by @danoli3 in #206
- Test JP2/JXR detection, native pixels and display previews by @danoli3 in #207
- Prepare FreeImage 3.19.27 and refresh supported formats by @danoli3 in #208
Thanks to @haobinnan for code contributions, bug reports, sample files
and build suggestions, and @herb52 for reporting the Windows HEIF build issue.
Full Changelog: 3.19.26...3.19.27
3.19.26
FreeImage 3.19.26
- Fix TIFF JPEG decoding when the JPEG stream’s sampling factors differ from the TIFF tags; add regression coverage. (#191, #193)
- Reject oversized ICO dimensions before decoding. (#193)
- Add a CMake option to select the MSVC runtime: default, dynamic (
/MD), or static (/MT). (#192)
What's Changed
- Test shared library builds in CI by @danoli3 in #188
- Clean up straightforward compiler warnings by @danoli3 in #189
- Add selectable MSVC runtime library by @danoli3 in #192
- Handle TIFF JPEG sampling mismatches safely by @danoli3 in #193
- Fix loading of oversized ICOs and TIFFs with mismatched JPEG sampling… by @haobinnan in #191
- Prepare FreeImage 3.19.26 release by @danoli3 in #194
Full Changelog: 3.19.25...3.19.26
3.19.25
FreeImage 3.19.25 release notes:
- Bundle pinned HEIF/AVIF and JPEG XL codecs and dependencies for offline builds, while retaining optional system-library support.
- Add
FreeImage_GetChannelsNumberfor bitmap and typed image formats. - Fix GIF playback bounds so malformed frames cannot write outside the logical screen (CVE-2026-118753). Add regression tests.
These notes cover the changes since 3.19.24.
Security
- CVE-2026-118753: heap buffer overflow in
GIF_PLAYBACKcompositing. Frame rectangles and disposal clears are now clipped to the logical screen. Affects FreeImage before 3.19.25; fixed here. (#183) - The same report also covered RAS and IFF/LBM PBM RLE. Both were already fixed in earlier releases, and 3.19.25 only adds regression tests:
- RAS loop-counter and allocation overflow: fixed in 3.19.14 (d474400, CVE-2024-28578 / CVE-2024-28580).
- IFF PBM RLE heap overflow: fixed in 3.19.22 (CVE-2026-118752, #156, #161, #162).
- Reported-by: Tristan Madani (Talence Security) @TristanInSec
What's Changed
- Bundle optional HEIF/AVIF and JPEG XL sources for offline builds by @danoli3 in #179
- Clip GIF playback frames to logical screen by @danoli3 in #183
- Add image channel count query API by @danoli3 in #180
- Fix Linux release checksums and attach Ubuntu .ddeb by @danoli3 in #185
- Prepare FreeImage 3.19.25 release by @danoli3 in #186
Full Changelog: 3.19.24...3.19.25