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 getwordrgb_row function in rdppm.c.
{
"sources": [
{
"html_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-46822",
"published": "2022-06-18T16:15:08.110Z",
"imported": "2025-10-21T15:03:32.808Z",
"url": "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2021-46822",
"id": "CVE-2021-46822",
"modified": "2024-11-21T06:34:45.830Z"
}
],
"license": "CC-BY-4.0"
}