CVE-2005-3291
SPE 0.7.5 allows local privilege escalation via world-writable executables
- CVSS 4.6
- CWE-276
- Authentication, Authorization, and Session Management
- Local
Stani's Python Editor (SPE) 0.7.5 is installed with world-writable permissions, which allows local users to gain privileges by modifying executable files.
- CWE
- CWE-276
- CVSS base score
- 4.6
- Published
- 2005-10-23
- OWASP
- A05 Security Misconfiguration
- Orthogonal defect classification
- Function
- Code defect classification
- Incorrect Functionality
- Category
- Authentication, Authorization, and Session Management
- Subcategory
- Privilege Escalation
- Accessibility scope
- Local
- Impact
- Privilege Escalation
- Affected component
- Python
- Fixed by upgrading
- Yes
Solution
Update SPE to version 0.7.6 or higher.
Vulnerable code sample
import os
# Function to install the application with world-writable permissions
def insecure_installation(directory):
# Set permissions to the directory to be world-writable
os.makedirs(directory, exist_ok=True)
os.chmod(directory, 0o777) # World-writable permissions
# Example usage
insecure_installation('/path/to/installed/spe')Patched code sample
import os
import stat
# Function to set correct permissions
def secure_installation(directory):
# Set permissions to the directory to be non-world-writable
os.chmod(directory, stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IROTH)
# Example usage
secure_installation('/path/to/installed/spe')Cite this entry
@misc{vaitp:cve20053291,
title = {{SPE 0.7.5 allows local privilege escalation via world-writable executables}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2005},
note = {VAITP Python Vulnerability Dataset, entry CVE-2005-3291},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2005-3291/}}
}
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 ::
