Sudo Perl Environment Variable Handling Security Bypass Vulnerability
BID:15394
Info
Sudo Perl Environment Variable Handling Security Bypass Vulnerability
| Bugtraq ID: | 15394 |
| Class: | Input Validation Error |
| CVE: |
CVE-2005-4158 |
| Remote: | No |
| Local: | Yes |
| Published: | Nov 11 2005 12:00AM |
| Updated: | Oct 24 2006 11:33PM |
| Credit: | Charles Morris is credited with the discovery of this vulnerability. |
| Vulnerable: |
Ubuntu Ubuntu Linux 5.10 powerpc Ubuntu Ubuntu Linux 5.10 i386 Ubuntu Ubuntu Linux 5.10 amd64 Ubuntu Ubuntu Linux 5.0 4 powerpc Ubuntu Ubuntu Linux 5.0 4 i386 Ubuntu Ubuntu Linux 5.0 4 amd64 Ubuntu Ubuntu Linux 4.1 ppc Ubuntu Ubuntu Linux 4.1 ia64 Ubuntu Ubuntu Linux 4.1 ia32 Trustix Secure Linux 3.0 Trustix Secure Linux 2.2 Trustix Secure Enterprise Linux 2.0 Todd Miller Sudo 1.6.8 p9 Todd Miller Sudo 1.6.8 p8 Todd Miller Sudo 1.6.8 p7 Todd Miller Sudo 1.6.8 p5 Todd Miller Sudo 1.6.8 p1 Todd Miller Sudo 1.6.8 Todd Miller Sudo 1.6.7 p5 Todd Miller Sudo 1.6.7 Todd Miller Sudo 1.6.6 Todd Miller Sudo 1.6.5 p2 Todd Miller Sudo 1.6.5 p1 Todd Miller Sudo 1.6.5 Todd Miller Sudo 1.6.4 p2 Todd Miller Sudo 1.6.4 p1 Todd Miller Sudo 1.6.4 Todd Miller Sudo 1.6.3 p7 Todd Miller Sudo 1.6.3 p6 Todd Miller Sudo 1.6.3 p5 Todd Miller Sudo 1.6.3 p4 Todd Miller Sudo 1.6.3 p3 Todd Miller Sudo 1.6.3 p2 Todd Miller Sudo 1.6.3 p1 Todd Miller Sudo 1.6.3 Todd Miller Sudo 1.6.2 Todd Miller Sudo 1.6.1 Todd Miller Sudo 1.6 Todd Miller Sudo 1.5.9 Todd Miller Sudo 1.5.8 Todd Miller Sudo 1.5.7 Todd Miller Sudo 1.5.6 Mandriva Linux Mandrake 2006.0 x86_64 Mandriva Linux Mandrake 2006.0 Mandriva Linux Mandrake 10.2 x86_64 Mandriva Linux Mandrake 10.2 Mandriva Linux Mandrake 10.1 x86_64 Mandriva Linux Mandrake 10.1 MandrakeSoft Multi Network Firewall 2.0 MandrakeSoft Corporate Server 3.0 x86_64 MandrakeSoft Corporate Server 3.0 MandrakeSoft Corporate Server 2.1 x86_64 MandrakeSoft Corporate Server 2.1 Debian Linux 3.1 sparc Debian Linux 3.1 s/390 Debian Linux 3.1 ppc Debian Linux 3.1 mipsel Debian Linux 3.1 mips Debian Linux 3.1 m68k Debian Linux 3.1 ia-64 Debian Linux 3.1 ia-32 Debian Linux 3.1 hppa Debian Linux 3.1 arm Debian Linux 3.1 amd64 Debian Linux 3.1 alpha Debian Linux 3.1 Debian Linux 3.0 sparc Debian Linux 3.0 s/390 Debian Linux 3.0 ppc Debian Linux 3.0 mipsel Debian Linux 3.0 mips Debian Linux 3.0 m68k Debian Linux 3.0 ia-64 Debian Linux 3.0 ia-32 Debian Linux 3.0 hppa Debian Linux 3.0 arm Debian Linux 3.0 alpha Debian Linux 3.0 |
| Not Vulnerable: |
Todd Miller Sudo 1.6.8 p12 |
Discussion
Sudo Perl Environment Variable Handling Security Bypass Vulnerability
Sudo is prone to a security-bypass vulnerability that could lead to arbitrary code execution. This issue is due to an error in the application when handling the 'PERLLIB', 'PERL5LIB', and 'PERL5OPT' environment variables when tainting is ignored.
An attacker can exploit this vulnerability to bypass security restrictions and include arbitrary library files.
To exploit this vulnerability, an attacker must be able to run Perl scripts through Sudo.
Sudo is prone to a security-bypass vulnerability that could lead to arbitrary code execution. This issue is due to an error in the application when handling the 'PERLLIB', 'PERL5LIB', and 'PERL5OPT' environment variables when tainting is ignored.
An attacker can exploit this vulnerability to bypass security restrictions and include arbitrary library files.
To exploit this vulnerability, an attacker must be able to run Perl scripts through Sudo.
Exploit / POC
Sudo Perl Environment Variable Handling Security Bypass Vulnerability
No exploit is required.
Example text and Perl code to exploit this vulnerability are provided by breno <[email protected]>:
No exploit is required.
Example text and Perl code to exploit this vulnerability are provided by breno <[email protected]>:
Solution / Fix
Sudo Perl Environment Variable Handling Security Bypass Vulnerability
Solution:
The vendor has addressed this issue in Sudo 1.6.8p12. Contact the vendor to obtain the appropriate updates.
Please see the referenced vendor advisories for information on obtaining and applying the appropriate updates.
Todd Miller Sudo 1.5.6
Todd Miller Sudo 1.5.7
Todd Miller Sudo 1.5.8
Todd Miller Sudo 1.5.9
Todd Miller Sudo 1.6
Todd Miller Sudo 1.6.1
Todd Miller Sudo 1.6.2
Todd Miller Sudo 1.6.3
Todd Miller Sudo 1.6.3 p1
Todd Miller Sudo 1.6.3 p5
Todd Miller Sudo 1.6.3 p4
Todd Miller Sudo 1.6.3 p7
Todd Miller Sudo 1.6.3 p6
Todd Miller Sudo 1.6.3 p2
Todd Miller Sudo 1.6.3 p3
Todd Miller Sudo 1.6.4 p2
Todd Miller Sudo 1.6.4 p1
Todd Miller Sudo 1.6.4
Todd Miller Sudo 1.6.5 p2
Todd Miller Sudo 1.6.5 p1
Todd Miller Sudo 1.6.5
Todd Miller Sudo 1.6.6
Todd Miller Sudo 1.6.7 p5
Todd Miller Sudo 1.6.7
Todd Miller Sudo 1.6.8 p9
Todd Miller Sudo 1.6.8 p5
Todd Miller Sudo 1.6.8
Todd Miller Sudo 1.6.8 p8
Todd Miller Sudo 1.6.8 p1
Todd Miller Sudo 1.6.8 p7
Solution:
The vendor has addressed this issue in Sudo 1.6.8p12. Contact the vendor to obtain the appropriate updates.
Please see the referenced vendor advisories for information on obtaining and applying the appropriate updates.
Todd Miller Sudo 1.5.6
-
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.5.7
-
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.5.8
-
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.5.9
-
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.6
-
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.6.1
-
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.6.2
-
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.6.3
-
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.6.3 p1
-
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.6.3 p5
-
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.6.3 p4
-
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.6.3 p7
-
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.6.3 p6
-
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.6.3 p2
-
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.6.3 p3
-
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.6.4 p2
-
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.6.4 p1
-
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.6.4
-
Mandriva sudo-1.6.7-0.p5.2.4.M20mdk.i586.rpm
Multi Network Firewall 2.0:
http://wwwnew.mandriva.com/en/downloads/ -
Mandriva sudo-1.6.7-0.p5.2.5.M20mdk.i586.rpm
Multi Network Firewall 2.0:
http://wwwnew.mandriva.com/en/downloads -
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.6.5 p2
-
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.6.5 p1
-
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.6.5
-
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.6.6
-
Mandriva sudo-1.6.6-2.4.C21mdk.i586.rpm
Corporate Server 2.1:
http://wwwnew.mandriva.com/en/downloads/ -
Mandriva sudo-1.6.6-2.4.C21mdk.x86_64.rpm
Corporate Server 2.1/X86_64:
http://wwwnew.mandriva.com/en/downloads/ -
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.6.7 p5
-
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html -
Ubuntu sudo_1.6.7p5-1ubuntu4.4_amd64.deb
Ubuntu 4.10 (Warty Warthog)
http://security.ubuntu.com/ubuntu/pool/main/s/sudo/sudo_1.6.7p5-1ubunt u4.4_amd64.deb -
Ubuntu sudo_1.6.7p5-1ubuntu4.4_i386.deb
Ubuntu 4.10 (Warty Warthog)
http://security.ubuntu.com/ubuntu/pool/main/s/sudo/sudo_1.6.7p5-1ubunt u4.4_i386.deb -
Ubuntu sudo_1.6.7p5-1ubuntu4.4_powerpc.deb
Ubuntu 4.10 (Warty Warthog)
http://security.ubuntu.com/ubuntu/pool/main/s/sudo/sudo_1.6.7p5-1ubunt u4.4_powerpc.deb -
Ubuntu sudo_1.6.7p5-1ubuntu4.5_amd64.deb
Ubuntu 4.10 (Warty Warthog)
http://security.ubuntu.com/ubuntu/pool/main/s/sudo/sudo_1.6.7p5-1ubunt u4.5_amd64.deb -
Ubuntu sudo_1.6.7p5-1ubuntu4.5_i386.deb
Ubuntu 4.10 (Warty Warthog)
http://security.ubuntu.com/ubuntu/pool/main/s/sudo/sudo_1.6.7p5-1ubunt u4.5_i386.deb -
Ubuntu sudo_1.6.7p5-1ubuntu4.5_powerpc.deb
Ubuntu 4.10 (Warty Warthog)
http://security.ubuntu.com/ubuntu/pool/main/s/sudo/sudo_1.6.7p5-1ubunt u4.5_powerpc.deb
Todd Miller Sudo 1.6.7
-
Mandriva sudo-1.6.7-0.p5.2.4.C30mdk.i586.rpm
Corporate 3.0:
http://wwwnew.mandriva.com/en/downloads/ -
Mandriva sudo-1.6.7-0.p5.2.4.C30mdk.x86_64.rpm
Corporate 3.0/X86_64:
http://wwwnew.mandriva.com/en/downloads/ -
Mandriva sudo-1.6.7-0.p5.2.5.C30mdk.i586.rpm
Corporate 3.0:
http://wwwnew.mandriva.com/en/downloads -
Mandriva sudo-1.6.7-0.p5.2.5.C30mdk.x86_64.rpm
Corporate 3.0:
http://wwwnew.mandriva.com/en/downloads -
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.6.8 p9
-
Conectiva sudo-1.6.8p9-42425U10_4cl.i386.rpm
ftp://atualizacoes.conectiva.com.br/10/RPMS/sudo-1.6.8p9-42425U10_4cl. i386.rpm -
Conectiva sudo-doc-1.6.8p9-42425U10_4cl.i386.rpm
ftp://atualizacoes.conectiva.com.br/10/RPMS/sudo-doc-1.6.8p9-42425U10_ 4cl.i386.rpm -
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html -
Ubuntu sudo_1.6.8p9-2ubuntu2.2_amd64.deb
Ubuntu 5.10 (Breezy Badger)
http://security.ubuntu.com/ubuntu/pool/main/s/sudo/sudo_1.6.8p9-2ubunt u2.2_amd64.deb -
Ubuntu sudo_1.6.8p9-2ubuntu2.2_i386.deb
Ubuntu 5.10 (Breezy Badger)
http://security.ubuntu.com/ubuntu/pool/main/s/sudo/sudo_1.6.8p9-2ubunt u2.2_i386.deb -
Ubuntu sudo_1.6.8p9-2ubuntu2.2_powerpc.deb
Ubuntu 5.10 (Breezy Badger)
http://security.ubuntu.com/ubuntu/pool/main/s/sudo/sudo_1.6.8p9-2ubunt u2.2_powerpc.deb -
Ubuntu sudo_1.6.8p9-2ubuntu2.3_amd64.deb
Ubuntu 5.10 (Breezy Badger)
http://security.ubuntu.com/ubuntu/pool/main/s/sudo/sudo_1.6.8p9-2ubunt u2.3_amd64.deb -
Ubuntu sudo_1.6.8p9-2ubuntu2.3_i386.deb
Ubuntu 5.10 (Breezy Badger)
http://security.ubuntu.com/ubuntu/pool/main/s/sudo/sudo_1.6.8p9-2ubunt u2.3_i386.deb -
Ubuntu sudo_1.6.8p9-2ubuntu2.3_powerpc.deb
Ubuntu 5.10 (Breezy Badger)
http://security.ubuntu.com/ubuntu/pool/main/s/sudo/sudo_1.6.8p9-2ubunt u2.3_powerpc.deb
Todd Miller Sudo 1.6.8 p5
-
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html -
Ubuntu sudo_1.6.8p5-1ubuntu2.3_amd64.deb
Ubuntu 5.04 (Hoary Hedgehog)
http://security.ubuntu.com/ubuntu/pool/main/s/sudo/sudo_1.6.8p5-1ubunt u2.3_amd64.deb -
Ubuntu sudo_1.6.8p5-1ubuntu2.3_i386.deb
Ubuntu 5.04 (Hoary Hedgehog)
http://security.ubuntu.com/ubuntu/pool/main/s/sudo/sudo_1.6.8p5-1ubunt u2.3_i386.deb -
Ubuntu sudo_1.6.8p5-1ubuntu2.3_powerpc.deb
Ubuntu 5.04 (Hoary Hedgehog)
http://security.ubuntu.com/ubuntu/pool/main/s/sudo/sudo_1.6.8p5-1ubunt u2.3_powerpc.deb -
Ubuntu sudo_1.6.8p5-1ubuntu2.4_amd64.deb
Ubuntu 5.04 (Hoary Hedgehog)
http://security.ubuntu.com/ubuntu/pool/main/s/sudo/sudo_1.6.8p5-1ubunt u2.4_amd64.deb -
Ubuntu sudo_1.6.8p5-1ubuntu2.4_i386.deb
Ubuntu 5.04 (Hoary Hedgehog)
http://security.ubuntu.com/ubuntu/pool/main/s/sudo/sudo_1.6.8p5-1ubunt u2.4_i386.deb -
Ubuntu sudo_1.6.8p5-1ubuntu2.4_powerpc.deb
Ubuntu 5.04 (Hoary Hedgehog)
http://security.ubuntu.com/ubuntu/pool/main/s/sudo/sudo_1.6.8p5-1ubunt u2.4_powerpc.deb
Todd Miller Sudo 1.6.8
-
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.6.8 p8
-
Mandriva sudo-1.6.8p8-2.2.20060mdk.i586.rpm
Mandriva Linux 2006.0:
http://wwwnew.mandriva.com/en/downloads/ -
Mandriva sudo-1.6.8p8-2.2.20060mdk.x86_64.rpm
Mandriva Linux 2006.0/X86_64:
http://wwwnew.mandriva.com/en/downloads/ -
Mandriva sudo-1.6.8p8-2.3.20060mdk.i586.rpm
Mandriva Linux 2006.0:
http://wwwnew.mandriva.com/en/downloads -
Mandriva sudo-1.6.8p8-2.3.20060mdk.x86_64.rpm
Mandriva Linux 2006.0:
http://wwwnew.mandriva.com/en/downloads -
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.6.8 p1
-
Mandriva sudo-1.6.8p1-1.4.101mdk.i586.rpm
Mandriva Linux 10.1:
http://wwwnew.mandriva.com/en/downloads/ -
Mandriva sudo-1.6.8p1-1.4.101mdk.x86_64.rpm
Mandriva Linux 10.1/X86_64:
http://wwwnew.mandriva.com/en/downloads/ -
Mandriva sudo-1.6.8p1-2.3.102mdk.i586.rpm
Mandriva Linux 10.2:
http://wwwnew.mandriva.com/en/downloads/ -
Mandriva sudo-1.6.8p1-2.3.102mdk.x86_64.rpm
Mandriva Linux 10.2/X86_64:
http://wwwnew.mandriva.com/en/downloads/ -
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
Todd Miller Sudo 1.6.8 p7
-
Todd Miller sudo-1.6.8p12.tar.gz
http://www.sudo.ws/sudo/download.html
References
Sudo Perl Environment Variable Handling Security Bypass Vulnerability
References:
References:
- Perl scripts run via Sudo can be subverted (Todd Miller)
- Sudo Homepage (Todd Miller)