---
id: "CVE-2026-120435"
kind: "vulnerability"
aliases: ["CVE-2026-120435"]
title: "Netpbm: crafted XPM file overflows heap in xpmtoppm converter"
severity: "high"
cvss: 8.5
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["image-processing", "linux", "netpbm", "package", "xpmtoppm"]
not_affected_if: ["netpbm-not-installed", "no-untrusted-xpm-input"]
published_at: "2026-11-02T15:17:25+00:00"
first_seen_at: "2026-11-02T15:24:02+00:00"
updated_at: "2026-11-02T15:25:57+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-120435", "first_seen_at": "2026-11-02T15:24:02+00:00"}]
---

# Netpbm: crafted XPM file overflows heap in xpmtoppm converter

Netpbm's xpmtoppm tool trusts a characters-per-pixel value in an XPM image header, so a crafted file overruns a fixed heap buffer. An attacker who gets a victim to convert such a file can crash the tool or possibly run code.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `ppmtopgm --version` or `xpmtoppm --version` (or check the installed Netpbm package version) and compare against the fixed ranges.
- Look for the `xpmtoppm` binary in use on systems that process untrusted XPM images.

## Fix

- Netpbm `10.86.51` (before 10.86.51 is affected)
- Netpbm `11.02.30` for the 11.x line (before 11.02.30 is affected)
- Netpbm `11.15.08` for the 11.03 line (11.03 before 11.15.08 is affected)

## Timeline

- 2026-11-02T15:24:02+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-120435

## Documents

- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/netpbm-before-10.86.51-11.02.30-and-11.15.08-heap-overflow-in-xpmtoppm

## From the sources

Netpbm before 10.86.51, 11.x before 11.02.30, and 11.03 before 11.15.08 contains a heap buffer overflow in xpmtoppm caused by an unvalidated characters-per-pixel value in the XPM header. Attackers can supply a crafted XPM file with characters-per-pixel greater than 3 to overrun fixed 3-byte colorName hash entries, causing crashes or potentially code execution.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
