{"id":3585416,"date":"2013-03-21T22:04:33","date_gmt":"2013-03-21T22:04:33","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/pwn3d\/"},"modified":"2016-08-20T23:01:44","modified_gmt":"2016-08-20T23:01:44","slug":"pwn3d","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/pwn3d\/","title":{"rendered":"mfunc issue"},"content":{"rendered":"<p>Dear wp-super-cache\/w3-total-cache developers,<\/p>\n<p>As you may be aware worpress allows some html in comments including html comments. With wp-super-cache or w3-total-cache installed php code, by design, is allowed in comments too. Not to mention a relatively harmless XSS bug (or feature, depends on who you ask) is elevated into server side code execution.<\/p>\n<p>The following examples work with wp-super-cache and w3-total-cache, all you need to do is post a comment with:<br \/>\n &#8211; to display time and date:<br \/>\n<code>&lt;!--mfunc eval(base64_decode( redacted )); --&gt;&lt;!--\/mfunc--&gt;<\/code><\/p>\n<p> &#8211; php shell\/backdoor upload:<br \/>\n<code>&lt;!--mfunc eval(base64_decode( also redacted, see a trend here ;) )); --&gt;&lt;!--\/mfunc--&gt;<\/code><br \/>\nthe shell will eval($_POST[&#8220;e&#8221;]) and can be accessed at: http:\/\/path\/to\/blog\/wp-content\/redacted<\/p>\n<p>I suggest you remove the mfunc\/mclude features entirely, it&#8217;s way too hazardous to parse and execute the output.<\/p>\n<p>Regards,<br \/>\nCsaba<\/p>\n<p>PS.<br \/>\nBelow you&#8217;ll find the same proof of concept examples escaped with base64:<\/p>\n<p><em>[ Just plain deleted ]<\/em><\/p>\n<p>https:\/\/wordpress.org\/extend\/plugins\/wp-super-cache\/<\/p>\n","protected":false},"template":"","class_list":["post-3585416","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3585416","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3585416\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=3585416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}