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": [
{
"url": "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2021-46822",
"published": "2022-06-18T16:15:08.110Z",
"modified": "2026-06-17T04:15:37.047Z",
"html_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-46822",
"imported": "2026-07-17T20:41:52.379Z",
"id": "CVE-2021-46822",
"database_specific": {
"status": "Modified"
}
}
],
"license": "CC-BY-4.0"
}