Every CVE Search/ Get API key

CVE-2021-28021

Buffer overflow vulnerability in function stbi__extend_receive in stb_image.h in stb 2.26 via a...

7.8 HighFix available

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

1.43%Up 1.0 points since Oct 16, 2021
90%50%10%1%

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 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS 2.0
6.8 MediumAV: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS: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

Affected packages
PackageAffectedFixed
libstb
Debian:12
before 0.0~git20220908.8b5f1f3+ds-1
0.0~git20220908.8b5f1f3+ds-1
libstb
Debian:13
before 0.0~git20220908.8b5f1f3+ds-1
0.0~git20220908.8b5f1f3+ds-1
libstb
Debian:14
before 0.0~git20220908.8b5f1f3+ds-1
0.0~git20220908.8b5f1f3+ds-1
libstb
Debian: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
libstb
Debian: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
curaengine
Mageia:8
From an advisory covering 3 CVEs
before 4.8.0-1.1.mga8
4.8.0-1.1.mga8
zxing-cpp
Mageia:8
From an advisory covering 3 CVEs
before 1.1.1-2.1.mga8
1.1.1-2.1.mga8
zxing-cpp
SUSE: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-cpp
SUSE: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-cpp
SUSE: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
Affected packages
PackageAffectedFixed
zxing-cpp
SUSE: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
libstb
Ubuntu:20.04:LTS
All versions, plus listed versions
0.0~git20190817.1.052dce1-1
None known
libstb
Ubuntu:22.04:LTS
All versions, plus listed versions
0.0~git20200713.b42009b+ds-10.0~git20210910.af1a5bc+ds-1
None known
libstb
Ubuntu: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
libstb
Ubuntu:25.10
All versions, plus listed versions
0.0~git20240715.f7f20f39fe4f+ds-10.0~git20241109.5c20573+ds-1
None known
libstb
Ubuntu:26.10
All versions, plus listed versions
0.0~git20250907.fede005+ds-1
None known
libstb
Ubuntu:26.04:LTS
All versions, plus listed versions
0.0~git20241109.5c20573+ds-10.0~git20250907.fede005+ds-1
None known
zxing-cpp
openSUSE:Leap 15.3
From an advisory covering 3 CVEs
before 1.2.0-9.7.1
1.2.0-9.7.1

History

History
RecordedChangedSources
affected, facts
aliasesEUVD
first indexedCVE 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

Show 27 moreShow less
MoveEnter Open