{"id":378,"cve":"CVE-2013-2013","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2013-2013","cwe":"CWE-200 Exposure of Sensitive Information to an Unauthorized Actor","cwe_number":200,"cwe_url":"https:\/\/cwe.mitre.org\/data\/definitions\/200","cvss_score":2.1,"published":"2013-10-01","owasp":"A07 Identification and Authentication Failures","odc":"Function","cdc":"Incorrect Functionality","category":"Input Validation and Sanitization","subcategory":"Insecure Parsing or Deserialization","scope":"Local","impact":"Information Disclosure","summary":"Local users can access sensitive data via the --password argument in python-keystoneclient before 0.2.4","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2013-2013\/","description":"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.","solution":"Update python-keystoneclient to version 0.2.4 or higher.","affected_component":"python-keystoneclient","fixed_by_upgrading":true,"vulnerable_code":"import argparse\n\ndef update_user_password(username):\n    parser = argparse.ArgumentParser(description='Update user password')\n    parser.add_argument('--password', help='New password for the user', required=True)\n    \n    args = parser.parse_args()\n\n    print(f\"Password for user {username} updated successfully.\")\n\nif __name__ == \"__main__\":\n    username = \"example_user\"\n    update_user_password(username)","patched_code":"import argparse\nimport getpass\n\ndef update_user_password(username):\n    parser = argparse.ArgumentParser(description='Update user password')\n    parser.add_argument('--password', help='New password for the user', required=False)\n    \n    args = parser.parse_args()\n\n    if args.password:\n        print(\"Error: Password should not be provided as a command line argument.\")\n        return\n\n    new_password = getpass.getpass(prompt='Enter new password: ')\n\n    print(f\"Password for user {username} updated successfully.\")\n\nif __name__ == \"__main__\":\n    username = \"example_user\"\n    update_user_password(username)","payload_needed":false,"payload":null,"payload_status":"none","published_fix":[{"repository":"openstack\/python-keystoneclient","commit_url":"https:\/\/github.com\/openstack\/python-keystoneclient\/commit\/f2e0818bc97bfbeba83f6abbb07909a8debcad77","commit_subject":"Allow secure user password update.","units":[{"file":"keystoneclient\/utils.py","function":null},{"file":"keystoneclient\/v2_0\/shell.py","function":null}]}],"references":null}