GLSA-200405-20 : Insecure Temporary File Creation In MySQL

Low Nessus Plugin ID 14506


The remote Gentoo host is missing one or more security-related patches.


The remote host is affected by the vulnerability described in GLSA-200405-20 (Insecure Temporary File Creation In MySQL)

The MySQL bug reporting utility (mysqlbug) creates a temporary file to log bug reports to. A malicious local user with write access to the /tmp directory could create a symbolic link of the name mysqlbug-N pointing to a protected file, such as /etc/passwd, such that when mysqlbug creates the Nth log file, it would end up overwriting the target file. A similar vulnerability exists with the mysql_multi utility, which creates a temporary file called mysql_multi.log.
Impact :

Since mysql_multi runs as root, a local attacker could use this to destroy any other users' data or corrupt and destroy system files.
Workaround :

One could modify both scripts to log to a directory that users do not have write permission to, such as /var/log/mysql/.


All users should upgrade to the latest stable version of MySQL.
# emerge sync # emerge -pv '>=dev-db/mysql-4.0.18-r2' # emerge '>=dev-db/mysql-4.0.18-r2'

See Also

Plugin Details

Severity: Low

ID: 14506

File Name: gentoo_GLSA-200405-20.nasl

Version: $Revision: 1.15 $

Type: local

Published: 2004/08/30

Modified: 2016/04/28

Dependencies: 12634

Risk Information

Risk Factor: Low


Base Score: 2.1

Temporal Score: 2

Vector: CVSS2#AV:L/AC:L/Au:N/C:N/I:P/A:N

Temporal Vector: CVSS2#E:F/RL:ND/RC:ND

Vulnerability Information

CPE: p-cpe:/a:gentoo:linux:mysql, cpe:/o:gentoo:linux

Required KB Items: Host/local_checks_enabled, Host/Gentoo/release, Host/Gentoo/qpkg-list

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 2004/05/25

Vulnerability Publication Date: 2004/03/24

Reference Information

CVE: CVE-2004-0381, CVE-2004-0388

OSVDB: 6420, 6421

GLSA: 200405-20