Sun MySQL up to 4.0.13 libmysqlclient mysql_real_connect stack-based overflow
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 7.0 | $0-$5k | 0.00 |
Summary
A vulnerability categorized as critical has been discovered in Sun MySQL up to 4.0.13. The impacted element is the function mysql_real_connect in the library libmysqlclient. Executing a manipulation can lead to stack-based overflow.
This vulnerability is handled as CVE-2003-1331. The attack can be executed remotely. There is not any exploit available.
It is advisable to upgrade the affected component.
Details
A vulnerability was found in Sun MySQL up to 4.0.13 (Database Software). It has been declared as critical. This vulnerability affects the function mysql_real_connect in the library libmysqlclient. The manipulation with an unknown input leads to a stack-based overflow vulnerability. The CWE definition for the vulnerability is CWE-121. A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function). As an impact it is known to affect confidentiality, integrity, and availability. CVE summarizes:
Stack-based buffer overflow in the mysql_real_connect function in the MySql client library (libmysqlclient) 4.0.13 and earlier allows local users to execute arbitrary code via a long socket name, a different vulnerability than CVE-2001-1453.
The bug was discovered 06/12/2003. The weakness was released 06/12/2003 by pokleyzz (Full-Disclosure). The advisory is available at archives.neohapsis.com. This vulnerability was named CVE-2003-1331 since 06/25/2007. The attack can be initiated remotely. No form of authentication is required for a successful exploitation. Technical details are known, but there is no available exploit.
The vulnerability scanner Nessus provides a plugin with the ID 17822 (MySQL < 4.0.14 libmysqlclient Buffer Overflow), which helps to determine the existence of the flaw in a target environment. It is assigned to the family Databases and running in the context r. The commercial vulnerability scanner Qualys is able to test this issue with plugin 19674 (MySQL libmysqlclient Library "mysql_real_connect" Buffer Overrun Vulnerability).
Upgrading eliminates this vulnerability. Applying a patch is able to eliminate this problem. The bugfix is ready for download at securityfocus.com. The best possible mitigation is suggested to be upgrading to the latest version. Attack attempts may be identified with Snort ID 1775.
The vulnerability is also documented in the databases at X-Force (12337), Tenable (17822), SecurityFocus (BID 7887†), OSVDB (60356†) and Vulnerability Center (SBV-19934†). If you want to get best quality of vulnerability data, you may have to visit VulDB.
Product
Type
Vendor
Name
Version
License
Support
- end of life (old version)
Website
- Vendor: https://www.oracle.com/sun/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 7.3VulDB Meta Temp Score: 7.0
VulDB Base Score: 7.3
VulDB Temp Score: 7.0
VulDB Vector: 🔍
VulDB Reliability: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
NVD Base Score: 🔍
Exploiting
Class: Stack-based overflowCWE: CWE-121 / CWE-119
CAPEC: 🔍
ATT&CK: 🔍
Physical: No
Local: No
Remote: Yes
Availability: 🔍
Status: Not defined
EPSS Score: 🔍
EPSS Percentile: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Nessus ID: 17822
Nessus Name: MySQL < 4.0.14 libmysqlclient Buffer Overflow
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍
Nessus Context: 🔍
Qualys ID: 🔍
Qualys Name: 🔍
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔍
Patch: securityfocus.com
Snort ID: 1775
Timeline
06/12/2003 🔍06/12/2003 🔍
06/12/2003 🔍
06/12/2003 🔍
12/31/2003 🔍
12/31/2003 🔍
06/25/2007 🔍
11/05/2008 🔍
11/20/2009 🔍
01/18/2012 🔍
07/14/2025 🔍
Sources
Vendor: oracle.comAdvisory: archives.neohapsis.com
Researcher: pokleyzz
Status: Confirmed
Confirmation: 🔍
CVE: CVE-2003-1331 (🔍)
GCVE (CVE): GCVE-0-2003-1331
GCVE (VulDB): GCVE-100-106
X-Force: 12337 - MySQL mysql_real_connect function buffer overflow, High Risk
SecurityFocus: 7887 - MySQL libmysqlclient Library mysql_real_connect() Buffer Overrun Vulnerability
OSVDB: 60356 - MySql Client Library (libmysqlclient) mysql_real_connect Function Local Overflow
Vulnerability Center: 19934 - MySQL AB MySQL <= 4.0.13 DoS and Code Execution Vulnerability via a Long Socket Name, High
Entry
Created: 06/12/2003 02:00Updated: 07/14/2025 01:26
Changes: 06/12/2003 02:00 (83), 06/25/2019 21:43 (4), 07/14/2025 01:26 (19)
Complete: 🔍
Cache ID: 216::103
If you want to get best quality of vulnerability data, you may have to visit VulDB.
No comments yet. Languages: en.
Please log in to comment.