This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Guido
Recipients Guido
Date 2014-12-30.01:56:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1419904594.24.0.782191401639.issue23130@psf.upfronthosting.co.za>
In-reply-to
Content
Tools/scripts/ftpmirror.py does not guard against arbitrary path constructions, and, given a connection to a malicious FTP server (or a man in the middle attack), it is possible that any file on the client's filesystem gets overwritten. Ie,. if we suppose that ftpmirror.py is run from a "base directory" /home/xxx/yyy, file creations can occur outside this base directory, such as in /tmp, /etc, /var, just to give some examples.

I've constructed a partial proof of concept FTP server that demonstrates directory and file creation outside the base directory (the directory the client script was launched from). I understand that most of the files in Tools/scripts/ are legacy applications that have long been deprecated. However, if the maintainers think these applications should be safe nonetheless, I'll be happy to construct and submit a patch that will remediate this issue.

Guido Vranken
Intelworks
History
Date User Action Args
2014-12-30 01:56:34Guidosetrecipients: + Guido
2014-12-30 01:56:34Guidosetmessageid: <1419904594.24.0.782191401639.issue23130@psf.upfronthosting.co.za>
2014-12-30 01:56:33Guidolinkissue23130 messages
2014-12-30 01:56:32Guidocreate