CVE-2013-2166
Python-keystoneclient 0.2.3 to 0.2.5 allows memcache encryption bypass
- CVSS 9.8
- CWE-326 Inadequate Encryption Strength
- Input Validation and Sanitization
- Remote
python-keystoneclient version 0.2.3 to 0.2.5 has middleware memcache encryption bypass
- CVSS base score
- 9.8
- Published
- 2019-12-10
- OWASP
- A08 Software and Data Integrity Failures
- Orthogonal defect classification
- Function
- Code defect classification
- Incorrect Functionality
- Category
- Input Validation and Sanitization
- Subcategory
- Insecure Parsing or Deserialization
- Accessibility scope
- Remote
- Impact
- Unauthorized Access
- Fixed by upgrading
- Yes
Solution
Update python-keystoneclient to version 0.2.6 or higher.
Vulnerable code sample
from keystoneclient.middleware import memcache
class MemcacheMiddleware(memcache.MemcacheMiddleware):
def __init__(self, app, **kwargs):
super(MemcacheMiddleware, self).__init__(app, **kwargs)
def _get_cache_key(self, key):
return keyPatched code sample
from keystoneclient.middleware import memcache
class MemcacheMiddleware(memcache.MemcacheMiddleware):
def __init__(self, app, **kwargs):
super(MemcacheMiddleware, self).__init__(app, **kwargs)
self.encryption_key = kwargs.get('encryption_key')
def _get_cache_key(self, key):
return self._encrypt_key(key)
def _encrypt_key(self, key):
from cryptography.fernet import Fernet
fernet = Fernet(self.encryption_key)
return fernet.encrypt(key.encode()).decode()Cite this entry
@misc{vaitp:cve20132166,
title = {{Python-keystoneclient 0.2.3 to 0.2.5 allows memcache encryption bypass}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2019},
note = {VAITP Python Vulnerability Dataset, entry CVE-2013-2166},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2013-2166/}}
}
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 ::
