Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 09 Dec 2013 09:50:37 +1000
From: Grant Murphy <>
Subject: Issue with PYTHON_EGG_CACHE

Hash: SHA256

Not sure if this warrants a CVE -

Python .egg files can be loaded dynamically as dependencies. In order
to process native DSO in .egg distributions the content of the file is
unpacked. By default Python unpacks the files to $HOME/.python-eggs
however this 'egg cache' directory can be overwritten by setting the
environment variable PYTHON_EGG_CACHE.

It is common practice to set this to a world writeable directory such
as /tmp in the instances where the user the process is executing as
does not have a home directory (e.g. httpd). Unfortunately the
extraction is done in such a way that the extraction path for the DSO
is deterministic. As such it exposes a TOCTOU attack vector where a
user my pre-emptively injecting a specially crafted DSO to achieve
arbitrary code execution and potentially privilege escalation.

The current version of setuptools attempts to mitigate this threat by
a number of additional integrity checks in conjunction with issuing a
warning if the extract directory is group or world writeable.

This fix was introduced in version 0.6.46 of Python setuptools

The discovery of this issue can be attributed to Dhiru Kohlia and myself.

- - Grant.
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Using GnuPG with Thunderbird -


Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.