<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>86488</bug_id>
          
          <creation_ts>2005-03-24 01:42 0000</creation_ts>
          <short_desc>dev-php/smarty Release 2.6.8 contains security fixes</short_desc>
          <delta_ts>2006-04-22 06:53:35 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Security</product>
          <component>GLSA Errors</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          <bug_file_loc>http://news.php.net/php.smarty.dev/2673</bug_file_loc>
          <status_whiteboard>C1 [glsa]</status_whiteboard>
          
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>akorthaus@web.de</reporter>
          <assigned_to>security@gentoo.org</assigned_to>
          <cc>php-bugs@gentoo.org</cc>
    
    <cc>tomk@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>akorthaus@web.de</who>
            <bug_when>2005-03-24 01:42:55 0000</bug_when>
            <thetext>Smarty 2.6.8 Released

[21-March-2005] For those using template security: A vulnerability in the regex_replace modifier has been fixed that allowed PHP code to be executed from a template, even with template security enabled. If you are using template security features, it is highly recommended to upgrade, or at least replace the modifier plugin. A problem with the {strip}{/strip} tags (that was introduced in 2.6.7) has been fixed. Casting objects to arrays in the {foreach} &quot;item&quot; attribute has been addressed.

ChangeLog: http://smarty.php.net/misc/NEWS
download: http://smarty.php.net/download.php

Reproducible: Always
Steps to Reproduce:
1.
2.
3.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-03-24 02:16:28 0000</bug_when>
            <thetext>PHP team, please bump</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sebastian@gentoo.org</who>
            <bug_when>2005-03-24 08:32:23 0000</bug_when>
            <thetext>dev-php/smarty-2.6.8 is in portage now.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-03-24 09:18:03 0000</bug_when>
            <thetext>Arches: please test and mark stable</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>weeve@gentoo.org</who>
            <bug_when>2005-03-24 19:46:47 0000</bug_when>
            <thetext>Stable on SPARC.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sebastian@gentoo.org</who>
            <bug_when>2005-03-24 21:17:45 0000</bug_when>
            <thetext>Stable on x86 and amd64.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>hansmi@gentoo.org</who>
            <bug_when>2005-03-25 01:36:08 0000</bug_when>
            <thetext>Stable on ppc.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>hansmi@gentoo.org</who>
            <bug_when>2005-03-25 13:07:22 0000</bug_when>
            <thetext>Stable on hppa, thanks to KillerFox for testing.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kloeri@gentoo.org</who>
            <bug_when>2005-03-26 10:19:52 0000</bug_when>
            <thetext>Stable on alpha.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-03-30 06:53:36 0000</bug_when>
            <thetext>GLSA 200503-35</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tomk@gentoo.org</who>
            <bug_when>2005-04-08 06:48:51 0000</bug_when>
            <thetext>Smarty 2.6.9 has been released with some more security fixes, I&apos;ll add the ebuild soon.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-04-08 06:53:49 0000</bug_when>
            <thetext>will be released as an update to GLSA 200503-35</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tomk@gentoo.org</who>
            <bug_when>2005-04-08 08:07:00 0000</bug_when>
            <thetext>smarty{,-docs}-2.6.9 in cvs, stable on x86 and amd64. Arches please mark stable.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>hansmi@gentoo.org</who>
            <bug_when>2005-04-08 10:24:15 0000</bug_when>
            <thetext>Stable on ppc.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kloeri@gentoo.org</who>
            <bug_when>2005-04-08 12:20:25 0000</bug_when>
            <thetext>Alpha stable.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gustavoz@gentoo.org</who>
            <bug_when>2005-04-08 18:02:19 0000</bug_when>
            <thetext>sparc done.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-04-09 09:20:01 0000</bug_when>
            <thetext>security: UPDATE draft sent, please approve</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-04-10 09:43:09 0000</bug_when>
            <thetext>UPDATE sent</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>monte@ohrt.com</who>
            <bug_when>2006-04-06 06:43:11 0000</bug_when>
            <thetext>Just a note, this is a misleading bullitin (and showing up high in google results):

http://www.gentoo.org/security/en/glsa/glsa-200503-35.xml

The vulnerability does not open attacks from remote users, it only allows someone with direct access to template files to execute PHP commands from within the template. It would be good for someone to change that wording, thanks.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2006-04-06 10:55:49 0000</bug_when>
            <thetext>tomk/php-bugs/auditors please advise wether this is remotely exploitable.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tomk@gentoo.org</who>
            <bug_when>2006-04-06 11:20:25 0000</bug_when>
            <thetext>(In reply to comment #19)
&gt; tomk/php-bugs/auditors please advise wether this is remotely exploitable.
&gt; 

According to the first entry in: http://smarty.php.net/index_archive.php it&apos;s not remotely exploitable. You need local access to the smarty template files to be able bypass certain checks when template security is enabled. That being said, when such a template has been created by a local user then the vulnerable code would be run when accessed remotely via the webserver. I&apos;m unsure as to the criteria used to determine whether that is defined as being locally or remotely exploitable.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2006-04-07 13:40:17 0000</bug_when>
            <thetext>I defined it as remotely exploitable because smarty&apos;s &quot;template security&quot; feature is typically used to allow untrusted users to plug their own template in a PHP application (for example, a bulletin board that allows users to customize templates). The hole is that the &quot;template security&quot; feature can be bypassed to allow to execute arbitrary code while theorically this should not be possible for those users. In which case the hole is remote, because the attacker doesn&apos;t need to be a local user.

I agree it&apos;s a little misleading to use the term &quot;Remote attacker&quot; everywhere, since the attack can only be remote if the application allows users to upload their own templates...
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>falco@gentoo.org</who>
            <bug_when>2006-04-10 15:28:47 0000</bug_when>
            <thetext>&gt; I defined it as remotely exploitable because smarty&apos;s &quot;template security&quot;
&gt; feature is typically used to allow untrusted users to plug their own template
&gt; in a PHP application (for example, a bulletin board that allows users to
&gt; customize templates).

yes, but generally, such PHP interfaces are reserved with an authentication device (at least, i hope so). Consequently, the potential attackers are not totally &quot;unknown&quot;. This is remote but reserved for known members of a group.

Well i think this doens&apos;t worth any update and we could close it.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>taviso@gentoo.org</who>
            <bug_when>2006-04-22 06:53:35 0000</bug_when>
            <thetext>I think we can close this bug now, please REOPEN if anyone disagrees.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>