CVE-2012-5474
OpenStack config file leaks secret key
- CVSS 5.5
- CWE-311 Missing Encryption of Sensitive Data
- Design Defects
- Local
The file /etc/openstack-dashboard/local_settings within Red Hat OpenStack Platform 2.0 and RHOS Essex Release (python-django-horizon package before 2012.1.1) is world readable and exposes the secret key value.
- CVSS base score
- 5.5
- Published
- 2019-12-30
- OWASP
- A05 Security Misconfiguration
- Orthogonal defect classification
- Function
- Code defect classification
- Incorrect Functionality
- Category
- Design Defects
- Subcategory
- Security Misconfigurations
- Accessibility scope
- Local
- Impact
- Information Disclosure
- Affected component
- python-django-horizon
- Fixed by upgrading
- Yes
Solution
Update python-django-horizon to version 2012.1.1 or higher.
Vulnerable code sample
import os
# Path to the local_settings file
file_path = '/etc/openstack-dashboard/local_settings'
# Simulating the vulnerability by setting world-readable permissions
os.chmod(file_path, 0o644) # Owner can read and write, group and others can readPatched code sample
import os
import stat
# Path to the local_settings file
file_path = '/etc/openstack-dashboard/local_settings'
# Change the file permissions to restrict access
os.chmod(file_path, stat.S_IRUSR | stat.S_IWUSR) # Only owner can read and writeCite this entry
@misc{vaitp:cve20125474,
title = {{OpenStack config file leaks secret key}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2019},
note = {VAITP Python Vulnerability Dataset, entry CVE-2012-5474},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2012-5474/}}
}
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 ::
