CVE-2026-85864
Improper privilege management in Python lets an authorized attacker locally elevate privileges.
- CVSS 7.8
- CWE-641
- Authentication, Authorization, and Session Management
- Local
Improper privilege management in Python allows an authorized attacker to elevate privileges locally.
- CWE
- CWE-641
- CVSS base score
- 7.8
- Published
- 2026-10-13
- OWASP
- A01 Broken Access Control
- Orthogonal defect classification
- Checking
- Code defect classification
- Missing Check
- Category
- Authentication, Authorization, and Session Management
- Subcategory
- Privilege Escalation
- Accessibility scope
- Local
- Impact
- Privilege Escalation
- Affected component
- Python
- Fixed by upgrading
- Yes
Solution
Upgrade Python to the latest secure release (e.g., Python 3.12.4 or newer) which contains the fix for the improper privilege‑management issue.
Vulnerable code sample
import os
def run_as_root(command):
# VULNERABLE: unconditionally elevates to root
os.setuid(0) # set effective UID to root
os.system(command)Patched code sample
import os
def run_as_root(command):
# FIX: verify current user is already root before elevating
if os.geteuid() != 0:
raise PermissionError("Insufficient privileges")
os.system(command)Cite this entry
@misc{vaitp:cve202685864,
title = {{Improper privilege management in Python lets an authorized attacker locally elevate privileges.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-85864},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-85864/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
