CVE-2021-28021
Buffer overflow vulnerability in function stbi__extend_receive in stb_image.h in stb 2.26 via a...
Buffer overflow vulnerability in function stbi__extend_receive in stb_image.h in stb 2.26 via a crafted JPEG file.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
7.8
Buffer overflow vulnerability in function stbi__extend_receive in stb_image.h in stb 2.26 via a crafted JPEG file.
- Record
CVE-2021-28021- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - CVSS 2.0
- 6.8 Medium
AV:N/AC:M/Au:N/C:P/I:P/A:P - Weakness
- CWE-787
- Updated
- 2026-11-02
CVE List No score
Buffer overflow vulnerability in function stbi__extend_receive in stb_image.h in stb 2.26 via a crafted JPEG file.
- Record
CVE-2021-28021- Updated
- 2026-11-02
EUVDEUVD-2021-14739 No score
Buffer overflow vulnerability in function stbi__extend_receive in stb_image.h in stb 2.26 via a crafted JPEG file.
- Record
EUVD-2021-14739- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-w9gr-856x-c2gv
7.8
Buffer overflow vulnerability in function stbi__extend_receive in stb_image.h in stb 2.26 via a...
Buffer overflow vulnerability in function stbi__extend_receive in stb_image.h in stb 2.26 via a crafted JPEG file.
- Record
GHSA-w9gr-856x-c2gv- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-787
- Updated
- 2026-11-02
OSV
7.8
Buffer overflow vulnerability in function stbi__extend_receive in stb_image.h in stb 2.26 via a crafted JPEG file.
- Record
CVE-2021-28021- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2021-28021
7.8
Buffer overflow vulnerability in function stbi__extend_receive in stb_image.h in stb 2.26 via a crafted JPEG file.
- Record
DEBIAN-CVE-2021-28021- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Show 7 moreShow less
OSVUBUNTU-CVE-2021-28021
7.8
Buffer overflow vulnerability in function stbi__extend_receive in stb_image.h in stb 2.26 via a crafted JPEG file.
- Record
UBUNTU-CVE-2021-28021- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVMGASA-2021-0549 No score
Updated curaengine packages fix security vulnerability
Buffer overflow vulnerability in function stbi__extend_receive in stb_image.h in stb 2.26 via a crafted JPEG file. (CVE-2021-28021)
An issue was discovered in stb stb_image.h 1.33 through 2.27. The HDR loader parsed truncated end-of-file RLE scanlines as an infinite sequence of zero-length runs. An attacker could potentially have caused denial of service in applications using stb_image by submitting crafted HDR files. (CVE-2021-42715)
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. (CVE-2021-42716)
- Record
MGASA-2021-0549- Updated
- 2026-11-02
OSVMGASA-2022-0074 No score
Updated zxing-cpp packages fix security vulnerability
Buffer overflow vulnerability in function stbi__extend_receive in stb_image.h in stb 2.26 via a crafted JPEG file. (CVE-2021-28021)
An issue was discovered in stb stb_image.h 1.33 through 2.27. The HDR loader parsed truncated end-of-file RLE scanlines as an infinite sequence of zero-length runs. An attacker could potentially have caused denial of service in applications using stb_image by submitting crafted HDR files. (CVE-2021-42715)
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. (CVE-2021-42716)
- Record
MGASA-2022-0074- Updated
- 2026-11-02
OSVopenSUSE-SU-2022:0157-1 No score
Security update for zxing-cpp
This update for zxing-cpp fixes the following issues:
- CVE-2021-28021: Fixed buffer overflow vulnerability in function stbi__extend_receive in stb_image.h via a crafted JPEG file. (bsc#1191743).
- CVE-2021-42715: Fixed buffer overflow in stb_image PNM loader (bsc#1191942).
- CVE-2021-42716: Fixed denial of service in stb_image HDR loader when reading crafted HDR files (bsc#1191944).
- Record
openSUSE-SU-2022:0157-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:11686-1 No score
libZXing1-1.2.0-2.1 on GA media
These are all security issues fixed in the libZXing1-1.2.0-2.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:11686-1- Updated
- 2026-11-02
OSVSUSE-SU-2022:0157-1 No score
Security update for zxing-cpp
This update for zxing-cpp fixes the following issues:
- CVE-2021-28021: Fixed buffer overflow vulnerability in function stbi__extend_receive in stb_image.h via a crafted JPEG file. (bsc#1191743).
- CVE-2021-42715: Fixed buffer overflow in stb_image PNM loader (bsc#1191942).
- CVE-2021-42716: Fixed denial of service in stb_image HDR loader when reading crafted HDR files (bsc#1191944).
- Record
SUSE-SU-2022:0157-1- Updated
- 2026-11-02
OSVSUSE-SU-2022:0163-1 No score
Security update for zxing-cpp
This update for zxing-cpp fixes the following issues:
- CVE-2021-28021: Fixed buffer overflow vulnerability in function stbi__extend_receive in stb_image.h via a crafted JPEG file. (bsc#1191743).
- CVE-2021-42715: Fixed buffer overflow in stb_image PNM loader (bsc#1191942).
- CVE-2021-42716: Fixed denial of service in stb_image HDR loader when reading crafted HDR files (bsc#1191944).
- Record
SUSE-SU-2022:0163-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
libstbDebian:12 |
before 0.0~git20220908.8b5f1f3+ds-1 | 0.0~git20220908.8b5f1f3+ds-1 |
libstbDebian:13 |
before 0.0~git20220908.8b5f1f3+ds-1 | 0.0~git20220908.8b5f1f3+ds-1 |
libstbDebian:14 |
before 0.0~git20220908.8b5f1f3+ds-1 | 0.0~git20220908.8b5f1f3+ds-1 |
libstbDebian:10 From an advisory covering 13 CVEs |
before 0.0~git20180212.15.e6afb9c-1+deb10u1, plus listed versions 0.0~git20180212.15.e6afb9c-1 |
0.0~git20180212.15.e6afb9c-1+deb10u1 |
libstbDebian:11 From an advisory covering 5 CVEs |
before 0.0~git20200713.b42009b+ds-1+deb11u1, plus listed versions 0.0~git20200713.b42009b+ds-1 |
0.0~git20200713.b42009b+ds-1+deb11u1 |
curaengineMageia:8 From an advisory covering 3 CVEs |
before 4.8.0-1.1.mga8 | 4.8.0-1.1.mga8 |
zxing-cppMageia:8 From an advisory covering 3 CVEs |
before 1.1.1-2.1.mga8 | 1.1.1-2.1.mga8 |
zxing-cppSUSE:Linux Enterprise Module for Package Hub 15 SP3 From an advisory covering 3 CVEs |
before 1.2.0-9.7.1 | 1.2.0-9.7.1 |
zxing-cppSUSE:Linux Enterprise Workstation Extension 15 SP3 From an advisory covering 3 CVEs |
before 1.2.0-9.7.1 | 1.2.0-9.7.1 |
zxing-cppSUSE:Linux Enterprise Software Development Kit 12 SP5 From an advisory covering 3 CVEs |
before 1.2.0-8.6.1 | 1.2.0-8.6.1 |
Show 8 moreShow less
| Package | Affected | Fixed |
|---|---|---|
zxing-cppSUSE:Linux Enterprise Workstation Extension 12 SP5 From an advisory covering 3 CVEs |
before 1.2.0-8.6.1 | 1.2.0-8.6.1 |
libstbUbuntu:20.04:LTS |
All versions, plus listed versions 0.0~git20190817.1.052dce1-1 |
None known |
libstbUbuntu:22.04:LTS |
All versions, plus listed versions 0.0~git20200713.b42009b+ds-10.0~git20210910.af1a5bc+ds-1 |
None known |
libstbUbuntu:24.04:LTS |
All versions, plus listed versions 0.0~git20230129.5736b15+ds-10.0~git20230129.5736b15+ds-1.10.0~git20230129.5736b15+ds-1.2 |
None known |
libstbUbuntu:25.10 |
All versions, plus listed versions 0.0~git20240715.f7f20f39fe4f+ds-10.0~git20241109.5c20573+ds-1 |
None known |
libstbUbuntu:26.10 |
All versions, plus listed versions 0.0~git20250907.fede005+ds-1 |
None known |
libstbUbuntu:26.04:LTS |
All versions, plus listed versions 0.0~git20241109.5c20573+ds-10.0~git20250907.fede005+ds-1 |
None known |
zxing-cppopenSUSE:Leap 15.3 From an advisory covering 3 CVEs |
before 1.2.0-9.7.1 | 1.2.0-9.7.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-28021 is a high vulnerability (CVSS 7.8) in Stb Project Stb, published October 15, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.43%, the 73rd percentile. Fixed in libstb 0.0~git20220908.8b5f1f3+ds-1.
References
github.com/nothings/stb/issues/1108
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/G2M5CRSGPRF7G3YB5CLU4FXW7ANNHAYT
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BEGXBDEMTFGINETMJENBZ6SCHVEJQJSY
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VP2YEXEAJWI76FPM7D7VXHWD3WESQEYC
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3TDGZFLBOP27LZKLH45WQLSNPSPP7S7Z
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/AF2CNP4FVC6LDKNOO4WDCGNDYIP3MPK6
Show 27 moreShow less
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TXX76TJMZBPN3NU542MGN6B7C7QHRFGB
lists.debian.org/debian-lts-announce/2023/01/msg00045.html
nvd.nist.gov/vuln/detail/CVE-2021-28021
lists.fedoraproject.org/archives/list/[email protected]/message/3TDGZFLBOP27LZKLH45WQLSNPSPP7S7Z
lists.fedoraproject.org/archives/list/[email protected]/message/AF2CNP4FVC6LDKNOO4WDCGNDYIP3MPK6
lists.fedoraproject.org/archives/list/[email protected]/message/BEGXBDEMTFGINETMJENBZ6SCHVEJQJSY
lists.fedoraproject.org/archives/list/[email protected]/message/G2M5CRSGPRF7G3YB5CLU4FXW7ANNHAYT
lists.fedoraproject.org/archives/list/[email protected]/message/TXX76TJMZBPN3NU542MGN6B7C7QHRFGB
lists.fedoraproject.org/archives/list/[email protected]/message/VP2YEXEAJWI76FPM7D7VXHWD3WESQEYC
github.com/advisories/GHSA-w9gr-856x-c2gv
security-tracker.debian.org/tracker/CVE-2021-28021
advisories.mageia.org/MGASA-2021-0549.html
bugs.mageia.org/show_bug.cgi?id=29622
lists.fedoraproject.org/archives/list/[email protected]/thread/3TDGZFLBOP27LZKLH45WQLSNPSPP7S7Z
advisories.mageia.org/MGASA-2022-0074.html
bugs.mageia.org/show_bug.cgi?id=29937
lists.opensuse.org/archives/list/[email protected]/thread/TPIWID3WJ3SMCA23W52QU3RW6AU7JCA7
suse.com/support/update/announcement/2022/suse-su-20220157-1
bugzilla.suse.com/1191743
bugzilla.suse.com/1191942
bugzilla.suse.com/1191944
suse.com/security/cve/CVE-2021-28021
suse.com/security/cve/CVE-2021-42715
suse.com/security/cve/CVE-2021-42716
suse.com/support/update/announcement/2022/suse-su-20220163-1
ubuntu.com/security/CVE-2021-28021
cve.org/CVERecord?id=CVE-2021-28021