A vulnerability in Lynx has recently been brought to the notice of the Lynx-Dev list. This vulnerability permits a user of Lynx to execute arbitrary commands on the machine running Lynx.
This allows users of Lynx in a captive situation (where the Lynx user does not normally have access to a shell prompt, or to a menu system that allows the user to run arbitrary commands) to get access to a shell prompt. This includes public Lynxes as well as situations in which users are restricted to a menu interface of some sort with Lynx.
This vulnerability can be exploited by anyone who can provide Lynx a carefully crafted URL. This can be done from the G'oto prompt, or by activating the URL on a world wide web page. The user can launch a shell on the machine running Lynx.
This could also conceivably allow malicious webmasters to add these carefully crafted URLs to their pages to cause unsuspecting Lynx users (in captive accounts or otherwise) to execute arbitrary commands.
Administrators of captive Lynxes are advised to disable g'oto on their Lynxes till a final patch set to fix this problem is available. This does not disallow the user from selecting a pseudo-URL of the proper form that someone has added inside an anchor on another page.
Another workaround for public Lynxes is to run lynx from a so-called chroot jail.
Sites which are concerned with this problem are advised to change the setting of TEMP_SPACE from the default ("/tmp") to "~" to cause temporary files to be put in the user's home directory. This may cause problems for users with unwriteable home directories (such as captive or public accounts) or users with low quotas. This may be done in two ways:
Individual users may also set the LYNX_TEMP_SPACE environment variable to point to another place known to be unwriteable by other users (for instance a subdirectory of the users' home directory, or a mode 0700 directory of a "sticky" /tmp).
A preliminary patch can be found at: http://www.slcc.edu/lynx/klaus/temp/. This patch is preliminary (i.e. alpha quality) and may break certain Lynx functions; it may also not completely fix the problem. Lynx 2.8 has a complete fix for this problem.
Other security problems applying to captive environments have been found with lynx at various times in the past. Various other bugs are fixed in Lynx 2.7.1 and the developmental code sets. All Lynx users are advised to upgrade to Lynx 2.8 if at all possible.
If you believe you have found a security problem with lynx that is not listed here, please forward it to lynx-dev@gnu.org.
This document was prepared by Jonathan Sergent <sergent@csociety.purdue.edu>