Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 236240 - CVE-2007-2348 lftp mirror --script does not escape names and targets of symbolic links
Summary: CVE-2007-2348 lftp mirror --script does not escape names and targets of symbo...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: lftp
Version: 6
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Martin Nagy
QA Contact:
URL: http://lftp.yar.ru/news.html
Whiteboard: impact=low,source=gentoo,reported=200...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-04-12 16:49 UTC by Lubomir Kundrak
Modified: 2016-07-26 23:46 UTC (History)
2 users (show)

Fixed In Version: lftp-3.5.10-4.fc7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-01-06 01:09:03 UTC


Attachments (Terms of Use)

Description Lubomir Kundrak 2007-04-12 16:49:45 UTC
+++ 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
link.

Version-Release number of selected component (if applicable):

        Doesn't Affect: RHEL2.1 no support for --script
        Doesn't Affect: RHEL3 ditto
        Affects: RHEL4
        Affects: RHEL5
        Affects: FC5
        Affects: FC6

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
  
Actual results:

The downloaded file will point to "kwak", while file /tmp/gotya will be
created.

Additional info:

The security implications are questionable, as is the usefullness of the
--script feature itself.

Comment 1 Till Maas 2008-01-06 01:09:03 UTC
In Fedora 7, there is lftp-3.5.10-4.fc7, which has this vulnerability fixed.


Note You need to log in before you can comment on or make changes to this bug.