{"api_version":"1","generated_at":"2026-07-24T00:13:30+00:00","cve":"CVE-2021-42716","urls":{"html":"https://cve.report/CVE-2021-42716","api":"https://cve.report/api/cve/CVE-2021-42716.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2021-42716","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2021-42716"},"summary":{"title":"CVE-2021-42716","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.","state":"PUBLIC","assigner":"cve@mitre.org","published_at":"2021-10-21 19:15:00","updated_at":"2023-11-07 03:39:00"},"problem_types":["CWE-120"],"metrics":[],"references":[{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FTZXHFZD36BGE5P6JF252NZZLKMGCY4T/","name":"FEDORA-2021-082bea5b34","refsource":"","tags":[],"title":"[SECURITY] Fedora 34 Update: stb-0-0.7.20211022gitaf1a5bc.fc34 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/nothings/stb/issues/1166","name":"https://github.com/nothings/stb/issues/1166","refsource":"MISC","tags":[],"title":"stbi__pnm_load heap-buffer-overflow  bug  · Issue #1166 · nothings/stb · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VP2YEXEAJWI76FPM7D7VXHWD3WESQEYC/","name":"FEDORA-2021-3fc69d203c","refsource":"FEDORA","tags":[],"title":"[SECURITY] Fedora 34 Update: sdrpp-1.0.4-3.fc34 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BEGXBDEMTFGINETMJENBZ6SCHVEJQJSY/","name":"FEDORA-2021-f8ba4a690e","refsource":"","tags":[],"title":"[SECURITY] Fedora 35 Update: sdrpp-1.0.4-3.fc35 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CI23LXPEV2GCDQTJSKO6CIILBDTI3R42/","name":"FEDORA-2021-0511a38484","refsource":"","tags":[],"title":"[SECURITY] Fedora 33 Update: stb-0-0.7.20211022gitaf1a5bc.fc33 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/nothings/stb/pull/1223","name":"https://github.com/nothings/stb/pull/1223","refsource":"MISC","tags":[],"title":"Fixes a crash and an infinite loop in stb_image that could occur with specially constructed PGM and HDR files by NeilBickford-NV · Pull Request #1223 · nothings/stb · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ID6II3RIKAMVGVMC6ZAQIXXYYDMTVC4N/","name":"FEDORA-2021-d1446cd1ac","refsource":"FEDORA","tags":[],"title":"[SECURITY] Fedora 35 Update: stb-0-0.7.20211022gitaf1a5bc.fc35 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TXX76TJMZBPN3NU542MGN6B7C7QHRFGB/","name":"FEDORA-2022-832689aa6b","refsource":"","tags":[],"title":"[SECURITY] Fedora 34 Update: usd-21.08-19.fc34 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ID6II3RIKAMVGVMC6ZAQIXXYYDMTVC4N/","name":"FEDORA-2021-d1446cd1ac","refsource":"","tags":[],"title":"[SECURITY] Fedora 35 Update: stb-0-0.7.20211022gitaf1a5bc.fc35 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/nothings/stb/issues/1225","name":"https://github.com/nothings/stb/issues/1225","refsource":"MISC","tags":[],"title":"In stb_image's PNM reader, loading a specially constructed valid 16-bit PGM file with 4 channels can cause a crash due to an out-of-bounds read · Issue #1225 · nothings/stb · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FTZXHFZD36BGE5P6JF252NZZLKMGCY4T/","name":"FEDORA-2021-082bea5b34","refsource":"FEDORA","tags":[],"title":"[SECURITY] Fedora 34 Update: stb-0-0.7.20211022gitaf1a5bc.fc34 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VP2YEXEAJWI76FPM7D7VXHWD3WESQEYC/","name":"FEDORA-2021-3fc69d203c","refsource":"","tags":[],"title":"[SECURITY] Fedora 34 Update: sdrpp-1.0.4-3.fc34 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3TDGZFLBOP27LZKLH45WQLSNPSPP7S7Z/","name":"FEDORA-2021-8ea648186c","refsource":"","tags":[],"title":"[SECURITY] Fedora 34 Update: CuraEngine-4.11.0-2.fc34 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/CI23LXPEV2GCDQTJSKO6CIILBDTI3R42/","name":"FEDORA-2021-0511a38484","refsource":"FEDORA","tags":[],"title":"[SECURITY] Fedora 33 Update: stb-0-0.7.20211022gitaf1a5bc.fc33 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/AF2CNP4FVC6LDKNOO4WDCGNDYIP3MPK6/","name":"FEDORA-2021-16d848834d","refsource":"FEDORA","tags":[],"title":"[SECURITY] Fedora 35 Update: CuraEngine-4.11.0-2.fc35 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TXX76TJMZBPN3NU542MGN6B7C7QHRFGB/","name":"FEDORA-2022-832689aa6b","refsource":"FEDORA","tags":[],"title":"[SECURITY] Fedora 34 Update: usd-21.08-19.fc34 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/G2M5CRSGPRF7G3YB5CLU4FXW7ANNHAYT/","name":"FEDORA-2021-001f25d986","refsource":"FEDORA","tags":[],"title":"[SECURITY] Fedora 35 Update: usd-21.08-17.fc35 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3TDGZFLBOP27LZKLH45WQLSNPSPP7S7Z/","name":"FEDORA-2021-8ea648186c","refsource":"FEDORA","tags":[],"title":"[SECURITY] Fedora 34 Update: CuraEngine-4.11.0-2.fc34 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BEGXBDEMTFGINETMJENBZ6SCHVEJQJSY/","name":"FEDORA-2021-f8ba4a690e","refsource":"FEDORA","tags":[],"title":"[SECURITY] Fedora 35 Update: sdrpp-1.0.4-3.fc35 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/AF2CNP4FVC6LDKNOO4WDCGNDYIP3MPK6/","name":"FEDORA-2021-16d848834d","refsource":"","tags":[],"title":"[SECURITY] Fedora 35 Update: CuraEngine-4.11.0-2.fc35 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/G2M5CRSGPRF7G3YB5CLU4FXW7ANNHAYT/","name":"FEDORA-2021-001f25d986","refsource":"","tags":[],"title":"[SECURITY] Fedora 35 Update: usd-21.08-17.fc35 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-42716","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-42716","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2021","cve_id":"42716","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"fedoraproject","cpe5":"fedora","cpe6":"33","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2021","cve_id":"42716","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"fedoraproject","cpe5":"fedora","cpe6":"34","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2021","cve_id":"42716","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"fedoraproject","cpe5":"fedora","cpe6":"35","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2021","cve_id":"42716","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"nothings","cpe5":"stb_image.h","cpe6":"2.27","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2021-42716","qid":"282023","title":"Fedora Security Update for stb (FEDORA-2021-0511a38484)"},{"cve":"CVE-2021-42716","qid":"282024","title":"Fedora Security Update for stb (FEDORA-2021-082bea5b34)"},{"cve":"CVE-2021-42716","qid":"282025","title":"Fedora Security Update for sdrpp (FEDORA-2021-3fc69d203c)"},{"cve":"CVE-2021-42716","qid":"282029","title":"Fedora Security Update for CuraEngine (FEDORA-2021-8ea648186c)"},{"cve":"CVE-2021-42716","qid":"282639","title":"Fedora Security Update for usd (FEDORA-2022-832689aa6b)"},{"cve":"CVE-2021-42716","qid":"751640","title":"SUSE Enterprise Linux Security Update for zxing-cpp (SUSE-SU-2022:0163-1)"},{"cve":"CVE-2021-42716","qid":"751643","title":"OpenSUSE Security Update for zxing-cpp (openSUSE-SU-2022:0157-1)"},{"cve":"CVE-2021-42716","qid":"753345","title":"SUSE Enterprise Linux Security Update for zxing-cpp (SUSE-SU-2022:0157-1)"}]},"source_records":{"cve_program":{"CVE_data_meta":{"ASSIGNER":"cve@mitre.org","ID":"CVE-2021-42716","STATE":"PUBLIC"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"n/a","version":{"version_data":[{"version_value":"n/a"}]}}]},"vendor_name":"n/a"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"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."}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"n/a"}]}]},"references":{"reference_data":[{"url":"https://github.com/nothings/stb/issues/1166","refsource":"MISC","name":"https://github.com/nothings/stb/issues/1166"},{"url":"https://github.com/nothings/stb/pull/1223","refsource":"MISC","name":"https://github.com/nothings/stb/pull/1223"},{"url":"https://github.com/nothings/stb/issues/1225","refsource":"MISC","name":"https://github.com/nothings/stb/issues/1225"},{"refsource":"FEDORA","name":"FEDORA-2021-001f25d986","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/G2M5CRSGPRF7G3YB5CLU4FXW7ANNHAYT/"},{"refsource":"FEDORA","name":"FEDORA-2021-d1446cd1ac","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ID6II3RIKAMVGVMC6ZAQIXXYYDMTVC4N/"},{"refsource":"FEDORA","name":"FEDORA-2021-f8ba4a690e","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BEGXBDEMTFGINETMJENBZ6SCHVEJQJSY/"},{"refsource":"FEDORA","name":"FEDORA-2021-0511a38484","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/CI23LXPEV2GCDQTJSKO6CIILBDTI3R42/"},{"refsource":"FEDORA","name":"FEDORA-2021-082bea5b34","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FTZXHFZD36BGE5P6JF252NZZLKMGCY4T/"},{"refsource":"FEDORA","name":"FEDORA-2021-3fc69d203c","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VP2YEXEAJWI76FPM7D7VXHWD3WESQEYC/"},{"refsource":"FEDORA","name":"FEDORA-2021-8ea648186c","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3TDGZFLBOP27LZKLH45WQLSNPSPP7S7Z/"},{"refsource":"FEDORA","name":"FEDORA-2021-16d848834d","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/AF2CNP4FVC6LDKNOO4WDCGNDYIP3MPK6/"},{"refsource":"FEDORA","name":"FEDORA-2022-832689aa6b","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TXX76TJMZBPN3NU542MGN6B7C7QHRFGB/"}]}},"nvd":{"publishedDate":"2021-10-21 19:15:00","lastModifiedDate":"2023-11-07 03:39:00","problem_types":["CWE-120"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"NONE","availabilityImpact":"HIGH","baseScore":7.1,"baseSeverity":"HIGH"},"exploitabilityScore":1.8,"impactScore":5.2},"baseMetricV2":{"cvssV2":{"version":"2.0","vectorString":"AV:N/AC:M/Au:N/C:P/I:N/A:P","accessVector":"NETWORK","accessComplexity":"MEDIUM","authentication":"NONE","confidentialityImpact":"PARTIAL","integrityImpact":"NONE","availabilityImpact":"PARTIAL","baseScore":5.8},"severity":"MEDIUM","exploitabilityScore":8.6,"impactScore":4.9,"acInsufInfo":false,"obtainAllPrivilege":false,"obtainUserPrivilege":false,"obtainOtherPrivilege":false,"userInteractionRequired":true}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:nothings:stb_image.h:2.27:*:*:*:*:*:*:*","cpe_name":[]}]},{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*","cpe_name":[]}]}]}},"legacy_mitre":{"record":{"CveYear":"2021","CveId":"42716","Ordinal":"219210","Title":"CVE-2021-42716","CVE":"CVE-2021-42716","Year":"2021"},"notes":[{"CveYear":"2021","CveId":"42716","Ordinal":"1","NoteData":"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.","Type":"Description","Title":null},{"CveYear":"2021","CveId":"42716","Ordinal":"2","NoteData":"2021-10-21","Type":"Other","Title":"Published"},{"CveYear":"2021","CveId":"42716","Ordinal":"3","NoteData":"2021-11-02","Type":"Other","Title":"Modified"}]}}}