CVE-2024-56327

9.8 CRITICAL

📋 TL;DR

This vulnerability in pyrage (Python bindings for the age encryption library) allows arbitrary code execution through maliciously crafted age files. Attackers can exploit this to execute arbitrary code on systems processing untrusted age-encrypted files. All users of pyrage versions 1.2.0 through 1.2.2 are affected.

💻 Affected Systems

Products:
  • pyrage
Versions: 1.2.0 through 1.2.2
Operating Systems: All platforms running Python
Default Config Vulnerable: ⚠️ Yes
Notes: Versions before 1.2.0 lack plugin support and are NOT affected. The vulnerability stems from the underlying Rust age crate vulnerability GHSA-4fg7-vxc8-qx5w.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise allowing attackers to execute arbitrary code with the privileges of the pyrage process, potentially leading to data theft, ransomware deployment, or complete system takeover.

🟠

Likely Case

Remote code execution when processing untrusted age files, enabling attackers to install malware, exfiltrate data, or pivot to other systems.

🟢

If Mitigated

Limited impact if systems only process trusted age files and have proper network segmentation and privilege separation.

🌐 Internet-Facing: HIGH - Systems accepting untrusted age files from external sources are directly exploitable.
🏢 Internal Only: MEDIUM - Internal systems processing age files from untrusted internal sources remain vulnerable.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires the victim to process a malicious age file. No authentication is needed if the system accepts untrusted files.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.2.3

Vendor Advisory: https://github.com/woodruffw/pyrage/security/advisories/GHSA-47h8-jmp3-9f28

Restart Required: No

Instructions:

1. Update pyrage using pip: 'pip install --upgrade pyrage==1.2.3' 2. Verify the update with: 'pip show pyrage' 3. Test that age file processing still works with trusted files.

🔧 Temporary Workarounds

Downgrade to pre-1.2.0

all

Revert to version 1.1.0 or earlier which lacks plugin support and is not vulnerable

pip install pyrage==1.1.0

🧯 If You Can't Patch

  • Restrict age file processing to only trusted, verified sources
  • Isolate pyrage processes in containers or VMs with minimal privileges and network access

🔍 How to Verify

Check if Vulnerable:

Check pyrage version with: 'pip show pyrage | grep Version' - if version is 1.2.0, 1.2.1, or 1.2.2, the system is vulnerable.

Check Version:

pip show pyrage | grep Version

Verify Fix Applied:

Verify pyrage version is 1.2.3 or higher with: 'pip show pyrage | grep Version'

📡 Detection & Monitoring

Log Indicators:

  • Unexpected process creation from pyrage/python processes
  • Failed age file decryption attempts with unusual patterns

Network Indicators:

  • Outbound connections from pyrage processes to unexpected destinations
  • Unusual file transfers following age file processing

SIEM Query:

Process creation where parent_process contains 'python' and process_name contains unusual commands or connections

🔗 References

📤 Share & Export