# CVE-2024-56327: Malicious plugin names, recipients, or identities can cause arbitrary binary execution in pyrage


- **Severity:** High 7.7 (`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`)
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 19 Dec 2024
- **Updated:** 20 Dec 2024
- **Also known as:** CLEANSTART-2025-CS89495, GHSA-32gq-x56h-299c, GHSA-47h8-jmp3-9f28, GHSA-4fg7-vxc8-qx5w, GO-2024-3344, MINI-cj3v-chmh-r24v, MINI-r86j-x9jh-chjr, PYSEC-2026-1839, RUSTSEC-2024-0432, RUSTSEC-2024-0433, UBUNTU-CVE-2024-56327, USN-8372-1

## What is CVE-2024-56327?

CVE-2024-56327 is a high-severity vulnerability in woodruffw pyrage, published on 19 Dec 2024. 

### Official description

pyrage is a set of Python bindings for the rage file encryption library (age in Rust). `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. This issue has been addressed in version 1.2.3 and all users are advised to update. There are no known workarounds for this vulnerability.

Weakness: CWE-94 (Improper Control of Generation of Code)

## Which versions are affected by CVE-2024-56327?

32 open source packages ship an affected version, including pyrage, filippo.io/age and age.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `pyrage` | PyPI | From 1.2.0 | 1.2.3 |
| `pyrage` | PyPI | From 1.2.0 | 1.2.3 |
| `pyrage` | PyPI | From 1.2.0 | 1.2.3 |
| `filippo.io/age` | Go | All versions | 1.2.1 |
| `filippo.io/age` | Go | All versions | 1.2.1 |
| `filippo.io/age` | Go | All versions | 1.2.1 |
| `age` | crates.io | From 0.10.0 | 0.10.1 |
| `age` | crates.io | From 0.10.0 | 0.10.1 |
| `age` | crates.io | From 0.11.0 | 0.11.1 |
| `age` | crates.io | From 0.11.0 | 0.11.1 |
| `age` | crates.io | From 0.6.0 | 0.6.1, 0.7.2, 0.8.2, 0.9.3, 0.10.1, 0.11.1 |
| `age` | crates.io | From 0.6.0 | 0.6.1 |
| `age` | crates.io | From 0.6.0 | 0.6.1 |
| `age` | crates.io | From 0.7.0 | 0.7.2 |
| `age` | crates.io | From 0.7.0 | 0.7.2 |
| `age` | crates.io | From 0.8.0 | 0.8.2 |
| `age` | crates.io | From 0.8.0 | 0.8.2 |
| `age` | crates.io | From 0.9.0 | 0.9.3 |
| `age` | crates.io | From 0.9.0 | 0.9.3 |
| `rage` | crates.io | From 0.10.0 | 0.10.1 |
| `rage` | crates.io | From 0.10.0 | 0.10.1 |
| `rage` | crates.io | From 0.11.0 | 0.11.1 |
| `rage` | crates.io | From 0.11.0 | 0.11.1 |
| `rage` | crates.io | From 0.6.0 | 0.6.1, 0.7.2, 0.8.2, 0.9.3, 0.10.1, 0.11.1 |
| `rage` | crates.io | From 0.6.0 | 0.6.1 |
| `rage` | crates.io | From 0.6.0 | 0.6.1 |
| `rage` | crates.io | From 0.7.0 | 0.7.2 |
| `rage` | crates.io | From 0.7.0 | 0.7.2 |
| `rage` | crates.io | From 0.8.0 | 0.8.2 |
| `rage` | crates.io | From 0.8.0 | 0.8.2 |
| `rage` | crates.io | From 0.9.0 | 0.9.3 |
| `rage` | crates.io | From 0.9.0 | 0.9.3 |

## How do I fix CVE-2024-56327?

Upgrade pyrage to 1.2.3 or later.

## Is CVE-2024-56327 being exploited?

There is no known exploitation of CVE-2024-56327 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-56327 and fix it if it is affected.

What it is: CVE-2024-56327 is a high-severity vulnerability in woodruffw pyrage, published on 19 Dec 2024. 
Exploitation: There is no known exploitation of CVE-2024-56327 in the wild and no public exploit code.

Affected packages and fixed versions:
- pyrage (PyPI): affected from 1.2.0; fixed in 1.2.3
- pyrage (PyPI): affected from 1.2.0; fixed in 1.2.3
- pyrage (PyPI): affected from 1.2.0; fixed in 1.2.3
- filippo.io/age (Go): affected all versions; fixed in 1.2.1
- filippo.io/age (Go): affected all versions; fixed in 1.2.1
- filippo.io/age (Go): affected all versions; fixed in 1.2.1
- age (crates.io): affected from 0.10.0; fixed in 0.10.1
- age (crates.io): affected from 0.10.0; fixed in 0.10.1
- age (crates.io): affected from 0.11.0; fixed in 0.11.1
- age (crates.io): affected from 0.11.0; fixed in 0.11.1
- age (crates.io): affected from 0.6.0; fixed in 0.6.1, 0.7.2, 0.8.2, 0.9.3, 0.10.1, 0.11.1
- age (crates.io): affected from 0.6.0; fixed in 0.6.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-56327/ (Markdown: https://insights.sbomify.com/CVE-2024-56327/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-56327
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-56327
- OSV: https://osv.dev/vulnerability/CVE-2024-56327

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-56327/
Summaries are generated and may contain mistakes; the official description above is the record.
