GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration
brew-pdm-cve-2026-47781
Vulnerability from osv_homebrew
Published
2026-08-13 17:25
Modified
2026-09-15 10:09
Summary
pdm: Project-Controlled `.pdm-plugins` Content Executes Before CLI Parsing
Details

PDM is a Python package and dependency manager. In versions up to and including 2.26.9, PDM automatically loads project-local plugins from a .pdm-plugins directory during initialization, allowing an attacker-controlled file in an untrusted repository checkout to execute arbitrary Python code before any command is parsed. This happens because load_plugins() runs during Core.init() and adds .pdm-plugins via site.addsitedir(), which processes .pth files and immediately executes any line beginning with import, so the code runs with the privileges of the user invoking pdm and even a benign command such as pdm --version triggers it (making the impact strongest in CI, automation, and privileged contexts). The issue is fixed in version 2.27.0.


{
  "affected": [
    {
      "ecosystem_specific": {
        "fix": "bump",
        "range_state": "fixed",
        "upstream_fixed_in": "2.27.0"
      },
      "package": {
        "ecosystem": "Homebrew",
        "name": "pdm",
        "purl": "pkg:brew/pdm"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.28.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "confidence": "high",
    "source": "matched",
    "strategy": "git",
    "upstream_evidence": [
      {
        "ecosystem": "GIT",
        "key": "https://github.com/pdm-project/pdm",
        "name": "https://github.com/pdm-project/pdm",
        "strategy": "git",
        "subject_version": "2.29.1"
      },
      {
        "ecosystem": "PyPI",
        "key": "pkg:pypi/pdm@2.29.1",
        "name": "pdm",
        "strategy": "registry",
        "subject_version": "2.29.1"
      },
      {
        "ecosystem": "Debian",
        "key": "Debian/pdm",
        "name": "pdm",
        "strategy": "distro"
      },
      {
        "ecosystem": "GIT",
        "key": "upstream:https://github.com/pdm-project/pdm",
        "name": "https://github.com/pdm-project/pdm",
        "strategy": "distro",
        "subject_version": "2.29.1"
      },
      {
        "ecosystem": "PyPI",
        "key": "upstream:pkg:pypi/pdm@2.29.1",
        "name": "pdm",
        "strategy": "distro",
        "subject_version": "2.29.1"
      },
      {
        "ecosystem": "Ubuntu",
        "key": "Ubuntu/pdm",
        "name": "pdm",
        "strategy": "distro"
      }
    ]
  },
  "details": "PDM is a Python package and dependency manager. In versions up to and including 2.26.9, PDM automatically loads project-local plugins from a .pdm-plugins directory during initialization, allowing an attacker-controlled file in an untrusted repository checkout to execute arbitrary Python code before any command is parsed. This happens because load_plugins() runs during Core.init() and adds .pdm-plugins via site.addsitedir(), which processes .pth files and immediately executes any line beginning with import, so the code runs with the privileges of the user invoking pdm and even a benign command such as pdm --version triggers it (making the impact strongest in CI, automation, and privileged contexts). The issue is fixed in version 2.27.0.",
  "id": "BREW-pdm-CVE-2026-47781",
  "modified": "2026-09-15T10:09:47Z",
  "published": "2026-08-13T17:25:44Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/pdm-project/pdm/releases/tag/2.27.0"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/47xxx/CVE-2026-47781.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/pdm-project/pdm/security/advisories/GHSA-qq6c-99pv-prvf"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-47781"
    }
  ],
  "schema_version": "1.7.3",
  "severity": [
    {
      "score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "pdm: Project-Controlled `.pdm-plugins` Content Executes Before CLI Parsing",
  "upstream": [
    "CVE-2026-47781",
    "GHSA-qq6c-99pv-prvf",
    "PYSEC-2026-2863"
  ]
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

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…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…