Security mailing lists by PureSourceCode

CVE-2021-42716

HIGH 7.1CVSS 3.1

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.

Published
21 Oct 2021
Last modified
17 Jun 2026
Assigned by
cve@mitre.org
NVD status
Modified
Weakness
CWE-120
Sources
NVDJSON

Scores

SourceScored byVersionScoreVector / decision
NVD nvd@nist.gov (Primary) CVSS 3.1 HIGH 7.1 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H
NVD nvd@nist.gov (Primary) CVSS 2.0 MEDIUM 5.8 AV:N/AC:M/Au:N/C:P/I:N/A:P

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD nothings stb_image.h
cpe:2.3:a:nothings:stb_image.h:2.27:*:*:*:*:*:*:*
= 2.27
NVD fedoraproject fedora
cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*
= 33
NVD fedoraproject fedora
cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
= 34
NVD fedoraproject fedora
cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
= 35

References

History

  • 25 Nov 2026 20:33 UTC · NVD: first stored (published 21 Oct 2021)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.