Skip to content
CVE-2026-112398 CrowdStrike LogScale · LogScale

Detect CVE-2026-112398: Pillow FlashPix JPEG-Tile Decoder Heap Buffer Overflow (Out-of-Bounds Write) in CrowdStrike LogScale

Detects risk and exploitation indicators for CVE-2026-112398, a heap-based buffer overflow (CWE-122/CWE-787) in the Python Pillow imaging library prior to 13.0.0 (affecting versions <= 12.3.0). Pillow's FlashPix (FPX) JPEG-tile decoder can write decoded scanlines beyond the allocated tile buffer when processing a crafted FlashPix image, leading to heap corruption and potential remote code execution (CVSS 9.2). Because exploitation is driven by parsing an attacker-supplied image, detection focuses on (a) presence of vulnerable Pillow versions in the environment via package inventory and (b) runtime indicators such as Python processes crashing while decoding FlashPix/FPX files, image-processing workers ingesting .fpx files, and anomalous child processes/memory faults originating from Python image pipelines.

MITRE ATT&CK

Tactic
Initial Access Execution

LogScale Detection Query

CrowdStrike LogScale (LogScale)
cql
// df00tech DF00-5bd3fb570d · https://df00tech.com/detections/CVE-2026-112398 · licence: https://df00tech.com/detections/licence
#event_simpleName=ProcessRollup2
| in(field="FileName", values=["python.exe", "python3", "python", "pythonw.exe"])
| CommandLine=/(\.fpx|FlashPix|FpxImagePlugin|Image\.open)/i
| groupBy([aid, ComputerName, FileName], function=collect([CommandLine, timestamp]))
high severity low confidence

CrowdStrike CQL detecting Python processes whose command line references FlashPix/.fpx decoding, correlating with the vulnerable Pillow FPX code path.

Data Sources

CrowdStrike Falcon process events

Required Tables

ProcessRollup2

False Positives & Tuning

  • Legitimate Python services decoding FlashPix images.
  • Security tooling parsing FPX sample files.
  • Developer or CI runs exercising Pillow's FlashPix plugin.

Other platforms for CVE-2026-112398


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.

  1. Test 1 Decode FlashPix image with vulnerable Pillow (benign PoC harness)

    Expected signal: Process event: python3 with command line referencing FlashPix decode and opening a .fpx file; possible non-zero exit or segfault if the sample triggers the overflow.

  2. Test 2 Inventory check for vulnerable Pillow version

    Expected signal: Package/osquery inventory event reporting Pillow with a version < 13.0.0.

  3. Test 3 FlashPix decode on Windows Python worker

    Expected signal: ProcessRollup2/DeviceProcessEvents showing python.exe with a command line referencing a .fpx FlashPix decode.


Response Playbook

Triage

  1. Confirm the installed Pillow version on the affected host(s): run `python -c "import PIL; print(PIL.__version__)"` or inspect `pip show pillow`. Any version <= 12.3.0 (i.e., < 13.0.0) is vulnerable.
  2. Determine whether the host actually processes untrusted FlashPix/.fpx images (web upload handlers, thumbnailing, document/image conversion services). Hosts that never decode untrusted FPX input are lower priority.
  3. Review the triggering telemetry for the specific file decoded and its source, identify whether the .fpx file arrived from an external/untrusted channel (upload, email, shared drive).
  4. Check for Python process crashes, SIGSEGV/segfaults, or non-zero exits coinciding with FlashPix decoding, which may indicate overflow exploitation attempts rather than benign use.

Containment

  1. Upgrade Pillow to 13.0.0 or later across affected hosts and rebuild/redeploy any virtualenvs, containers, or images pinning the vulnerable version.
  2. As an interim mitigation, disable or block the FlashPix plugin where feasible (e.g., remove/neutralize FpxImagePlugin or reject .fpx uploads at the application layer) and quarantine suspicious .fpx files pending analysis.
  3. Isolate any host showing crash/memory-fault indicators tied to FlashPix decoding until forensic review confirms no code execution occurred.

Evidence Collection

  1. Preserve the suspicious .fpx file(s) and the full Python process command line, parent process, and user context from the triggering events.
  2. Collect crash artifacts: core dumps, Windows WER reports, dmesg/segfault entries, and application logs around the decode timestamp.
  3. Snapshot the host's installed Python package manifest (`pip freeze`) and container image digest to document the vulnerable Pillow version at time of event.

