# CVE-2021-46822: 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 a…

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.08%, higher than 65% of CVEs (2026-12-01)
- Published: 2022-06-18T15:27:44.000Z
- Modified: 2026-06-17T04:15:37.047Z
- Weaknesses: CWE-787
- Assigned by: mitre

## Description

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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- libjpeg-turbo libjpeg-turbo: from >1.5.3 up to 2.0.90

## Every score

- NVD: 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`
- NVD: CVSS:2.0 4.3 Medium `AV:N/AC:M/Au:N/C:N/I:N/A:P`

## References

- <https://github.com/libjpeg-turbo/libjpeg-turbo/commit/f35fd27ec641c42d6b115bfa595e483ec58188d2> (patch, third-party-advisory)
- <https://exchange.xforce.ibmcloud.com/vulnerabilities/221567> (third-party-advisory, vdb-entry)

## Sources

- CVE List: [CVE-2021-46822](https://www.cve.org/CVERecord?id=CVE-2021-46822), CVE Terms of Use, modified 2024-08-04
- NVD: [CVE-2021-46822](https://nvd.nist.gov/vuln/detail/CVE-2021-46822), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-46822 · Whole record: https://cve.day/CVE-2021-46822.json · Rebuilt by cve.day 2026-11-25T22:58:07.668Z
