CVE-2015-3446
Remote code execution in AlienVault Unified Security Management (before 4.15) via a crafted plugin configuration file
- CVSS 9.3
- CWE-94 Improper Control of Generation of Code ('Code Injection')
- Configuration Issues
- Remote
The Framework Daemon in AlienVault Unified Security Management before 4.15 allows remote attackers to execute arbitrary Python code via a crafted plugin configuration file (.cfg).
- CVSS base score
- 9.3
- Published
- 2015-05-01
- OWASP
- A03 Injection
- Orthogonal defect classification
- Function
- Code defect classification
- Incorrect Functionality
- Category
- Configuration Issues
- Subcategory
- Remote File Inclusion (RFI)
- Accessibility scope
- Remote
- Impact
- Arbitrary Code Execution
- Affected component
- Python
- Fixed by upgrading
- Yes
Solution
Update AlienVault Unified Security Management to version 4.15 or higher.
Vulnerable code sample
import configparser
def load_plugin_config(file_path):
config = configparser.ConfigParser()
config.read(file_path)
# Vulnerability: Arbitrary code execution via exec() on configuration values
for section in config.sections():
for key in config[section]:
exec(config[section][key]) # This is insecure and allows arbitrary code execution
# Example usage
load_plugin_config('path/to/plugin.cfg')Patched code sample
import configparser
import os
def load_plugin_config(file_path):
# Ensure that the file path is safe and does not allow traversal
if not os.path.isfile(file_path) or not file_path.endswith('.cfg'):
raise ValueError("Invalid configuration file.")
config = configparser.ConfigParser()
config.read(file_path)
# Validate configuration options to prevent arbitrary code execution
allowed_keys = {'plugin_name', 'plugin_version', 'plugin_settings'}
for section in config.sections():
for key in config[section]:
if key not in allowed_keys:
raise ValueError(f"Unexpected configuration key: {key}")
return config
# Example usage
try:
plugin_config = load_plugin_config('path/to/plugin.cfg')
except Exception as e:
print(f"Error loading plugin config: {e}")Cite this entry
@misc{vaitp:cve20153446,
title = {{Remote code execution in AlienVault Unified Security Management (before 4.15) via a crafted plugin configuration file}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2015},
note = {VAITP Python Vulnerability Dataset, entry CVE-2015-3446},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2015-3446/}}
}
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 ::
