The opensslx509parse function in openssl.c in the OpenSSL module in PHP before 5.4.18 and 5.5.x before 5.5.2 does not properly handle a '\0' character in a domain name in the Subject Alternative Name field of an X.509 certificate, which allows man-in-the-middle attackers to spoof arbitrary SSL servers via a crafted certificate issued by a legitimate Certification Authority, a related issue to CVE-2009-2408.
A security flaw was found in the way SOAP parser of PHP processed certain SOAP objects (due to allowed expansion of XML external entities during SOAP WSDL files parsing, it was previously possible to read arbitrary system files, accessible with the privileges of the PHP application). If a PHP application accepted untrusted SOAP object input remotely from clients, an attacker could use this flaw for unauthorized of read system files (accesible with the privileges of the PHP application).
References: [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702221 [2] https://bugs.gentoo.org/showbug.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=c737b89473df9dba6742b8fc8fbf6d009bf05c36
The SQLite functionality in PHP before 5.3.15 allows remote attackers to bypass the openbasedir protection mechanism via unspecified vectors.
The file-upload implementation in rfc1867.c in PHP before 5.4.0 does not properly handle invalid [ (open square bracket) characters in name values, which makes it easier for remote attackers to cause a denial of service (malformed $FILES indexes) or conduct directory traversal attacks during multi-file uploads by leveraging a script that lacks its own filename restrictions.
sapi/cgi/cgimain.c in PHP before 5.3.13 and 5.4.x before 5.4.3, when configured as a CGI script (aka php-cgi), does not properly handle query strings that lack an = (equals sign) character, which allows remote attackers to cause a denial of service (resource consumption) by placing command-line options in the query string, related to lack of skipping a certain phpgetopt for the 'T' case. NOTE: this vulnerability exists because of an incomplete fix for CVE-2012-1823.
PHP before 5.3.9 has improper libxslt security settings, which allows remote attackers to create arbitrary files via a crafted XSLT stylesheet that uses the libxslt output extension.
https://bugs.php.net/bug.php?id=53502
[2010-12-08 21:04 UTC] jsheridan at tenable dot com
Description: ------------ strtotime calls with a timezone embedded function correctly but continually use up memory. In a daemon program this becomes quickly fatal.
Test script: --------------- <?php while (true) { strtotime('Monday 00:00 Europe/Paris'); // Memory leak } ?>
<?php while (true) { datedefaulttimezoneset("Europe/Paris"); strtotime('Monday 00:00'); // No memory leak } ?>
Expected result: ---------------- Memory usage should remain stable.
https://bugs.php.net/bug.php?id=55776
[2011-09-24 19:21 UTC] grinyad at mail dot ru
Description: ------------ <?php
// make a PdoMysql statement before
$result = $stmt->fetch(PDO::FETCHLAZY);
sessionstart();
$SESSION['PDORow'] = $result; ?>
Is crashing on next request after saving PDORow to session on sessionstart()
[2011-09-24 19:24 UTC] aharvey
What do you mean by "crashing"? Is the actual PHP process crashing, or are you just getting an error message because PDO statements aren't serialisable (which is expected)?
[2011-09-25 08:56 UTC] grinyad at mail dot ru
Is a Apache crash. It gives a CGI/FastCGI Send/Don't Send window.
http://img171.imageshack.us/img171/3953/57126366.jpg
After few minutes is crashing apache server:
http://img840.imageshack.us/img840/2981/21231006.jpg
[2011-09-25 12:39 UTC] johannes
PDORow objects may not be serialized and therefore not be put in a session. In svn it was fixed to throw a warning and not crash anymore this will be in future releases.
PHP before 5.3.9 computes hash values for form parameters without restricting the ability to trigger hash collisions predictably, which allows remote attackers to cause a denial of service (CPU consumption) by sending many crafted parameters.
PHP before 5.3.7 does not properly implement the errorlog function, which allows context-dependent attackers to cause a denial of service (application crash) via unspecified vectors.
PHP before 5.3.7 does not properly check the return values of the malloc, calloc, and realloc library functions, which allows context-dependent attackers to cause a denial of service (NULL pointer dereference and application crash) or trigger a buffer overflow by leveraging the ability to provide an arbitrary value for a function argument, related to (1) ext/curl/interface.c, (2) ext/date/lib/parsedate.c, (3) ext/date/lib/parseisointervals.c, (4) ext/date/lib/parsetz.c, (5) ext/date/lib/timelib.c, (6) ext/pdoodbc/pdoodbc.c, (7) ext/reflection/phpreflection.c, (8) ext/soap/phpsdl.c, (9) ext/xmlrpc/libxmlrpc/base64.c, (10) TSRM/tsrmwin32.c, and (11) the strtotime function.
A flaw in John the Ripper and cryptblowfish was reported [1],[2],[3] where passwords with 8-bit characters were mishandled. A password containing a single character with the 8th bit set have 1 to 3 characters immediately preceding the 8-bit character ignored (approximately 3 in 16 passwords). With more than one 8-bit character in the password, there may be more ignored characters. This can result in passwords being even easier to crack than expected. This is due to a char signedness bug in cryptblowfish.
Other programs, such as PHP Suhosin, PHP 5.3.x, and PostgreSQL's pgcrypt module, contain the vulnerable cryptblowfish code.
A fix for this flaw [4], as well as 8-bit tests [5] and a self-test at runtime [6] have been committed upstream.
[1] http://www.openwall.com/lists/oss-security/2011/06/20/2 [2] http://www.openwall.com/lists/john-dev/2011/06/20/3 [3] http://www.openwall.com/lists/john-dev/2011/06/20/5 [4] http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/glibc/cryptblowfish/cryptblowfish.c.diff?r1=1.9;r2=1.10 [5] http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/glibc/cryptblowfish/wrapper.c.diff?r1=1.9;r2=1.10 [6] http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/glibc/cryptblowfish/cryptblowfish.c.diff?r1=1.10;r2=1.11
Buffer overflow in the strval function in PHP before 5.3.6, when the precision configuration option has a large value, might allow context-dependent attackers to cause a denial of service (application crash) via a small numerical value in the argument.
Multiple memory leaks in the OpenSSL extension in PHP before 5.3.6 might allow remote attackers to cause a denial of service (memory consumption) via (1) plaintext data to the opensslencrypt function or (2) ciphertext data to the openssldecrypt function.
Unspecified vulnerability in the NumberFormatter::setSymbol (aka numfmtsetsymbol) function in the Intl extension in PHP before 5.3.6 allows context-dependent attackers to cause a denial of service (application crash) via an invalid argument, a related issue to CVE-2010-4409.
Common Vulnerabilities and Exposures assigned an identifier CVE-2011-1469 to the following vulnerability:
Unspecified vulnerability in the Streams component in PHP before 5.3.6 allows context-dependent attackers to cause a denial of service (application crash) by accessing an ftp:// URL during use of an HTTP proxy with the FTP wrapper.
References: [1] http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-1469 [2] http://bugs.php.net/bug.php?id=54092 [3] http://www.php.net/ChangeLog-5.php
Upstream patch: [4] http://svn.php.net/viewvc/?view=revision&revision=308734
Integer overflow in the SdnToJulian function in the Calendar extension in PHP before 5.3.6 allows context-dependent attackers to cause a denial of service (application crash) via a large integer in the first argument to the calfromjd function.
The Zip extension in PHP before 5.3.6 allows context-dependent attackers to cause a denial of service (application crash) via a ziparchive stream that is not properly handled by the streamgetcontents function.
It was reported that ZipArchive() would segfault when opening an empty archive with the FLUNCHANGED flag set [1]. This is corrected in upstream PHP 5.3.6 [2],[3].
[1] http://bugs.php.net/bug.php?id=53885 [2] http://www.php.net/ChangeLog-5.php#5.3.6 [3] http://svn.php.net/viewvc/?view=revision&revision=307867
An insufficient input validation flaws was discovered in the PHP's Exif extension that allows extracting Exif data from image files: http://thread.gmane.org/gmane.comp.security.oss.general/4198
An integer overflow causes PHP to not validate offsets read from the file properly, causing it to read behind the end of the buffer. This leads to PHP interpreter crash when reading specially crafted Exif data.
Before the code over-reading the buffer is reached, PHP needs to allocate a large amount of memory (based on the components / length value read from the file). This attempt triggers the integer overflow check in safeemalloc on 32bit platforms and requires the memorylimit for the script to be set to -1 (i.e. no limit is enforced by PHP) on 64bit platforms.
Upstream commits, which include reproducers: http://svn.php.net/viewvc?view=revision&revision=308316 http://svn.php.net/viewvc?view=revision&revision=308317
The follow-up commit replaces the use of hard-coded numeric constant with INT32MAX: http://svn.php.net/viewvc?view=revision&revision=308362
This fix should first appear in upstream version 5.3.6.
PHP before 5.3.4 accepts the \0 character in a pathname, which might allow context-dependent attackers to bypass intended access restrictions by placing a safe file extension after this character, as demonstrated by .php\0.jpg at the end of the argument to the fileexists function.
Use-after-free vulnerability in the Zend engine in PHP before 5.2.15 and 5.3.x before 5.3.4 might allow context-dependent attackers to cause a denial of service (heap memory corruption) or have unspecified other impact via vectors related to use of set, get, isset, and unset methods on objects accessed by a reference.
The iconvmimedecodeheaders function in the Iconv extension in PHP before 5.3.4 does not properly handle encodings that are unrecognized by the iconv and mbstring (aka Multibyte String) implementations, which allows remote attackers to trigger an incomplete output array, and possibly bypass spam detection or have unspecified other impact, via a crafted Subject header in an e-mail message, as demonstrated by the ksc5601-1987 character set.
Stack-based buffer overflow in the GD extension in PHP before 5.2.15 and 5.3.x before 5.3.4 allows context-dependent attackers to cause a denial of service (application crash) via a large number of anti-aliasing steps in an argument to the imagepstext function.
A flaw in how PHP handled the numeric value 2.2250738585072011e-308 was reported [1]. If a script were to assign this value to a variable, it could cause PHP to hang (infinite loop). This issue has been fixed in upstream PHP [2] 5.2.17 and 5.3.5.
[1] http://bugs.php.net/53632 [2] http://svn.php.net/viewvc?view=revision&revision=307095
Double free vulnerability in the imapdoopen function in the IMAP extension (ext/imap/phpimap.c) in PHP 5.2 before 5.2.15 and 5.3 before 5.3.4 allows attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via unspecified vectors.
Common Vulnerabilities and Exposures assigned an identifier CVE-2010-3710 to the following vulnerability:
Name: CVE-2010-3710 URL: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-3710 Assigned: 20101001 Reference: CONFIRM: http://bugs.php.net/bug.php?id=52929
Stack consumption vulnerability in the filtervar function in PHP 5.2.x through 5.2.14 and 5.3.x through 5.3.3, when FILTERVALIDATEEMAIL mode is used, allows remote attackers to cause a denial of service (memory consumption and application crash) via a long e-mail address string.
Stefan Esser discovered that PHP did not properly handle PSUNDEFMARKER ('!') character in session variable names. In cases where PHP script generated session variable names from untrusted user input, a malicious user could use this flaw to inject arbitrary variable into session. This could create additional attack vector for exploiting other possible unserialization flaws.
Reference: http://php-security.org/2010/05/31/mops-2010-060-php-session-serializer-session-data-injection-vulnerability/index.html
Upstream fix, added in 5.3.3 and 5.2.14: http://svn.php.net/viewvc?view=revision&revision=298608
The (1) trim, (2) ltrim, (3) rtrim, and (4) substrreplace functions in PHP 5.2 through 5.2.13 and 5.3 through 5.3.2 allow context-dependent attackers to obtain sensitive information (memory contents) by causing a userspace interruption of an internal function, related to the call time pass by reference feature.
The (1) parsestr, (2) pregmatch, (3) unpack, and (4) pack functions; the (5) ZENDFETCHRW, (6) ZENDCONCAT, and (7) ZENDASSIGNCONCAT opcodes; and the (8) ArrayObject::uasort method in PHP 5.2 through 5.2.13 and 5.3 through 5.3.2 allow context-dependent attackers to obtain sensitive information (memory contents) or trigger memory corruption by causing a userspace interruption of an internal function or handler. NOTE: vectors 2 through 4 are related to the call time pass by reference feature.