Find out if PyPy and/or PyPy's sandbox would be useful to increase security.
A good good candidate for testing and confinement, because relatively simple to play with, would be url_to_unixtime (T102). Later also control-port-filter-python.
See also:
Related: