Skip to content
Heist/ feed
Back to feed
Critical

imgaug contains an insecure deserialization vulnerability in BackgroundAugmenter class within multicore.py module

Type: advisorySources: OSV

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.

Products
imgaug
Affected versions
0.2.0, 0.2.1, 0.2.3, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.2.8, 0.2.9, 0.3.0, 0.4.0
Fixed versions
Not specified
CVEs
CVE-2026-31235
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 18:51 UTC · Revision 1

Source evidence

imgaug contains an insecure deserialization vulnerability in BackgroundAugmenter class within multicore.py module

core-osv · Original source

Published 12 May 2026, 18:30 UTC

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.

osv:GHSA-g82g-j283-hj97

imgaug

Fixed versions: Not specified

Complete source record
{
  "id": "e024e0edd0013ed2894c469bae332eb019e403ec7b5e54638726135dd3e4616b",
  "url": "https://osv.dev/vulnerability/GHSA-g82g-j283-hj97",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "imgaug contains an insecure deserialization vulnerability in BackgroundAugmenter class within multicore.py module",
    "summary": "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.",
    "evidence": "osv:GHSA-g82g-j283-hj97",
    "products": [
      {
        "name": {
          "value": "imgaug",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.2.0",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.2.1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.2.3",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.2.4",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.2.5",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.2.6",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.2.7",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.2.8",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.2.9",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.3.0",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.4.0",
            "evidence": "/affected/0/versions"
          }
        ]
      }
    ],
    "severity": "critical",
    "structured": {
      "id": "GHSA-g82g-j283-hj97",
      "aliases": [
        "CVE-2026-31235",
        "GHSA-g82g-j283-hj97",
        "PYSEC-2026-356"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "last_affected": "0.4.0"
                }
              ]
            }
          ],
          "package": {
            "name": "imgaug",
            "purl": "pkg:pypi/imgaug",
            "ecosystem": "PyPI"
          },
          "versions": [
            "0.2.0",
            "0.2.1",
            "0.2.3",
            "0.2.4",
            "0.2.5",
            "0.2.6",
            "0.2.7",
            "0.2.8",
            "0.2.9",
            "0.3.0",
            "0.4.0"
          ],
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-g82g-j283-hj97/GHSA-g82g-j283-hj97.json"
          }
        }
      ],
      "modified": "2026-10-27T17:27:43.511108038Z",
      "provider": "osv",
      "references": [
        "https://nvd.nist.gov/vuln/detail/CVE-2026-31235",
        "https://github.com/aleju/imgaug",
        "https://github.com/pypa/advisory-database/tree/main/vulns/imgaug/PYSEC-2026-356.yaml",
        "https://pypi.org/project/imgaug",
        "https://www.notion.so/CVE-2026-31235-35d1e139318881efb701d814228424a9"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-502"
        ],
        "severity": "CRITICAL",
        "github_reviewed": true,
        "nvd_published_at": "2026-05-12T18:16:51Z",
        "github_reviewed_at": "2026-05-27T22:25:43Z"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-31235",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/database_specific/severity"
  },
  "source_id": "core-osv",
  "document_id": 463041,
  "published_at": "2026-05-12T18:30:41+00:00"
}