<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Unsanitized theme include vulnerability</title> 
  <pubDate>Thu, 09 Apr 2026 19:39:42 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/6399</link> 
  <atom:link rel="self" type="application/rss+xml" title="Unsanitized theme include vulnerability" href="https://bugs.horde.org/ticket/6399/rss" /> 
  <description>Unsanitized theme include vulnerability</description> 
 
   
   
  <item> 
   <title>Copy/paste from http://www.securityfocus.com/archive/1/48923</title> 
   <description>Copy/paste from http://www.securityfocus.com/archive/1/489239:



-------------------------



Horde 3.1.6 arbitrary file inclusion vulnerability, proof of concept &amp; patch.



A severe security vulnerability affects any unix distribution running version 3.1.6 of the Horde webmail client included in most popular webhosting control panels. All previous versions are also affected and it is believed although not yet proven that Horde Groupware is also vulnerable.



Details are as follows:



David Collins and Patrick Pelanne along with the rest of the HostGator.com LLC support team discovered that Horde was not properly sanitizing POST variables for several options including it&#039;s themes. By maliciously modifying POST data sent to the client the attacker can modify the location of the theme variable and Horde will subsequently insert this information into it&#039;s database. By modifying this POST variable one can allow for directory traversal and file inclusion which can lead to full root privilege escalation.



Proof of concept:



Data injected through malicious tampering of POST data:



mysql&gt; select * from horde_prefs where pref_uid=&#039;bbarker (at) hostgator (dot) com [email concealed]&#039; and pref_name=&#039;theme&#039;;



+-------------------------+------------+-----------+--------------------

------------------------------------------------------------------------

--------------------------------+



| pref_uid | pref_scope | pref_name | pref_value |



+-------------------------+------------+-----------+--------------------

------------------------------------------------------------------------

--------------------------------+



| bbarker (at) hostgator (dot) com [email concealed] | horde | theme | ../../../../../../../../../../../../../../../../../../tmp/.horde/imp/att

achments/bbarker (at) hostgator (dot) com [email concealed]/1204804402/t.txt |



Shown above, the malicious POST variable was inserted into the database and now points to the malicious code denoted by t.txt



A truncated strace shows the access and execution of the malicious code when the user enters the Horde webmail client:



