2026-06-22 21:4CVE-2025-71358VulnCheck
PUBLISHED5.2CWE-502

picklescan - Remote Code Execution via idlelib.autocomplete.AutoComplete.get_entity

picklescan before 0.0.29 fails to detect malicious pickle files that exploit idlelib.autocomplete.AutoComplete.get_entity function in reduce methods. Attackers can embed undetected code in pickle files that executes arbitrary commands when loaded by victims using pickle.load().

Problem type

Affected products

picklescan

picklescan

< 0.0.29 - AFFECTED

0.0.29 - UNAFFECTED

References

GitHub Security Advisories

GHSA-6w4w-5w54-rjvr

Picklescan has a missing detection when calling built-in python idlelib.autocomplete.AutoComplete.get_entity

https://github.com/advisories/GHSA-6w4w-5w54-rjvr

Summary

Using idlelib.autocomplete.AutoComplete.get_entity, which is a built-in python library function to execute remote pickle file.

Details

The attack payload executes in the following steps:

First, the attacker craft the payload by calling to idlelib.autocomplete.AutoComplete.get_entity function in reduce method Then when the victim after checking whether the pickle file is safe by using Picklescan library and this library doesn't dectect any dangerous functions, decide to pickle.load() this malicious pickle file, thus lead to remote code execution.

PoC

class EvilIdlelibAutocompleteGetEntity:
    def __reduce__(self):
        from idlelib.autocomplete import AutoComplete
        return AutoComplete().get_entity, ("__import__('os').system('whoami')",)

Impact

Who is impacted? Any organization or individual relying on picklescan to detect malicious pickle files inside PyTorch models. What is the impact? Attackers can embed malicious code in pickle file that remains undetected but executes when the pickle file is loaded. Supply Chain Attack: Attackers can distribute infected pickle files across ML models, APIs, or saved Python objects.

Corresponding

https://github.com/FredericDT https://github.com/Qhaoduoyu

JSON source

https://cveawg.mitre.org/api/cve/CVE-2025-71358
Click to expand
{
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "cveMetadata": {
    "cveId": "CVE-2025-71358",
    "assignerOrgId": "83251b91-4cc7-4094-a5c7-464a1b83ea10",
    "assignerShortName": "VulnCheck",
    "dateUpdated": "2026-06-22T21:04:42.672Z",
    "dateReserved": "2026-06-20T12:55:02.882Z",
    "datePublished": "2026-06-22T21:04:42.672Z",
    "state": "PUBLISHED"
  },
  "containers": {
    "cna": {
      "providerMetadata": {
        "orgId": "83251b91-4cc7-4094-a5c7-464a1b83ea10",
        "shortName": "VulnCheck",
        "dateUpdated": "2026-06-22T21:04:42.672Z"
      },
      "datePublic": "2025-08-26T00:00:00.000Z",
      "title": "picklescan - Remote Code Execution via idlelib.autocomplete.AutoComplete.get_entity",
      "descriptions": [
        {
          "lang": "en",
          "value": "picklescan before 0.0.29 fails to detect malicious pickle files that exploit idlelib.autocomplete.AutoComplete.get_entity function in reduce methods. Attackers can embed undetected code in pickle files that executes arbitrary commands when loaded by victims using pickle.load()."
        }
      ],
      "affected": [
        {
          "vendor": "picklescan",
          "product": "picklescan",
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "0",
              "status": "affected",
              "versionType": "semver",
              "lessThan": "0.0.29"
            },
            {
              "version": "0.0.29",
              "status": "unaffected",
              "versionType": "semver"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "lang": "en",
              "description": "Deserialization of Untrusted Data",
              "cweId": "CWE-502",
              "type": "CWE"
            }
          ]
        }
      ],
      "references": [
        {
          "url": "https://github.com/mmaitre314/picklescan/security/advisories/GHSA-6w4w-5w54-rjvr",
          "name": "GitHub Security Advisory (GHSA-6w4w-5w54-rjvr)",
          "tags": [
            "vendor-advisory"
          ]
        },
        {
          "url": "https://www.vulncheck.com/advisories/picklescan-remote-code-execution-via-idlelib-autocomplete-autocomplete-get-entity",
          "name": "VulnCheck Advisory: picklescan - Remote Code Execution via idlelib.autocomplete.AutoComplete.get_entity",
          "tags": [
            "third-party-advisory"
          ]
        }
      ],
      "metrics": [
        {
          "format": "CVSS"
        },
        {
          "format": "CVSS",
          "cvssV3_1": {
            "version": "3.1",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N",
            "attackVector": "NETWORK",
            "attackComplexity": "LOW",
            "privilegesRequired": "NONE",
            "userInteraction": "REQUIRED",
            "scope": "UNCHANGED",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "HIGH",
            "availabilityImpact": "NONE",
            "baseScore": 8.1,
            "baseSeverity": "HIGH"
          }
        }
      ],
      "credits": [
        {
          "lang": "en",
          "value": "FredericDT",
          "type": "reporter"
        }
      ]
    }
  }
}