Every CVE Search/ Get API key

CVE-2021-46822

The PPM reader in libjpeg-turbo through 2.0.90 mishandles use of tjLoadImage for loading a 16-bit...

5.5 MediumFix available

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

1.08%Up 0.2 points since Jun 19, 2022
90%50%10%1%

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

Affected packages
PackageAffectedFixed
libjpeg-turbo
AlmaLinux:9
before 2.0.90-6.el9_1
2.0.90-6.el9_1
libjpeg-turbo-devel
AlmaLinux:9
before 2.0.90-6.el9_1
2.0.90-6.el9_1
libjpeg-turbo-utils
AlmaLinux:9
before 2.0.90-6.el9_1
2.0.90-6.el9_1
turbojpeg
AlmaLinux:9
before 2.0.90-6.el9_1
2.0.90-6.el9_1
turbojpeg-devel
AlmaLinux:9
before 2.0.90-6.el9_1
2.0.90-6.el9_1
libjpeg-turbo
Debian:12
before 1:2.1.1-1
1:2.1.1-1
libjpeg-turbo
Debian:13
before 1:2.1.1-1
1:2.1.1-1
libjpeg-turbo
Debian:14
before 1:2.1.1-1
1:2.1.1-1
JpegTurbo_jll
Julia
before 2.1.0+0
2.1.0+0
libjpeg
Mageia:8
before 2.0.8-1.mga8
2.0.8-1.mga8
Show 21 moreShow less
Affected packages
PackageAffectedFixed
libjpeg-turbo
openEuler:20.03-LTS-SP1
before 2.0.5-2.oe1
2.0.5-2.oe1
libjpeg-turbo
openEuler:20.03-LTS-SP3
before 2.0.5-2.oe1
2.0.5-2.oe1
libjpeg-turbo
Red Hat:enterprise_linux:9::appstream
before 0:2.0.90-6.el9_1
0:2.0.90-6.el9_1
libjpeg-turbo-debuginfo
Red Hat:enterprise_linux:9::appstream
before 0:2.0.90-6.el9_1
0:2.0.90-6.el9_1
libjpeg-turbo-debugsource
Red Hat:enterprise_linux:9::appstream
before 0:2.0.90-6.el9_1
0:2.0.90-6.el9_1
libjpeg-turbo-devel
Red Hat:enterprise_linux:9::appstream
before 0:2.0.90-6.el9_1
0:2.0.90-6.el9_1
libjpeg-turbo-utils
Red Hat:enterprise_linux:9::appstream
before 0:2.0.90-6.el9_1
0:2.0.90-6.el9_1
libjpeg-turbo-utils-debuginfo
Red Hat:enterprise_linux:9::appstream
before 0:2.0.90-6.el9_1
0:2.0.90-6.el9_1
turbojpeg-debuginfo
Red Hat:enterprise_linux:9::appstream
before 0:2.0.90-6.el9_1
0:2.0.90-6.el9_1
libjpeg-turbo-debuginfo
Red Hat:enterprise_linux:9::crb
before 0:2.0.90-6.el9_1
0:2.0.90-6.el9_1
libjpeg-turbo-debugsource
Red Hat:enterprise_linux:9::crb
before 0:2.0.90-6.el9_1
0:2.0.90-6.el9_1
libjpeg-turbo-utils-debuginfo
Red Hat:enterprise_linux:9::crb
before 0:2.0.90-6.el9_1
0:2.0.90-6.el9_1
turbojpeg
Red Hat:enterprise_linux:9::crb
before 0:2.0.90-6.el9_1
0:2.0.90-6.el9_1
turbojpeg-debuginfo
Red Hat:enterprise_linux:9::crb
before 0:2.0.90-6.el9_1
0:2.0.90-6.el9_1
turbojpeg-devel
Red Hat:enterprise_linux:9::crb
before 0:2.0.90-6.el9_1
0:2.0.90-6.el9_1
libjpeg-turbo
Rocky Linux:9
before 0:2.0.90-6.el9_1
0:2.0.90-6.el9_1
libjpeg-turbo
Root: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-turbo
Root: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-turbo
Ubuntu: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-turbo
Ubuntu: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-turbo
Ubuntu: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

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-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

Show 17 moreShow less
MoveEnter Open