CVE-2021-46822
The PPM reader in libjpeg-turbo through 2.0.90 mishandles use of tjLoadImage for loading a 16-bit...
The PPM reader in libjpeg-turbo through 2.0.90 mishandles use of tjLoadImage for loading a 16-bit binary PPM file into a grayscale buffer and loading a 16-bit binary PGM file into an RGB buffer. This is related to a heap-based buffer overflow in the get_word_rgb_row function in rdppm.c.
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
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
5.5
The PPM reader in libjpeg-turbo through 2.0.90 mishandles use of tjLoadImage for loading a 16-bit binary PPM file into a grayscale buffer and loading a 16-bit binary PGM file into an RGB buffer. This is related to a heap-based buffer overflow in the get_word_rgb_row function in rdppm.c.
- Record
CVE-2021-46822- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - CVSS 2.0
- 4.3 Medium
AV:N/AC:M/Au:N/C:N/I:N/A:P - Weakness
- CWE-787
- Updated
- 2026-11-02
CVE List No score
The PPM reader in libjpeg-turbo through 2.0.90 mishandles use of tjLoadImage for loading a 16-bit binary PPM file into a grayscale buffer and loading a 16-bit binary PGM file into an RGB buffer. This is related to a heap-based buffer overflow in the get_word_rgb_row function in rdppm.c.
- Record
CVE-2021-46822- Updated
- 2026-11-02
EUVDEUVD-2021-33478 No score
The PPM reader in libjpeg-turbo through 2.0.90 mishandles use of tjLoadImage for loading a 16-bit binary PPM file into a grayscale buffer and loading a 16-bit binary PGM file into an RGB buffer. This is related to a heap-based buffer overflow in the get_word_rgb_row function in rdppm.c.
- Record
EUVD-2021-33478- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-p468-hq86-gghc
5.5
The PPM reader in libjpeg-turbo through 2.0.90 mishandles use of tjLoadImage for loading a 16-bit...
The PPM reader in libjpeg-turbo through 2.0.90 mishandles use of tjLoadImage for loading a 16-bit binary PPM file into a grayscale buffer and loading a 16-bit binary PGM file into an RGB buffer. This is related to a heap-based buffer overflow in the get_word_rgb_row function in rdppm.c.
- Record
GHSA-p468-hq86-gghc- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Weakness
- CWE-787
- Updated
- 2026-11-02
OSV
5.5
The PPM reader in libjpeg-turbo through 2.0.90 mishandles use of tjLoadImage for loading a 16-bit binary PPM file into a grayscale buffer and loading a 16-bit binary PGM file into an RGB buffer. This is related to a heap-based buffer overflow in the get_word_rgb_row function in rdppm.c.
- Record
CVE-2021-46822- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2021-46822
5.5
The PPM reader in libjpeg-turbo through 2.0.90 mishandles use of tjLoadImage for loading a 16-bit binary PPM file into a grayscale buffer and loading a 16-bit binary PGM file into an RGB buffer. This is related to a heap-based buffer overflow in the get_word_rgb_row function in rdppm.c.
- Record
DEBIAN-CVE-2021-46822- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
Show 9 moreShow less
OSVJLSEC-2025-180
5.5
The PPM reader in libjpeg-turbo through 2.0.90 mishandles use of tjLoadImage for loading a 16-bit...
The PPM reader in libjpeg-turbo through 2.0.90 mishandles use of tjLoadImage for loading a 16-bit binary PPM file into a grayscale buffer and loading a 16-bit binary PGM file into an RGB buffer. This is related to a heap-based buffer overflow in the get_word_rgb_row function in rdppm.c.
- Record
JLSEC-2025-180- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - CVSS 2.0
- 4.3 Medium
AV:N/AC:M/Au:N/C:N/I:N/A:P - Updated
- 2026-11-02
OSVOESA-2022-1745
5.5
libjpeg-turbo security update
Security Fix(es):
The PPM reader in libjpeg-turbo through 2.0.90 mishandles use of tjLoadImage for loading a 16-bit binary PPM file into a grayscale buffer and loading a 16-bit binary PGM file into an RGB buffer. This is related to a heap-based buffer overflow in the get_word_rgb_row function in rdppm.c.(CVE-2021-46822)
- Record
OESA-2022-1745- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVRHSA-2023:1068
5.5
Red Hat Security Advisory: libjpeg-turbo security update
- Record
RHSA-2023:1068- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-46822
5.5
The PPM reader in libjpeg-turbo through 2.0.90 mishandles use of tjLoadImage for loading a 16-bit binary PPM file into a grayscale buffer and loading a 16-bit binary PGM file into an RGB buffer. This is related to a heap-based buffer overflow in the get_word_rgb_row function in rdppm.c.
- Record
UBUNTU-CVE-2021-46822- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVALSA-2023:1068 No score
Moderate: libjpeg-turbo security update
The libjpeg-turbo packages contain a library of functions for manipulating JPEG images. They also contain simple client programs for accessing the libjpeg functions. These packages provide the same functionality and API as libjpeg but with better performance.
Security Fix(es):
- libjpeg-turbo: heap buffer overflow in get_word_rgb_row() in rdppm.c (CVE-2021-46822)
For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.
- Record
ALSA-2023:1068- Updated
- 2026-11-02
OSVMGASA-2022-0353 No score
Updated libjpeg packages fix security vulnerability
The PPM reader in libjpeg-turbo through 2.0.90 mishandles use of tjLoadImage for loading a 16-bit binary PPM file into a grayscale buffer and loading a 16-bit binary PGM file into an RGB buffer. This is related to a heap-based buffer overflow in the get_word_rgb_row function in rdppm.c. (CVE-2021-46822)
- Record
MGASA-2022-0353- Updated
- 2026-11-02
OSVRLSA-2023:1068 No score
Moderate: libjpeg-turbo security update
The libjpeg-turbo packages contain a library of functions for manipulating JPEG images. They also contain simple client programs for accessing the libjpeg functions. These packages provide the same functionality and API as libjpeg but with better performance.
Security Fix(es):
- libjpeg-turbo: heap buffer overflow in get_word_rgb_row() in rdppm.c (CVE-2021-46822)
For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.
- Record
RLSA-2023:1068- Updated
- 2026-11-02
OSVROOT-OS-DEBIAN-11-CVE-2021-46822 No score
CVE-2021-46822 in libjpeg-turbo - Patched by Root
Root has patched CVE-2021-46822 in the libjpeg-turbo package for Root:Debian:11. Multiple fixed versions available.
- Record
ROOT-OS-DEBIAN-11-CVE-2021-46822- Updated
- 2026-11-02
OSVUSN-5631-1 No score
libjpeg-turbo vulnerabilities
It was discovered that libjpeg-turbo incorrectly handled certain EOF characters. An attacker could possibly use this issue to cause libjpeg-turbo to consume resource, leading to a denial of service. This issue only affected Ubuntu 18.04 LTS. (CVE-2018-11813)
It was discovered that libjpeg-turbo incorrectly handled certain malformed jpeg files. An attacker could possibly use this issue to cause libjpeg-turbo to crash, resulting in a denial of service. (CVE-2020-17541, CVE-2020-35538)
It was discovered that libjpeg-turbo incorrectly handled certain malformed PPM files. An attacker could use this issue to cause libjpeg-turbo to crash, resulting in a denial of service, or possibly execute arbitrary code. This issue only affected Ubuntu 20.04 LTS. (CVE-2021-46822)
- Record
USN-5631-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
libjpeg-turboAlmaLinux:9 |
before 2.0.90-6.el9_1 | 2.0.90-6.el9_1 |
libjpeg-turbo-develAlmaLinux:9 |
before 2.0.90-6.el9_1 | 2.0.90-6.el9_1 |
libjpeg-turbo-utilsAlmaLinux:9 |
before 2.0.90-6.el9_1 | 2.0.90-6.el9_1 |
turbojpegAlmaLinux:9 |
before 2.0.90-6.el9_1 | 2.0.90-6.el9_1 |
turbojpeg-develAlmaLinux:9 |
before 2.0.90-6.el9_1 | 2.0.90-6.el9_1 |
libjpeg-turboDebian:12 |
before 1:2.1.1-1 | 1:2.1.1-1 |
libjpeg-turboDebian:13 |
before 1:2.1.1-1 | 1:2.1.1-1 |
libjpeg-turboDebian:14 |
before 1:2.1.1-1 | 1:2.1.1-1 |
JpegTurbo_jllJulia |
before 2.1.0+0 | 2.1.0+0 |
libjpegMageia:8 |
before 2.0.8-1.mga8 | 2.0.8-1.mga8 |
Show 21 moreShow less
| Package | Affected | Fixed |
|---|---|---|
libjpeg-turboopenEuler:20.03-LTS-SP1 |
before 2.0.5-2.oe1 | 2.0.5-2.oe1 |
libjpeg-turboopenEuler:20.03-LTS-SP3 |
before 2.0.5-2.oe1 | 2.0.5-2.oe1 |
libjpeg-turboRed Hat:enterprise_linux:9::appstream |
before 0:2.0.90-6.el9_1 | 0:2.0.90-6.el9_1 |
libjpeg-turbo-debuginfoRed Hat:enterprise_linux:9::appstream |
before 0:2.0.90-6.el9_1 | 0:2.0.90-6.el9_1 |
libjpeg-turbo-debugsourceRed Hat:enterprise_linux:9::appstream |
before 0:2.0.90-6.el9_1 | 0:2.0.90-6.el9_1 |
libjpeg-turbo-develRed Hat:enterprise_linux:9::appstream |
before 0:2.0.90-6.el9_1 | 0:2.0.90-6.el9_1 |
libjpeg-turbo-utilsRed Hat:enterprise_linux:9::appstream |
before 0:2.0.90-6.el9_1 | 0:2.0.90-6.el9_1 |
libjpeg-turbo-utils-debuginfoRed Hat:enterprise_linux:9::appstream |
before 0:2.0.90-6.el9_1 | 0:2.0.90-6.el9_1 |
turbojpeg-debuginfoRed Hat:enterprise_linux:9::appstream |
before 0:2.0.90-6.el9_1 | 0:2.0.90-6.el9_1 |
libjpeg-turbo-debuginfoRed Hat:enterprise_linux:9::crb |
before 0:2.0.90-6.el9_1 | 0:2.0.90-6.el9_1 |
libjpeg-turbo-debugsourceRed Hat:enterprise_linux:9::crb |
before 0:2.0.90-6.el9_1 | 0:2.0.90-6.el9_1 |
libjpeg-turbo-utils-debuginfoRed Hat:enterprise_linux:9::crb |
before 0:2.0.90-6.el9_1 | 0:2.0.90-6.el9_1 |
turbojpegRed Hat:enterprise_linux:9::crb |
before 0:2.0.90-6.el9_1 | 0:2.0.90-6.el9_1 |
turbojpeg-debuginfoRed Hat:enterprise_linux:9::crb |
before 0:2.0.90-6.el9_1 | 0:2.0.90-6.el9_1 |
turbojpeg-develRed Hat:enterprise_linux:9::crb |
before 0:2.0.90-6.el9_1 | 0:2.0.90-6.el9_1 |
libjpeg-turboRocky Linux:9 |
before 0:2.0.90-6.el9_1 | 0:2.0.90-6.el9_1 |
libjpeg-turboRoot:Debian:11 |
before 1:2.0.6-4.root.io.1 | 1:2.0.6-4.root.io.11:2.0.6-4.root.io.21:2.0.6-4.root.io.41:2.0.6-4.aikido.61:2.0.6-4.root.io.31:2.0.6-4.root.io.5 |
rootio-libjpeg-turboRoot:Debian:11 |
before 1:2.0.6-4.root.io.1 | 1:2.0.6-4.root.io.11:2.0.6-4.root.io.21:2.0.6-4.root.io.41:2.0.6-4.aikido.61:2.0.6-4.root.io.31:2.0.6-4.root.io.5 |
libjpeg-turboUbuntu:20.04:LTS |
before 2.0.3-0ubuntu1.20.04.3, plus listed versions 2.0.3-0ubuntu12.0.3-0ubuntu1.20.04.1 |
2.0.3-0ubuntu1.20.04.3 |
libjpeg-turboUbuntu:18.04:LTS From an advisory covering 4 CVEs |
before 1.5.2-0ubuntu5.18.04.6, plus listed versions 1.5.2-0ubuntu51.5.2-0ubuntu5.18.04.11.5.2-0ubuntu5.18.04.31.5.2-0ubuntu5.18.04.4 |
1.5.2-0ubuntu5.18.04.6 |
libjpeg-turboUbuntu:20.04:LTS From an advisory covering 4 CVEs |
before 2.0.3-0ubuntu1.20.04.3, plus listed versions 2.0.3-0ubuntu12.0.3-0ubuntu1.20.04.1 |
2.0.3-0ubuntu1.20.04.3 |
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-46822 is a medium vulnerability (CVSS 5.5) in Libjpeg-turbo, published June 18, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.08%, the 65th percentile. Fixed in libjpeg-turbo 2.0.90-6.el9_1.
References
github.com/libjpeg-turbo/libjpeg-turbo/commit/f35fd27ec641c42d6b115bfa595e483ec58188d2
exchange.xforce.ibmcloud.com/vulnerabilities/221567
nvd.nist.gov/vuln/detail/CVE-2021-46822
github.com/advisories/GHSA-p468-hq86-gghc
access.redhat.com/errata/RHSA-2023:1068
access.redhat.com/security/cve/CVE-2021-46822
Show 17 moreShow less
bugzilla.redhat.com/2100044
errata.almalinux.org/9/ALSA-2023-1068.html
security-tracker.debian.org/tracker/CVE-2021-46822
advisories.mageia.org/MGASA-2022-0353.html
bugs.mageia.org/show_bug.cgi?id=30886
ubuntu.com/security/notices/USN-5631-1
github.com/libjpeg-turbo/libjpeg-turbo/blob/2.0.8-esr/ChangeLog.md
openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2022-1745
access.redhat.com/security/updates/classification
bugzilla.redhat.com/show_bug.cgi?id=2100044
security.access.redhat.com/data/csaf/v2/advisories/2023/rhsa-2023_1068.json
cve.org/CVERecord?id=CVE-2021-46822
errata.rockylinux.org/RLSA-2023:1068
ubuntu.com/security/CVE-2021-46822
ubuntu.com/security/CVE-2018-11813
ubuntu.com/security/CVE-2020-17541
ubuntu.com/security/CVE-2020-35538