CVE-2019-2435
MySQL Connector/Python 8.0.13 and earlier, 2.1.8 and earlier, unauthenticated network access via TLS
- CVSS 8.1
- CWE-284: Improper Access Control
- Authentication, Authorization, and Session Management
- Remote
Vulnerability in the MySQL Connectors component of Oracle MySQL (subcomponent: Connector/Python). Supported versions that are affected are 8.0.13 and prior and 2.1.8 and prior. Easily exploitable vulnerability allows unauthenticated attacker with network access via TLS to compromise MySQL Connectors. Successful attacks require human interaction from a person other than the attacker. Successful attacks of this vulnerability can result in unauthorized creation, deletion or modification access to critical data or all MySQL Connectors accessible data as well as unauthorized access to critical data or complete access to all MySQL Connectors accessible data. CVSS 3.0 Base Score 8.1 (Confidentiality and Integrity impacts). CVSS Vector: (CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N).
- CVSS base score
- 8.1
- Published
- 2019-01-16
- OWASP
- A08 Software and Data Integrity Failures
- Orthogonal defect classification
- Function
- Code defect classification
- Incorrect Functionality
- Category
- Authentication, Authorization, and Session Management
- Subcategory
- Insecure Authentication Mechanisms
- Accessibility scope
- Remote
- Impact
- Unauthorized Access
- Fixed by upgrading
- Yes
Solution
Update MySQL Connectors to version 8.0.14 or higher.
Vulnerable code sample
import mysql.connector
def connect():
try:
connection = mysql.connector.connect(
host='localhost',
user='your_username',
password='your_password',
database='your_database'
)
if connection.is_connected():
print("Successfully connected to the database")
except mysql.connector.Error as e:
print(f"Error: {e}")
finally:
if connection.is_connected():
connection.close()
print("Connection closed")
connect()Patched code sample
import mysql.connector
from mysql.connector import Error
def connect():
try:
connection = mysql.connector.connect(
host='localhost',
user='your_username',
password='your_password',
database='your_database',
ssl_disabled=False,
ssl_ca='path/to/ca-cert.pem',
ssl_cert='path/to/client-cert.pem',
ssl_key='path/to/client-key.pem'
)
if connection.is_connected():
print("Successfully connected to the database")
except Error as e:
print(f"Error: {e}")
finally:
if connection.is_connected():
connection.close()
print("Connection closed")
connect()Cite this entry
@misc{vaitp:cve20192435,
title = {{MySQL Connector/Python 8.0.13 and earlier, 2.1.8 and earlier, unauthenticated network access via TLS}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2019},
note = {VAITP Python Vulnerability Dataset, entry CVE-2019-2435},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2019-2435/}}
}
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 ::