Escalation Criteria

  • !Escalate to incident response if a Python image-processing worker crashed or spawned unexpected child processes (shell, network tooling) immediately after decoding a FlashPix file.
  • !Escalate if the triggering .fpx file originated from an untrusted external source and the host runs a vulnerable Pillow version, as this matches the exploitable configuration (CVSS 9.2).
  • !Escalate if evidence of memory corruption is accompanied by outbound network connections or persistence changes on the affected host.

Investigation Guide

Forensic Artifacts

  • >Core dumps / crash reports from the Python process at the time of FlashPix decoding.
  • >The crafted .fpx file and its ingestion path (upload directory, mail attachment, shared storage).
  • >Installed Pillow version evidence from `pip freeze`, site-packages, or container image layers.
  • >Process ancestry and any anomalous child processes spawned by the Python image worker.

Tuning Guidance

Baseline which hosts legitimately decode FlashPix/.fpx files (document converters, media pipelines) and allowlist those services to reduce noise, while keeping the crash/memory-fault correlation active everywhere. Prioritize alerts that combine a vulnerable Pillow version (<13.0.0) with untrusted .fpx input or an abnormal Python exit. Once Pillow is upgraded to 13.0.0+ fleet-wide, downgrade the inventory-based rule to informational and retain the runtime crash correlation as a defense-in-depth check.


Hunting Queries

Hunts for any Python process handling FlashPix/.fpx images across endpoints, regardless of inventory data, to surface exposure and potential exploitation attempts.

Hunting — KQL
kql
// df00tech DF00-5bd3fb570d · https://df00tech.com/detections/CVE-2026-112398 · licence: https://df00tech.com/detections/licence
DeviceProcessEvents | where FileName has "python" | where ProcessCommandLine has_any (".fpx", "FlashPix", "FpxImagePlugin") | project Timestamp, DeviceName, AccountName, ProcessCommandLine, InitiatingProcessFileName
Hunting — SPL
spl
``` df00tech DF00-5bd3fb570d · https://df00tech.com/detections/CVE-2026-112398 · licence: https://df00tech.com/detections/licence ```
index=* (sourcetype=linux:python OR sourcetype=WinEventLog:*) (process=python* ) ("*.fpx*" OR "*FlashPix*" OR "*FpxImagePlugin*") | table _time host process command user

Atomic Red Team Tests

Test 1 Decode FlashPix image with vulnerable Pillow (benign PoC harness)
linux

In a lab, open a FlashPix (.fpx) file with a vulnerable Pillow version to generate the decode telemetry a detection should catch. Use a benign/malformed sample, not a weaponized payload.

Command

bash
python3 -c "from PIL import Image; import sys; Image.open('sample.fpx').load()" ; echo exit=$?

Cleanup

bash
rm -f sample.fpx core core.*

Expected Telemetry

Process event: python3 with command line referencing FlashPix decode and opening a .fpx file; possible non-zero exit or segfault if the sample triggers the overflow.

Expected Detection

KQL/SPL/CQL rules flag a Python process decoding a .fpx file on a host with vulnerable Pillow.

Test 2 Inventory check for vulnerable Pillow version
linux

Enumerate the installed Pillow version to validate the inventory-based detection path.

Command

bash
pip show pillow | grep -i version || python3 -c "import PIL; print('Pillow', PIL.__version__)"

Cleanup

bash
echo 'no cleanup required'

Expected Telemetry

Package/osquery inventory event reporting Pillow with a version < 13.0.0.

Expected Detection

Inventory correlation in KQL/SPL/Sumo rules flags the host as running a vulnerable Pillow version.

Test 3 FlashPix decode on Windows Python worker
windows

Simulate a Windows image-processing worker decoding a FlashPix file with vulnerable Pillow to exercise Windows endpoint telemetry.

Command

powershell
python.exe -c "from PIL import Image; Image.open(r'C:\\lab\\sample.fpx').load()"

Cleanup

powershell
del C:\lab\sample.fpx

Expected Telemetry

ProcessRollup2/DeviceProcessEvents showing python.exe with a command line referencing a .fpx FlashPix decode.

Expected Detection

CrowdStrike CQL and KQL rules match the python.exe FlashPix decode command line.

Related Detections