Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 399247 (CVE-2012-0057) - <dev-lang/php-5.3.9 : xslt file writing vulnerability (CVE-2012-0057)
Summary: <dev-lang/php-5.3.9 : xslt file writing vulnerability (CVE-2012-0057)
Status: RESOLVED FIXED
Alias: CVE-2012-0057
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Security
URL: https://bugzilla.redhat.com/show_bug....
Whiteboard: B3 [glsa]
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-18 04:03 UTC by Viorel Tabara
Modified: 2012-09-24 00:27 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Viorel Tabara 2012-01-18 04:03:09 UTC
Nicolas Grégoire nicolas.gregoire@agarri.fr

Please find attached the "php539-xslt.php" script.

This script displays by default a pre-filled HTML form including some
XML data and XSLT code. When the form is submitted, the user-controlled
XML data is transformed using the user-controlled XSLT code. Then, the
output of this transformation is displayed in the browser.

When executed, the pre-filled XSLT code will write
to /var/www/xxx/backdoor.php this content :

<html><body>
<h1><font color="red">I'm a (very) malicious PHP file !!!</font></h1>
<?php phpinfo()?>
</body></html>

Note : the payload is encrypted with RC4. A static key ("simple_demo")
embedded in the XSLT code is used to decrypt it.

Regards,
Nicolas

Reproducible: Always
Comment 1 Agostino Sarubbo gentoo-dev 2012-01-18 09:38:40 UTC
@security, is already fixed in 5.3.9, please choise if it can goes into existing glsa
Comment 2 Sean Amoss (RETIRED) gentoo-dev Security 2012-01-21 13:45:47 UTC
Added to existing GLSA.
Comment 3 GLSAMaker/CVETool Bot gentoo-dev 2012-02-21 04:11:20 UTC
CVE-2012-0057 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2012-0057):
  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.
Comment 4 GLSAMaker/CVETool Bot gentoo-dev 2012-09-24 00:27:32 UTC
This issue was resolved and addressed in
 GLSA 201209-03 at http://security.gentoo.org/glsa/glsa-201209-03.xml
by GLSA coordinator Sean Amoss (ackle).