cve.bz

CVE-2021-46822 libjpeg-turbo libjpeg-turbo: Out-of-bounds Write

5.5 mediumEPSS 1.1%Fix available

Medium (5.5) in libjpeg-turbo libjpeg-turbo. EPSS 1.1% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

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
EPSS
1.1% (unchanged from 1.1% a week ago; 1.1% 30 days ago) estimated probability of exploitation activity in the next 30 days; 66th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-787 Out-of-bounds Write
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-46822 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-46822?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-46822?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-46822 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
libjpeg-turbo:libjpeg-turboafter 1.5.3 through 2.0.90

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14libjpeg-turbo1:2.1.1-1DEBIAN-CVE-2021-46822
Ubuntu18.04:LTSlibjpeg-turbo1.5.2-0ubuntu5.18.04.6USN-5631-1
Ubuntu20.04:LTSlibjpeg-turbo2.0.3-0ubuntu1.20.04.3UBUNTU-CVE-2021-46822 USN-5631-1
Red Hatenterprise_linux:9::appstreamlibjpeg-turbo, libjpeg-turbo-devel, libjpeg-turbo-utils and 4 more0:2.0.90-6.el9_1RHSA-2023:1068
Red Hatenterprise_linux:9::crbturbojpeg, turbojpeg-devel, turbojpeg-debuginfo and 3 more0:2.0.90-6.el9_1RHSA-2023:1068
AlmaLinux9turbojpeg, libjpeg-turbo, turbojpeg-devel and 2 more2.0.90-6.el9_1ALSA-2023:1068
Rocky Linux9libjpeg-turbo0:2.0.90-6.el9_1RLSA-2023:1068

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

The only way that users could potentially encounter these issues is through the tjLoadImage() function. TJBench and cjpeg are unaffected.

RHEL-8 ships libjpeg-turbo v1.5.3 which does not include vulnerable tjLoadImage() functionality.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 9libjpeg-turbo-0:2.0.90-6.el9_1Fixed 2023-03-06RHSA-2023:1068
Red Hat Enterprise Linux 6libjpeg-turboNot affected
Red Hat Enterprise Linux 7libjpeg-turboNot affected
Red Hat Enterprise Linux 8libjpeg-turboNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-46822.

References

Check your stackJSON