---
id: CVE-2026-31235
aliases:
  - GHSA-g82g-j283-hj97
  - PYSEC-2026-356
title: >-
  imgaug contains an insecure deserialization vulnerability in
  BackgroundAugmenter class within multicore.py module
summary: >-
  imgaug contains an insecure deserialization vulnerability in
  BackgroundAugmenter class within multicore.py module
severity: critical
cvss: 9.8
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'
vendor: imgaug
product: imgaug
ecosystem: pip
affected:
  - imgaug <= 0.4.0
published: '2026-05-12'
updated: '2026-10-27'
sourceUpdated: '2026-10-27T17:27:43.511108038Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-g82g-j283-hj97'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-31235'
  - url: 'https://github.com/aleju/imgaug'
  - url: >-
      https://github.com/pypa/advisory-database/tree/main/vulns/imgaug/PYSEC-2026-356.yaml
  - url: 'https://pypi.org/project/imgaug'
  - url: 'https://www.notion.so/CVE-2026-31235-35d1e139318881efb701d814228424a9'
  - url: 'https://github.com/advisories/GHSA-g82g-j283-hj97'
tags:
  - osv
  - pip
  - ghsa
epss: 0.00473
epssPercentile: 0.40695
cwe:
  - CWE-502
ingestedAt: '2026-10-27T17:33:23.771Z'
---

## Overview

The imgaug library thru 0.4.0 contains an insecure deserialization vulnerability in its BackgroundAugmenter class within the multicore.py module. The class uses Python's pickle module to deserialize data received via a multiprocessing queue in the _augment_images_worker() method without any safety checks. An attacker who can influence the data placed into this queue (e.g., through social engineering, malicious input scripts, or a compromised shared queue) can provide a malicious pickle payload. When deserialized, this payload can execute arbitrary code in the context of the worker process, leading to remote or local code execution depending on the deployment scenario.

## Affected packages

- `imgaug <= 0.4.0`

## Remediation

Refer to the advisory for the patched release.
