Bug 918196 (CVE-2013-1635)

Summary: CVE-2013-1635 php, php53: Arbitrary locations file write due absent validation of soap.wsdl_cache_dir configuration directive value
Product: [Other] Security Response Reporter: Jan Lieskovsky <jlieskov>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: fedora, jorton, rcollet, rpm, webstack-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=moderate,public=20130207,reported=20130304,source=debian,cvss2=5.0/AV:N/AC:L/Au:N/C:N/I:P/A:N,rhel-5/php=notaffected,rhel-5/php53=notaffected,rhel-6/php=notaffected,fedora-all/php=notaffected
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-07 12:25:38 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 918202    

Description Jan Lieskovsky 2013-03-05 12:07:25 EST
A security flaw was found in the way PHP performed soap.wsdl_cache_dir configuration directive validation before projecting SOAP WSDL cache content to the local filesystem. A remote attacker could use this flaw to place SOAP WSDL files at arbitrary file system locations (locations accessible with the privileges of the PHP application).

References:
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702221
[2] https://bugs.gentoo.org/show_bug.cgi?id=459904
[3] http://www.mandriva.com/en/support/security/advisories/advisory/MDVSA-2013:016/

Relevant upstream patch:
[4] http://git.php.net/?p=php-src.git;a=commitdiff;h=702b436ef470cc02f8e2cc21f2fadeee42103c74
Comment 3 Vincent Danen 2013-03-07 12:25:38 EST
Note that this is actually an open_basedir bypass issue.

The problem is that soap.wsdl_cache_dir does not consult the open_basedir directive to determine where it is allowed to write files.

*** This bug has been marked as a duplicate of bug 169857 ***
Comment 4 Vincent Danen 2013-03-07 12:56:35 EST
Statement:

We do not consider safe_mode / open_basedir restriction bypass issues to be security sensitive.  For more details see http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=169857#c1 and http://www.php.net/security-note.php