oss-sec mailing list archives
ipython3 may execute code from the current working directory
From: Georgi Guninski <gguninski () gmail com>
Date: Thu, 22 Jul 2021 11:52:05 +0300
Summary: under certain circumstances, ipython3 may execute code from the current working directory. This might be a problem if the current working directory is not trusted. python3 is safe. Tested on ubuntu 20. The following session illustrates it: joro@bialokote:~/tests/dir2$ pwd /home/joro/tests/dir2 joro@bialokote:~/tests/dir2$ ipython3 --version 7.13.0 joro@bialokote:~/tests/dir2$ ls ~/tests/dir1 a.py joro-orig.py __pycache__ joro@bialokote:~/tests/dir2$ ls ~/tests/dir2 joro.py __pycache__ joro@bialokote:~/tests/dir2$ cat ~/tests/dir1/a.py try: import joro except: print("error in import") joro@bialokote:~/tests/dir2$ cat ~/tests/dir2/joro.py print("imported joro :)") joro@bialokote:~/tests/dir2$ ipython3 ~/tests/dir1/a.py imported joro :) joro@bialokote:~/tests/dir2$
Current thread:
- ipython3 may execute code from the current working directory Georgi Guninski (Jul 22)
- Re: ipython3 may execute code from the current working directory Jakub Wilk (Jul 22)
- Re: ipython3 may execute code from the current working directory Jakub Wilk (Jul 22)
- Re: ipython3 may execute code from the current working directory Jakub Wilk (Jul 23)
- Re: ipython3 may execute code from the current working directory Mats Wichmann (Jul 23)
- Re: ipython3 may execute code from the current working directory Jakub Wilk (Jul 24)
- Re: ipython3 may execute code from the current working directory Georgi Guninski (Jul 25)
- Re: ipython3 may execute code from the current working directory Jakub Wilk (Jul 22)