Bug 748773 - (CVE-2010-4722) CVE-2010-4722 php-Smarty: Unspecified vulnerability in fetch plugin in Smarty before 3.0.2
CVE-2010-4722 php-Smarty: Unspecified vulnerability in fetch plugin in Smarty...
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Red Hat Product Security
impact=low,public=20101112,reported=2...
: Security
Depends On: 748909 748910 748911
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-25 06:46 EDT by Jan Lieskovsky
Modified: 2015-08-21 19:42 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-21 19:42:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Smarty r3774 SVN repository upstream patch (29.45 KB, patch)
2011-10-25 06:49 EDT, Jan Lieskovsky
no flags Details | Diff

  None (edit)
Description Jan Lieskovsky 2011-10-25 06:46:52 EDT
Common Vulnerabilities and Exposures assigned an identifier CVE-2010-4722 to
the following vulnerability:

Unspecified vulnerability in the fetch plugin in Smarty before 3.0.2 has unknown impact and remote attack vectors. 

References:
[1] http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-4722
[2] http://smarty-php.googlecode.com/svn/trunk/distribution/change_log.txt
Comment 1 Jan Lieskovsky 2011-10-25 06:48:38 EDT
Relevant Smarty Changelog entry:

===== Smarty 3.0.2  =====

12/11/2010
- reactivated $error_reporting property handling
- fixed typo in compile_continue
- fixed security in {fetch} plugin
- changed back plugin parameters to two. second is template object 
  with transparent access to Smarty object
- fixed {config_load} scoping form compile time to run time

and related SVN log entry:

r3774 | uwe.tews@googlemail.com | 2010-11-13 00:42:32 +0100 (Sat, 13 Nov 2010) | 7 lines

- reactivated $error_reporting property handling
- fixed typo in compile_continue
- fixed security in {fetch} plugin
- changed back plugin parameters to two. second is template object
  with transparent access to Smarty object
- fixed {config_load} scoping form compile time to run time
Comment 2 Jan Lieskovsky 2011-10-25 06:49:49 EDT
Created attachment 530055 [details]
Smarty r3774 SVN repository upstream patch
Comment 3 Jan Lieskovsky 2011-10-25 06:52:14 EDT
This issue affects the versions of the php-Smarty package, as shipped with Fedora release of 14 and 15. Please schedule an update.

--

This issue affects the versions of the php-Smarty package, as shipped with Fedora EPEL 5 and Fedora EPEL 6 repositories. Please schedule an update.


Note: Relevant change from upstream SVN r3774 revision is the following one:

Index: distribution/libs/plugins/function.fetch.php
===================================================================
--- distribution/libs/plugins/function.fetch.php        (revision 3773)
+++ distribution/libs/plugins/function.fetch.php        (revision 3774)
@@ -21,7 +21,7 @@
  * @return string|null if the assign parameter is passed, Smarty assigns the
  *                     result to a template variable
  */
-function smarty_function_fetch($params, $smarty, $template)
+function smarty_function_fetch($params, $template)
 {
     if (empty($params['file'])) {
         trigger_error("[plugin] fetch parameter 'file' cannot be empty",E_USER_NOTICE);
@@ -29,8 +29,8 @@
     }

     $content = '';
-    if ($template->security && !preg_match('!^(http|ftp)://!i', $params['file'])) {
-        if(!$smarty->security_handler->isTrustedResourceDir($params['file'])) {
+    if (isset($template->security_policy) && !preg_match('!^(http|ftp)://!i', $params['file'])) {
+        if(!$template->security_policy->isTrustedResourceDir($params['file'])) {
             return;
         }
Comment 4 Jan Lieskovsky 2011-10-25 10:41:09 EDT
Created php-Smarty tracking bugs for this issue

Affects: fedora-all [bug 748909]
Affects: epel-6 [bug 748910]
Affects: epel-5 [bug 748911]
Comment 5 Gwyn Ciesla 2011-10-27 14:26:06 EDT
This patch doesn't apply against 2.6.26.  Does this impact everything pre-3.0.2 or only 3.x.y pre-3.0.2?

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