CVE-2021-42716
publishedstb: heap-based buffer overflow in stb_image PNM loader
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| n/a | — | n/an/a | Affected | Not stated | mitre |
| SUSE / openSUSE | SLE-12-SP5 | libZXing1aarch64 | Advisory build | 1.2.0-8.6.1 | SUSE-SU-2022:0163-1 |
| SUSE / openSUSE | SLE-12-SP5 | libZXing1ppc64le | Advisory build | 1.2.0-8.6.1 | SUSE-SU-2022:0163-1 |
| SUSE / openSUSE | SLE-12-SP5 | libZXing1s390x | Advisory build | 1.2.0-8.6.1 | SUSE-SU-2022:0163-1 |
| SUSE / openSUSE | SLE-12-SP5 | libZXing1x86_64 | Advisory build | 1.2.0-8.6.1 | SUSE-SU-2022:0163-1 |
| SUSE / openSUSE | SLE-12-SP5 | zxing-cpp-develaarch64 | Advisory build | 1.2.0-8.6.1 | SUSE-SU-2022:0163-1 |
| SUSE / openSUSE | SLE-12-SP5 | zxing-cpp-develppc64le | Advisory build | 1.2.0-8.6.1 | SUSE-SU-2022:0163-1 |
| SUSE / openSUSE | SLE-12-SP5 | zxing-cpp-devels390x | Advisory build | 1.2.0-8.6.1 | SUSE-SU-2022:0163-1 |
Show 30 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| SUSE / openSUSE | SLE-12-SP5 | zxing-cpp-develx86_64 | Advisory build | 1.2.0-8.6.1 | SUSE-SU-2022:0163-1 |
| SUSE / openSUSE | SLE-15-SP3 | libZXing1aarch64 | Advisory build | 1.2.0-9.7.1 | SUSE-SU-2022:0157-1 |
| SUSE / openSUSE | SLE-15-SP3 | libZXing1ppc64le | Advisory build | 1.2.0-9.7.1 | SUSE-SU-2022:0157-1 |
| SUSE / openSUSE | SLE-15-SP3 | libZXing1s390x | Advisory build | 1.2.0-9.7.1 | SUSE-SU-2022:0157-1 |
| SUSE / openSUSE | SLE-15-SP3 | libZXing1x86_64 | Advisory build | 1.2.0-9.7.1 | SUSE-SU-2022:0157-1 |
| SUSE / openSUSE | SLE-15-SP3 | zxing-cpp-develaarch64 | Advisory build | 1.2.0-9.7.1 | SUSE-SU-2022:0157-1 |
| SUSE / openSUSE | SLE-15-SP3 | zxing-cpp-develppc64le | Advisory build | 1.2.0-9.7.1 | SUSE-SU-2022:0157-1 |
| SUSE / openSUSE | SLE-15-SP3 | zxing-cpp-devels390x | Advisory build | 1.2.0-9.7.1 | SUSE-SU-2022:0157-1 |
| SUSE / openSUSE | SLE-15-SP3 | zxing-cpp-develx86_64 | Advisory build | 1.2.0-9.7.1 | SUSE-SU-2022:0157-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | libZXing1aarch64 | Advisory build | 1.2.0-9.7.1 | OPENSUSE-SU-2022:0157-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | libZXing1ppc64le | Advisory build | 1.2.0-9.7.1 | OPENSUSE-SU-2022:0157-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | libZXing1s390x | Advisory build | 1.2.0-9.7.1 | OPENSUSE-SU-2022:0157-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | libZXing1x86_64 | Advisory build | 1.2.0-9.7.1 | OPENSUSE-SU-2022:0157-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | stb-develnoarch | Advisory build | 2.32.1549563867.59e9702-bp153.2.3.1 | OPENSUSE-SU-2022:0018-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | zxing-cpp-develaarch64 | Advisory build | 1.2.0-9.7.1 | OPENSUSE-SU-2022:0157-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | zxing-cpp-develppc64le | Advisory build | 1.2.0-9.7.1 | OPENSUSE-SU-2022:0157-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | zxing-cpp-devels390x | Advisory build | 1.2.0-9.7.1 | OPENSUSE-SU-2022:0157-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | zxing-cpp-develx86_64 | Advisory build | 1.2.0-9.7.1 | OPENSUSE-SU-2022:0157-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libZXing1aarch64 | Advisory build | 1.2.0-2.1 | OPENSUSE-SU-2024:11686-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libZXing1ppc64le | Advisory build | 1.2.0-2.1 | OPENSUSE-SU-2024:11686-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libZXing1s390x | Advisory build | 1.2.0-2.1 | OPENSUSE-SU-2024:11686-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libZXing1x86_64 | Advisory build | 1.2.0-2.1 | OPENSUSE-SU-2024:11686-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libZXing1-32bitaarch64 | Advisory build | 1.2.0-2.1 | OPENSUSE-SU-2024:11686-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libZXing1-32bitppc64le | Advisory build | 1.2.0-2.1 | OPENSUSE-SU-2024:11686-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libZXing1-32bits390x | Advisory build | 1.2.0-2.1 | OPENSUSE-SU-2024:11686-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libZXing1-32bitx86_64 | Advisory build | 1.2.0-2.1 | OPENSUSE-SU-2024:11686-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | zxing-cpp-develaarch64 | Advisory build | 1.2.0-2.1 | OPENSUSE-SU-2024:11686-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | zxing-cpp-develppc64le | Advisory build | 1.2.0-2.1 | OPENSUSE-SU-2024:11686-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | zxing-cpp-devels390x | Advisory build | 1.2.0-2.1 | OPENSUSE-SU-2024:11686-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | zxing-cpp-develx86_64 | Advisory build | 1.2.0-2.1 | OPENSUSE-SU-2024:11686-1 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
No normalized assessments.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| n/a | n/a | n/a (affected) | mitre · cna |
Weaknesses
1- n/a
References
12- https://github.com/nothings/stb/issues/1166
- https://github.com/nothings/stb/issues/1225
- https://github.com/nothings/stb/pull/1223
- FEDORA-2021-8ea648186c https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3TDGZFLBOP27LZKLH45WQLSNPSPP7S7Z/
- FEDORA-2021-16d848834d https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/AF2CNP4FVC6LDKNOO4WDCGNDYIP3MPK6/
- FEDORA-2021-f8ba4a690e https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BEGXBDEMTFGINETMJENBZ6SCHVEJQJSY/
- FEDORA-2021-0511a38484 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CI23LXPEV2GCDQTJSKO6CIILBDTI3R42/
- FEDORA-2021-082bea5b34 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FTZXHFZD36BGE5P6JF252NZZLKMGCY4T/
- FEDORA-2021-001f25d986 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/G2M5CRSGPRF7G3YB5CLU4FXW7ANNHAYT/
- FEDORA-2021-d1446cd1ac https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ID6II3RIKAMVGVMC6ZAQIXXYYDMTVC4N/
- FEDORA-2022-832689aa6b https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TXX76TJMZBPN3NU542MGN6B7C7QHRFGB/
- FEDORA-2021-3fc69d203c https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VP2YEXEAJWI76FPM7D7VXHWD3WESQEYC/
Provider assertions
2mitre · cna
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- e5362d7ea54ace9e804f36dbd3939c6de116d3a1662862f4ac8e22689c66d8d3
- Ingested
- 23 Sep 2026, 07:56:21 UTC
- Source record
- Official CVE record