CVE-2021-42716
Last modified
CVE-2021-42716 is a high-severity vulnerability rated 7.1/10 on the CVSS scale. 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. EPSS estimates a 1.36% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Nothings | Stb Image.H | 2.27 |
| Fedoraproject | Fedora | 33 |
| Fedoraproject | Fedora | 34 |
| Fedoraproject | Fedora | 35 |
References
- https://github.com/nothings/stb/issues/1166Exploit, Issue Tracking, Third Party Advisory
- https://github.com/nothings/stb/issues/1225Exploit, Issue Tracking, Third Party Advisory
- https://github.com/nothings/stb/pull/1223Third Party Advisory
- https://github.com/nothings/stb/issues/1166Exploit, Issue Tracking, Third Party Advisory
- https://github.com/nothings/stb/issues/1225Exploit, Issue Tracking, Third Party Advisory
- https://github.com/nothings/stb/pull/1223Third Party Advisory
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2021-42716?
How severe is CVE-2021-42716?
How do I fix CVE-2021-42716?
Are you affected by CVE-2021-42716?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
