Skip to content
OpenAdvisories
Unscored CVE-2021-42716 EUVD-2021-29676GHSA-44mr-92xw-jfrv

An issue was discovered in stb stb_image.h 2.27. The PNM loader incorrectly interpreted 16-bit PGM files as 8-bit when converting to RGBA, …

Published Oct 21, 2021 · Updated Aug 4, 2024 · Assigned by mitre

Description

An issue was discovered in stb stb_image.h 2.27. The PNM loader incorrectly interpreted 16-bit PGM files as 8-bit when converting to RGBA, leading to a buffer overflow when later reinterpreting the result as a 16-bit buffer. An attacker could potentially have crashed a service using stb_image, or read up to 1024 bytes of non-consecutive heap data without control over the read location.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 libstb 0.0~git20230129.5736b15+ds-1 —
Debian 13 libstb 0.0~git20230129.5736b15+ds-1 —
Debian 12 libstb No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 libstb No fix yet —
Ubuntu 26.04 LTS libstb No fix yet —
Ubuntu 25.10 libstb No fix yet —
Ubuntu 24.04 LTS libstb No fix yet —
Ubuntu 22.04 LTS libstb No fix yet —
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS libstb No fix yet —
ReleasePackageFixed inAdvisory
SLES 15 SP3 zxing-cpp 1.2.0-9.7.1 SUSE-SU-2022:0157-1
SLES 12 SP5 zxing-cpp 1.2.0-8.6.1 SUSE-SU-2022:0163-1
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SUSE Package Hub 15 SP3 stb 2.32.1549563867.59e9702-bp153.2.3.1 openSUSE-SU-2022:0018-1
ReleasePackageFixed inAdvisory
openSUSE Leap 15.3 stb 2.32.1549563867.59e9702-bp153.2.3.1 openSUSE-SU-2022:0018-1
openSUSE Leap 15.3 zxing-cpp 1.2.0-9.7.1 openSUSE-SU-2022:0157-1

Advisories 4

References