CVE-2021-42716

HIGHCVSS 7.1/10EPSS 1.36%

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
7.1/10

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H

EPSS Probability
1.36%

68.2th percentile

Probability of exploitation in the next 30 days. Learn more

Weakness Enumeration

Affected Software

VendorProductVersions
NothingsStb Image.H2.27
FedoraprojectFedora33
FedoraprojectFedora34
FedoraprojectFedora35

References

Timeline

Published
Last Modified
Status
Modified

Frequently Asked Questions

What is 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 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.
How severe is CVE-2021-42716?
CVE-2021-42716 has a CVSS score of 7.1/10 (HIGH severity). The EPSS model estimates a 1.36% probability of exploitation in the next 30 days.
How do I fix CVE-2021-42716?
Check the vendor references and advisories linked above for patched versions and mitigation guidance. You can also run a Strix scan to test if your systems are affected.

Are you affected by CVE-2021-42716?

Run a free Strix scan to check your systems for this vulnerability.

Scan your code now

Source: NVD / NIST