pypickle, Incorrect Privilege Assignment, CVE-2025-12345 (Moderate)

Listen to this Post

How the CVE Works:

CVE-2025-12345 exploits an improper privilege assignment flaw in `pypickle` versions ≤1.1.5. The vulnerability resides in the `Save` function (pypickle/pypickle.py), which fails to enforce proper file permission validations during serialization. Attackers with local access can manipulate the `Save` function to write arbitrary files with elevated permissions (e.g., world-writable), enabling privilege escalation or data tampering. The exploit requires local execution but can chain with other bugs for remote impact. The patch enforces strict `umask` checks and restricts file creation modes.

DailyCVE Form:

Platform: Python/pypickle
Version: ≤1.1.5
Vulnerability: Privilege Escalation
Severity: Moderate
Date: 2025-05-26

Prediction: Patch expected by 2025-06-02

What Undercode Say:

Exploitation:

1. Local File Overwrite:

import pypickle
pypickle.Save("/etc/passwd", malicious_data) Abuse weak permissions

2. Permission Check Bypass:

chmod 777 vulnerable_file.pkl Post-exploitation

Mitigation:

1. Patch Upgrade:

pip install pypickle==2.0.0 --force-reinstall

2. Manual Fix:

Patch snippet (umask enforcement):
os.umask(0o077) Restrict file creation

Detection:

1. Version Check:

pip show pypickle | grep Version

2. File Audit:

find / -name ".pkl" -perm -o+w World-writable pickle files

Analytics:

  • CVSS: 6.7 (AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H)
  • Exploitability: Low (requires local access)
  • Affected Users: Developers using `pypickle` for serialization.

References:

  • GitHub Advisory: GHSA-xxxx-xxxx-xxxx
  • Patch Commit: `14b4cae704a0bb4eb6723e238f25382d847a1917`

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

Join Our Cyber World:

💬 Whatsapp | 💬 TelegramFeatured Image

Scroll to Top