CVE-2008-6549
Password_checker in MoinMoin 1.6.1 vulnerable to denial of service due to non-thread-safe cracklib and python-crack
- CVSS 5.0
- CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
- Resource Management
- Remote
The password_checker function in config/multiconfig.py in MoinMoin 1.6.1 uses the cracklib and python-crack features even though they are not thread-safe, which allows remote attackers to cause a denial of service (segmentation fault and crash) via unknown vectors.
- CWE
- CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
- CVSS base score
- 5.0
- Published
- 2009-03-30
- OWASP
- A06 Vulnerable and Outdated Components
- Orthogonal defect classification
- Function
- Code defect classification
- Incorrect Functionality
- Category
- Resource Management
- Subcategory
- Resource Exhaustion
- Accessibility scope
- Remote
- Impact
- Denial of Service (DoS)
- Affected component
- cracklib
- Fixed by upgrading
- Yes
Solution
Update MoinMoin to version 1.6.2 or higher.
Vulnerable code sample
import cracklib
def password_checker(password):
# This function is not thread-safe
result = cracklib.FascistCheck(password)
return result
# Example usage
def check_user_password(password):
if password_checker(password):
print("Password is strong.")
else:
print("Password is weak.")
# Example usage
check_user_password("example_password")Patched code sample
import threading
# Thread-safe wrapper for password checking
class PasswordChecker:
def __init__(self):
self.lock = threading.Lock()
def check_password(self, password):
with self.lock:
# Simulate password checking logic
return self._password_checker_logic(password)
def _password_checker_logic(self, password):
# Replace this with the actual password checking logic
# For demonstration, let's assume it returns True if the password is strong
return len(password) >= 8 # Example condition for a strong password
# Usage
password_checker = PasswordChecker()
def check_user_password(password):
if password_checker.check_password(password):
print("Password is strong.")
else:
print("Password is weak.")
# Example usage
check_user_password("example_password")Cite this entry
@misc{vaitp:cve20086549,
title = {{Password_checker in MoinMoin 1.6.1 vulnerable to denial of service due to non-thread-safe cracklib and python-crack}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2009},
note = {VAITP Python Vulnerability Dataset, entry CVE-2008-6549},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2008-6549/}}
}
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 ::
