7.1
CWE
120 119
Advisory Published
Updated

CVE-2021-42716: Buffer Overflow

First published: Thu Oct 21 2021(Updated: )

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.

Credit: cve@mitre.org cve@mitre.org

Affected SoftwareAffected VersionHow to fix
Nothings Stb Image.h=2.27
Fedoraproject Fedora=33
Fedoraproject Fedora=34
Fedoraproject Fedora=35
=2.27
=33
=34
=35

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Reference Links

Frequently Asked Questions

  • What is CVE-2021-42716?

    CVE-2021-42716 is a vulnerability in stb_image.h version 2.27 where the PNM loader incorrectly interprets 16-bit PGM files as 8-bit, leading to a buffer overflow.

  • What is the severity of CVE-2021-42716?

    The severity of CVE-2021-42716 is high with a CVSS score of 7.1.

  • How does CVE-2021-42716 affect software?

    CVE-2021-42716 affects software that uses stb_image.h version 2.27, including Nothings Stb Image.h and Fedora versions 33, 34, and 35.

  • What is the impact of CVE-2021-42716?

    The impact of CVE-2021-42716 is that an attacker could crash a service using stb_image or potentially execute arbitrary code.

  • How can I fix CVE-2021-42716?

    To fix CVE-2021-42716, it is recommended to update to a fixed version of stb_image.h and follow any provided patches or fixes.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203