Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-112275 Overview
CVE-2026-112275 is a heap out-of-bounds write vulnerability [CWE-787] in Netpbm through version 11.16.00. The flaw resides in the pr_load_image function of the rasttopnm utility, which decodes Sun rasterfile images in converter/other/rast.c. An attacker crafts a byte-encoded rasterfile with tiny declared dimensions paired with a long run-length encoded (RLE) body. When rasttopnm decodes this payload, the run-length decoder writes attacker-controlled bytes past the md_image heap buffer. The result is memory corruption and process crashes in any workflow that converts untrusted Sun raster images using Netpbm.
Critical Impact
A malicious Sun rasterfile processed by rasttopnm corrupts heap memory, crashing conversion pipelines and potentially enabling further exploitation of local processes handling untrusted image input.
Affected Products
- Netpbm versions up to and including 11.16.00
- The rasttopnm converter binary (converter/other/rast.c)
- Downstream distributions and image processing pipelines that bundle vulnerable Netpbm builds
Discovery Timeline
- 2026-10-19 - CVE-2026-112275 published to the National Vulnerability Database
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-112275
Vulnerability Analysis
The vulnerability lives in the Sun rasterfile RLE decoder inside pr_load_image. Netpbm allocates the destination buffer md_image based on the image dimensions declared in the rasterfile header. The decoder then walks the byte-encoded body, expanding run-length tokens into pixel bytes.
The decoder does not validate that the expanded byte count stays within the bounds of md_image. An attacker specifies a very small width and height in the header while supplying a much larger RLE body. The RLE expansion continues past the end of the allocated buffer, writing attacker-controlled bytes into adjacent heap memory. Classified as CWE-787, this condition corrupts heap metadata and neighboring allocations, producing crashes and potential control-flow consequences depending on the surrounding allocator state.
Root Cause
The root cause is the absence of a bounds check between the RLE output pointer and the end of the md_image allocation. The decoder trusts the header dimensions when sizing the buffer but trusts the body length when writing. The two values are never cross-checked, so a mismatched rasterfile drives the write cursor past the allocation.
Attack Vector
Exploitation is local and requires user interaction. The attacker delivers a malicious .rast file through email, a download, a shared folder, or an automated conversion pipeline. A user or batch job invokes rasttopnm on the file, triggering the out-of-bounds write. The attacker controls the written bytes through the RLE payload, giving precise influence over the corruption pattern. See the HackMD technical analysis and the VulnCheck advisory for the detailed decoder walkthrough.
Detection Methods for CVE-2026-112275
Indicators of Compromise
- Unexpected crashes or SIGABRT signals from rasttopnm processes, especially when invoked by image conversion services or document pipelines
- Sun rasterfiles whose declared width and height are small while the on-disk file size is disproportionately large
- Core dumps referencing pr_load_image or heap allocator abort messages during Netpbm conversion jobs
Detection Strategies
- Scan file ingestion paths for .rast or .im1/.im8/.im24/.im32 files and inspect header dimensions against file length
- Monitor process execution telemetry for rasttopnm invocations against files sourced from untrusted locations such as mail attachments, web uploads, or shared drives
- Hunt for Netpbm binary versions at or below 11.16.00 across endpoints and build systems using software inventory data
Monitoring Recommendations
- Alert on repeated non-zero exit codes or signal terminations from rasttopnm and parent conversion daemons
- Log command-line arguments for Netpbm utilities so investigators can retrieve the triggering input file after a crash
- Enable heap hardening telemetry such as glibc MALLOC_CHECK_ or AddressSanitizer in test environments to surface corruption early
How to Mitigate CVE-2026-112275
Immediate Actions Required
- Inventory all systems and container images that ship Netpbm and identify versions at or below 11.16.00
- Restrict rasttopnm execution to trusted inputs and remove the binary from automated pipelines that process untrusted user-supplied images
- Sandbox any required Netpbm conversion jobs using seccomp, AppArmor, or isolated containers to contain memory corruption
Patch Information
Monitor the Netpbm project on SourceForge and the upstream rast.c source tree for a fixed release above 11.16.00. Downstream Linux distributions typically ship Netpbm as a separate package, so apply vendor updates once they publish patched builds referencing CVE-2026-112275.
Workarounds
- Remove or chmod 0000 the rasttopnm binary on systems that do not require Sun rasterfile conversion
- Pre-filter uploaded rasterfiles by validating that the RLE body length is consistent with the declared width, height, and depth before invoking rasttopnm
- Replace rasttopnm in conversion workflows with an alternative decoder for Sun raster images until a patched Netpbm release is deployed
# Configuration example: block rasttopnm execution and reject oversized rasterfiles
chmod 0000 /usr/bin/rasttopnm
# Reject .rast files larger than a sane threshold before conversion
find /var/spool/convert -name '*.rast' -size +256k -delete
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

