+++ This bug was initially created as a clone of Bug #236238 +++
Description of problem:
Does not escape names of symlinks when producing a script to be
passed to the shell, which could be abused by an attacked to
trick the user into executing arbitrary code with crafted symbolic
Version-Release number of selected component (if applicable):
Doesn't Affect: RHEL2.1 no support for --script
Doesn't Affect: RHEL3 ditto
Steps to Reproduce:
1. ln -s '$(touch /tmp/gotya; echo kwak)' malicious
2. serve that file via ftp and attempt to download it with lftp via mirror --script
3. Try to run the resulting script with lftp -f
The downloaded file will point to "kwak", while file /tmp/gotya will be
The security implications are questionable, as is the usefullness of the
--script feature itself.
In Fedora 7, there is lftp-3.5.10-4.fc7, which has this vulnerability fixed.