QSearchQSearch

CVE-2021-42716

7.1 HIGH

An issue was discovered in stb stb_image.h 2.27

Published: 2021-10-21 · Last updated: 2026-06-17

Severity and scoring

CVSS
7.1 HIGH
Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H
CWE
CWE-120

Affected products

VendorProduct
fedoraprojectfedora, stb_image.h
nothingsfedora, stb_image.h

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.

Source: NVD

References

Related CVEs

Same vendor

  • CVE-2025-3409 A vulnerability classified as critical has been found in Nothings stb up to f056911 (6.3 MEDIUM)
  • CVE-2025-3408 A vulnerability was found in Nothings stb up to f056911 (6.3 MEDIUM)
  • CVE-2025-3407 A vulnerability was found in Nothings stb up to f056911 (6.3 MEDIUM)
  • CVE-2025-3406 A vulnerability was found in Nothings stb up to f056911 (4.3 MEDIUM)
  • CVE-2024-28960 An issue was discovered in Mbed TLS 2.18.0 through 2.28.x before 2.28.8 and 3.x before 3.6.0, and Mbed Crypto (8.2 HIGH)

Same CWE

  • CVE-2026-12328 Memory safety bugs present in Firefox ESR 115.36, Firefox ESR 140.11, Thunderbird ESR 140.11, Firefox 151 and Thunderbird 151 (8.1 HIGH)
  • CVE-2026-12192 A vulnerability was determined in GALAYOU Y4 1.0.0 (8.8 HIGH)
  • CVE-2026-36818 Shenzhen Tenda Technology Co., Ltd Tenda W20E v15.11.0.6 was discovered to contain a buffer overflow in the wewifiWhiteUserInfo parameter... (7.5 HIGH)
  • CVE-2026-36817 Shenzhen Tenda Technology Co., Ltd Tenda W15E v15.11.0.10 was discovered to contain a buffer overflow in the webAuthWhiteUserInfo paramet... (7.5 HIGH)
  • CVE-2026-36816 Shenzhen Tenda Technology Co., Ltd Tenda W15E v15.11.0.10 was discovered to contain a buffer overflow in the wewifiWhiteUserInfo paramete... (7.5 HIGH)