CVE-2021-46822: The PPM reader in libjpeg-turbo through 2.0.90 mishandles use of tjLoadImage for loading a 16-bit binary PPM f
CVE-2021-46822 is a medium-severity flaw (CVSS 5.5) affecting libjpeg-turbo. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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.
Why this priority
- No elevated risk signals yet
A fixed release or distro patch exists.
Risk facts
| CVSS score | 5.5 (Medium) |
| Attack vector | Local |
| Attack complexity | Low |
| Privileges needed | None |
| User interaction | Required |
| EPSS exploit chance | 1.1% (top 35%) |
| CISA exploited list | No |
| Weakness | CWE-787 |
| Published | 2022-06-18 |
| Last modified | 2026-06-17 |
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2021-46822?
libjpeg-turbo: upgrade to newer than 2.0.90. Exact commands for each OS are on this page.
Is CVE-2021-46822 being exploited?
CVE-2021-46822 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2021-46822 affect?
CVE-2021-46822 affects libjpeg-turbo. Severity is medium (CVSS 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 overfl
How urgent is CVE-2021-46822?
Priority 35/100. No elevated risk signals yet.
Related CVEs
- CVE-2023-2804 MEDIUM 6.5 DOWNGRADE A heap-based buffer overflow issue was discovered in libjpeg-turbo in h2v2_merged_upsample_internal() function
- CVE-2021-29390 HIGH 7.1 DOWNGRADE MITIGATE libjpeg-turbo version 2.0.90 has a heap-based buffer over-read (2 bytes) in decompress_smooth_data in jdcoefct
- CVE-2020-35538 MEDIUM 5.5 DOWNGRADE A crafted input file could cause a null pointer dereference in jcopy_sample_rows() when processed by libjpeg-t