CVE-2024-56327: Pyrage Pyrage Vulnerable To Malicious Plugin Vulnerability

HIGH
Advisory Identifier: GHSA-47h8-jmp3-9f28
CVSS 9.8
CWE-25 CWE-94 CWE-1395
Published
Advisory Summary

CVE-2024-56327 is a HIGH (CVSS 9.8) pyrage vulnerable to malicious plugin vulnerability (CWE-25: Path Traversal: '/../filedir') affecting Pyrage libraries in the PyPI ecosystem. The issue involves pyrage vulnerable to malicious plugin names, recipients, or identities causing arbitrary binary execution. Remediation is available by upgrading affected packages to version 1.2.3.

CVE-2024-56327 at a Glance

CVE Identifier CVE-2024-56327
GHSA Identifier GHSA-47h8-jmp3-9f28
Severity HIGH
CVSS v3.1 Base Score 9.8
CWE Classification CWE-25: Path Traversal: '/../filedir'
Affected Product Pyrage
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2024-56327

To remediate this vulnerability, upgrade all affected Pyrage dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

pyrage fixed: 1.2.3
pip install pyrage>=1.2.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show pyrage

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-56327, inspect your installed packages using pip:

pip show pyrage

Analyze the terminal output to locate any version of Pyrage in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.3), your application is affected.

Note: The pip show pyrage command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-25: Path Traversal: '/../filedir', where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize "/../" sequences that can resolve to a location that is outside of that directory. In Pyrage, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

`pyrage` uses the Rust `age` crate for its underlying operations, and `age` is vulnerable to GHSA-4fg7-vxc8-qx5w. All details of GHSA-4fg7-vxc8-qx5w are relevant to `pyrage` for the versions specified in this advisory. See GHSA-4fg7-vxc8-qx5w for full details. Versions of `pyrage` before 1.2.0 lack plugin support and are therefore **not affected**. An equivalent issue was fixed in [the reference Go implementation of age](https://github.com/FiloSottile/age), see advisory [GHSA-32gq-x56h-299c](https://github.com/FiloSottile/age/security/advisories/GHSA-32gq-x56h-299c). Thanks to ⬡-49016 for reporting this issue.

CVE-2024-56327 Affected Pyrage Versions

1 component(s)
Fixed Versions:
1.2.3
Product / Package Ecosystem Affected Versions Fixed Version
pyrage
PyPI
≥ 1.2.0
< 1.2.3
1.2.3

References

Frequently Asked Questions

What is CVE-2024-56327?
CVE-2024-56327 is a security vulnerability in Pyrage involving pyrage vulnerable to malicious plugin names, recipients, or identities causing arbitrary binary execution under CWE-25: Path Traversal: '/../filedir'.
Which Pyrage versions are affected?
Affected versions include releases prior to 1.2.3 across affected packages: pyrage.
What version fixes CVE-2024-56327?
Upgrading to 1.2.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pyrage affected?
Yes, pyrage is affected in releases prior to 1.2.3. Upgrade your dependency to 1.2.3 or later.
What is the CVSS score of CVE-2024-56327?
CVE-2024-56327 has a CVSS v3.1 base score of 9.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2024-56327?
CVE-2024-56327 is classified under CWE-25: Path Traversal: '/../filedir' (The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize "/../" sequences that can resolve to a location that is outside of that directory.).
How can I check PyPI dependencies for CVE-2024-56327?
Run the dependency tree command: 'pip show pyrage'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-47h8-jmp3-9f28",
  "modified" : "2024-12-20T18:35:12Z",
  "published" : "2024-12-19T15:14:06Z",
  "aliases" : [ "CVE-2024-56327" ],
  "summary" : "pyrage vulnerable to malicious plugin names, recipients, or identities causing arbitrary binary execution",
  "details" : "`pyrage` uses the Rust `age` crate for its underlying operations, and `age` is vulnerable to GHSA-4fg7-vxc8-qx5w.\n\nAll details of GHSA-4fg7-vxc8-qx5w are relevant to `pyrage` for the versions specified in this advisory. See GHSA-4fg7-vxc8-qx5w for full details.\n\nVersions of `pyrage` before 1.2.0 lack plugin support and are therefore **not affected**.\n\nAn equivalent issue was fixed in [the reference Go implementation of age](https://github.com/FiloSottile/age), see advisory [GHSA-32gq-x56h-299c](https://github.com/FiloSottile/age/security/advisories/GHSA-32gq-x56h-299c).\n\nThanks to ⬡-49016 for reporting this issue.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "pyrage"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.2.0"
      }, {
        "fixed" : "1.2.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/FiloSottile/age/security/advisories/GHSA-32gq-x56h-299c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/str4d/rage/security/advisories/GHSA-4fg7-vxc8-qx5w"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/woodruffw/pyrage/security/advisories/GHSA-47h8-jmp3-9f28"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-56327"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-4fg7-vxc8-qx5w"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/woodruffw/pyrage"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1395", "CWE-25", "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-12-19T15:14:06Z",
    "nvd_published_at" : "2024-12-19T23:15:07Z"
  }
}