CVE-2021-42716 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 re...
HighCVSS 7.1
EPSS 1.5%
- Published
- Updated
- Exploit status
- No public exploit known
- Technology
- UbuntuDebian
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.
Upgrade path
11 packages: 2 fixed, 7 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| debian/libstb(Debian 12) | = 0.0~git20220908.8b5f1f3+ds-1; = 0.0~git20230129.5736b15+ds-1; = 0.0~git20230129.5736b15+ds-1.1; = 0.0~git20230129.5736b15+ds-1.1~exp1 +5 more | No fix listed | No fix yet |
| ubuntu/libstb(Ubuntu 20.04) | = 0.0~git20190817.1.052dce1-1; All versions | No fix listed | No fix yet |
| ubuntu/libstb(Ubuntu 22.04) | = 0.0~git20200713.b42009b+ds-1; = 0.0~git20210910.af1a5bc+ds-1; All versions | No fix listed | No fix yet |
| ubuntu/libstb(Ubuntu 24.04) | = 0.0~git20230129.5736b15+ds-1; = 0.0~git20230129.5736b15+ds-1.1; = 0.0~git20230129.5736b15+ds-1.2; All versions | No fix listed | No fix yet |
| ubuntu/libstb(Ubuntu 25.10) | = 0.0~git20240715.f7f20f39fe4f+ds-1; = 0.0~git20241109.5c20573+ds-1; All versions | No fix listed | No fix yet |
| ubuntu/libstb(Ubuntu 26.04) | = 0.0~git20241109.5c20573+ds-1; = 0.0~git20250907.fede005+ds-1; All versions | No fix listed | No fix yet |
| ubuntu/libstb(Ubuntu 26.10) | = 0.0~git20250907.fede005+ds-1; All versions | No fix listed | No fix yet |
| debian/libstb(Debian 13) | < 0.0~git20230129.5736b15+ds-1 | 0.0~git20230129.5736b15+ds-1 | Fixed |
| debian/libstb(Debian 14) | < 0.0~git20230129.5736b15+ds-1 | 0.0~git20230129.5736b15+ds-1 | Fixed |
| fedoraproject fedora | = 33; = 34; = 35 | No fix listed | Versions listed |
| nothings stb image.h | = 2.27 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/libstb(Debian:12) | All versions | No fix listed |
| debian/libstb(Debian:12) | = 0.0~git20220908.8b5f1f3+ds-1 | No fix listed |
| debian/libstb(Debian:12) | = 0.0~git20230129.5736b15+ds-1 | No fix listed |
| debian/libstb(Debian:12) | = 0.0~git20230129.5736b15+ds-1.1 | No fix listed |
| debian/libstb(Debian:12) | = 0.0~git20230129.5736b15+ds-1.1~exp1 | No fix listed |
| debian/libstb(Debian:12) | = 0.0~git20230129.5736b15+ds-1.2 | No fix listed |
| debian/libstb(Debian:12) | = 0.0~git20240715.f7f20f39fe4f+ds-1 | No fix listed |
| debian/libstb(Debian:12) | = 0.0~git20241109.5c20573+ds-1 | No fix listed |
| debian/libstb(Debian:12) | = 0.0~git20250907.fede005+ds-1 | No fix listed |
| debian/libstb(Debian:13) | < 0.0~git20230129.5736b15+ds-1 | 0.0~git20230129.5736b15+ds-1 |
| debian/libstb(Debian:14) | < 0.0~git20230129.5736b15+ds-1 | 0.0~git20230129.5736b15+ds-1 |
| ubuntu/libstb(Ubuntu:22.04) | All versions | No fix listed |
| nothings stb image.h | = 2.27 | No fix listed |
| fedoraproject fedora | = 33 | No fix listed |
| fedoraproject fedora | = 34 | No fix listed |
| fedoraproject fedora | = 35 | No fix listed |
| ubuntu/libstb(Ubuntu:24.04) | All versions | No fix listed |
| ubuntu/libstb(Ubuntu:26.04) | All versions | No fix listed |
| ubuntu/libstb(Ubuntu:26.10) | All versions | No fix listed |
| ubuntu/libstb(Ubuntu:20.04) | All versions | No fix listed |
| ubuntu/libstb(Ubuntu:20.04) | = 0.0~git20190817.1.052dce1-1 | No fix listed |
| ubuntu/libstb(Ubuntu:22.04) | = 0.0~git20200713.b42009b+ds-1 | No fix listed |
| ubuntu/libstb(Ubuntu:22.04) | = 0.0~git20210910.af1a5bc+ds-1 | No fix listed |
| ubuntu/libstb(Ubuntu:24.04) | = 0.0~git20230129.5736b15+ds-1 | No fix listed |
| ubuntu/libstb(Ubuntu:24.04) | = 0.0~git20230129.5736b15+ds-1.1 | No fix listed |
Show 7 more
| Product | Affected versions | Fixed in |
|---|---|---|
| ubuntu/libstb(Ubuntu:24.04) | = 0.0~git20230129.5736b15+ds-1.2 | No fix listed |
| ubuntu/libstb(Ubuntu:25.10) | All versions | No fix listed |
| ubuntu/libstb(Ubuntu:25.10) | = 0.0~git20240715.f7f20f39fe4f+ds-1 | No fix listed |
| ubuntu/libstb(Ubuntu:25.10) | = 0.0~git20241109.5c20573+ds-1 | No fix listed |
| ubuntu/libstb(Ubuntu:26.10) | = 0.0~git20250907.fede005+ds-1 | No fix listed |
| ubuntu/libstb(Ubuntu:26.04) | = 0.0~git20241109.5c20573+ds-1 | No fix listed |
| ubuntu/libstb(Ubuntu:26.04) | = 0.0~git20250907.fede005+ds-1 | No fix listed |
References
- Debian Security Tracker CVE-2021-42716 vendor-advisory
- Ubuntu CVE tracker issue-tracking vendor-advisory
- www.cve.org issue-tracking
- github.com exploit issue-tracking third-party-advisory
- github.com exploit issue-tracking third-party-advisory
- github.com issue-tracking third-party-advisory
- FEDORA-2021-8ea648186c vendor-advisory
- FEDORA-2021-16d848834d vendor-advisory
- FEDORA-2021-f8ba4a690e vendor-advisory
- FEDORA-2021-0511a38484 vendor-advisory
- FEDORA-2021-082bea5b34 vendor-advisory
- FEDORA-2021-001f25d986 vendor-advisory
- FEDORA-2021-d1446cd1ac vendor-advisory
- FEDORA-2022-832689aa6b vendor-advisory
- FEDORA-2021-3fc69d203c vendor-advisory
- bugs.debian.org issue-tracking