CVE-2013-2013
Local users can access sensitive data via the –password argument in python-keystoneclient before 0.2.4
- CVSS 2.1
- CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
- Input Validation and Sanitization
- Local
The user-password-update command in python-keystoneclient before 0.2.4 accepts the new password in the –password argument, which allows local users to obtain sensitive information by listing the process.
- CVSS base score
- 2.1
- Published
- 2013-10-01
- OWASP
- A07 Identification and Authentication Failures
- Orthogonal defect classification
- Function
- Code defect classification
- Incorrect Functionality
- Category
- Input Validation and Sanitization
- Subcategory
- Insecure Parsing or Deserialization
- Accessibility scope
- Local
- Impact
- Information Disclosure
- Fixed by upgrading
- Yes
Solution
Update python-keystoneclient to version 0.2.4 or higher.
Vulnerable code sample
import argparse
def update_user_password(username):
parser = argparse.ArgumentParser(description='Update user password')
parser.add_argument('--password', help='New password for the user', required=True)
args = parser.parse_args()
print(f"Password for user {username} updated successfully.")
if __name__ == "__main__":
username = "example_user"
update_user_password(username)Patched code sample
import argparse
import getpass
def update_user_password(username):
parser = argparse.ArgumentParser(description='Update user password')
parser.add_argument('--password', help='New password for the user', required=False)
args = parser.parse_args()
if args.password:
print("Error: Password should not be provided as a command line argument.")
return
new_password = getpass.getpass(prompt='Enter new password: ')
print(f"Password for user {username} updated successfully.")
if __name__ == "__main__":
username = "example_user"
update_user_password(username)Cite this entry
@misc{vaitp:cve20132013,
title = {{Local users can access sensitive data via the --password argument in python-keystoneclient before 0.2.4}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2013},
note = {VAITP Python Vulnerability Dataset, entry CVE-2013-2013},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2013-2013/}}
}
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 ::