31852 lstat64(&quot;/usr&quot;, {st_dev=makedev(3, 3), st_ino=2, st_mode=S_IFDIR|0755, st_nlink=18, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=16, st_size=4096, s$



31852 lstat64(&quot;/usr/local&quot;, {st_dev=makedev(3, 3), st_ino=608001, st_mode=S_IFDIR|0755, st_nlink=26, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=16, st_s$



31852 lstat64(&quot;/usr/local/cpanel&quot;, {st_dev=makedev(3, 3), st_ino=18539, st_mode=S_IFDIR|0711, st_nlink=37, st_uid=0, st_gid=10, st_blksize=4096, st_blocks=8$



31852 lstat64(&quot;/usr/local/cpanel/base&quot;, {st_dev=makedev(3, 3), st_ino=85078, st_mode=S_IFDIR|0755, st_nlink=21, st_uid=0, st_gid=0, st_blksize=4096, st_bloc$



31852 lstat64(&quot;/usr/local/cpanel/base/horde&quot;, {st_dev=makedev(3, 3), st_ino=85388, st_mode=S_IFDIR|0755, st_nlink=21, st_uid=32002, st_gid=32004, st_blksize$



31852 lstat64(&quot;/usr/local/cpanel/base/horde/config&quot;, {st_dev=makedev(3, 3), st_ino=115868, st_mode=S_IFDIR|0755, st_nlink=2, st_uid=32002, st_gid=32004, st_$



31852 lstat64(&quot;/usr/local/cpanel/base/horde/themes&quot;, {st_dev=makedev(3, 3), st_ino=86796, st_mode=S_IFDIR|0755, st_nlink=28, st_uid=32002, st_gid=32004, st_$



31852 lstat64(&quot;/tmp&quot;, {st_dev=makedev(7, 1), st_ino=2, st_mode=S_IFDIR|S_ISVTX|0777, st_nlink=9, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=64, st_size=$



31852 lstat64(&quot;/tmp/.horde&quot;, {st_dev=makedev(7, 1), st_ino=38609, st_mode=S_IFDIR|0700, st_nlink=3, st_uid=32002, st_gid=32004, st_blksize=4096, st_blocks=2$



31852 lstat64(&quot;/tmp/.horde/imp&quot;, {st_dev=makedev(7, 1), st_ino=38610, st_mode=S_IFDIR|0700, st_nlink=3, st_uid=32002, st_gid=32004, st_blksize=4096, st_bloc$



31852 lstat64(&quot;/tmp/.horde/imp/attachments&quot;, {st_dev=makedev(7, 1), st_ino=38611, st_mode=S_IFDIR|0700, st_nlink=3, st_uid=32002, st_gid=32004, st_blksize=4$



31852 lstat64(&quot;/tmp/.horde/imp/attachments/patrick (at) hostgator (dot) com [email concealed]&quot;, {st_dev=makedev(7, 1), st_ino=38612, st_mode=S_IFDIR|0700, st_nlink=3, st_uid=32002, st$



31852 lstat64(&quot;/tmp/.horde/imp/attachments/patrick (at) hostgator (dot) com [email concealed]/1204804402&quot;, {st_dev=makedev(7, 1), st_ino=38613, st_mode=S_IFDIR|0700, st_nlink=2, st_ui$



31852 lstat64(&quot;/tmp/.horde/imp/attachments/patrick (at) hostgator (dot) com [email concealed]/1204804402/t.

txt&quot;, {st_dev=makedev(7, 1), st_ino=38614, st_mode=S_IFREG|0600, st_nlink=1,$



31852 open(&quot;/tmp/.horde/imp/attachments/patrick (at) hostgator (dot) com [email concealed]/1204804402/t.txt

&quot;, O_RDONLY) = 4



We have also included a patch below for this vulnerability tested on Horde v2.105.4.8 2006/07/29 16:49:19



--- horde/lib/Horde/Prefs.php 2008-03-06 21:14:38.000000000 -0600



+++ horde/lib/Horde/Prefs.patched 2008-03-06 20:10:56.000000000 -0600



@@ -325,12 +325,23 @@



}



return (isset($this-&gt;_prefs[$pref][&#039;v&#039;])) ?



- ($convert ?



+ $this-&gt;_fixhole($pref,$convert ?



$this-&gt;convertFromDriver($this-&gt;_prefs[$pref][&#039;v&#039;], $charset) :



$this-&gt;_prefs[$pref][&#039;v&#039;]) :



null;



}



+function _fixhole($pref,$value) {



+ $sanitize = &#039;/^[a-z0-9._-]+$/i&#039;;



+ if (preg_match($sanitize, $value) &amp;&amp; $pref == &#039;theme&#039;) {



+ return $value;



+ } elseif ($pref == &#039;theme&#039;) {



+ return &quot;mozilla&quot;;



+ } else {



+ return $value;



+ }



+}



+



function __get($name)



{



return $this-&gt;getValue($name);



--------------------------



Sorry because I know someone&#039;s probably already aware: but I didn&#039;t see any word on this after several hours on either the Horde site, in the bug database, or on the Horde mailing list archives</description> 
   <pubDate>Fri, 07 Mar 2008 21:39:59 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6399#t43560</link> 
  </item> 
   
  <item> 
   <title>That&#039;s because the vulnerability is bogus, the &quot;fix&quot; is wron</title> 
   <description>That&#039;s because the vulnerability is bogus, the &quot;fix&quot; is wrong, and the people who &quot;reported&quot; it did not give us time (even a day) to respond, and have continued to ignore our response to them.</description> 
   <pubDate>Fri, 07 Mar 2008 21:50:35 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6399#t43561</link> 
  </item> 
   
  <item> 
   <title>This vulnerability does not exist in the FRAMEWORK_3 branch;</title> 
   <description>This vulnerability does not exist in the FRAMEWORK_3 branch; the code in question was removed before 3.2-RC2. It is also not clear that even in Horde 3.1.6 and earlier it affects people who use the SQL preferences backend. It has been reproduced with LDAP preferences. It is fixed by Horde 3.1.7, which has been released.</description> 
   <pubDate>Fri, 07 Mar 2008 23:05:51 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6399#t43563</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
