SquirrelMail through version 1.4.22 is vulnerable to a directory traversal flaw in the handling of the $message->att_local_name field in Deliver.class.php. A remote attacker that first authenticates to the application could exploit this to retrieve or delete arbitrary files via mail attachment. External References: https://insinuator.net/2018/03/squirrelmail-full-disclosure-troopers18/ http://www.openwall.com/lists/oss-security/2018/03/17/2 Upstream Issue: https://sourceforge.net/p/squirrelmail/bugs/2846/
Created squirrelmail tracking bugs for this issue: Affects: fedora-all [bug 1557842] Affects: epel-all [bug 1557841]
Is it really a bug? The report states that "The reference to $message->att_local_name in line 284 is controlled by the attacker." But I am not able to confirm that. The value of $message->att_local_name is generated randomly. In src/compose.php: $localfilename = GenerateRandomString(32, '', 7); $full_localfilename = "$hashed_attachment_dir/$localfilename"; while (file_exists($full_localfilename)) { $localfilename = GenerateRandomString(32, '', 7); $full_localfilename = "$hashed_attachment_dir/$localfilename"; } $fp = fopen ("$hashed_attachment_dir/$localfilename", 'wb'); $message->att_local_name = $localfilename; By default, these files are stored in /var/spool/squirrelmail/attach.
In reply to comment 2: > Is it really a bug? The report states that > > "The reference to $message->att_local_name in line 284 is controlled by the > attacker." > > But I am not able to confirm that. The value of $message->att_local_name is > generated randomly. In src/compose.php: att_local_name is generated randomly, but it then passes through attacker control as a hidden form field. src/compose.php: 1356: addHidden('attachments', serialize($attach_array)) : ''). .. 114:sqgetGlobalVar('attachments', $attachments, SQ_POST); 320: if (!empty($attachments)) 321: $attachments = unserialize($attachments);
Statement: Red Hat Enterprise Linux 5 is now in Extended Life Phase of the support and maintenance life cycle. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Red Hat Enterprise Linux Life cycle: https://access.redhat.com/support/policy/updates/errata/.
Created squirrelmail tracking bugs for this issue: Affects: fedora-all [bug 1560341] Affects: epel-all [bug 1560342]