TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

PHPMailer RCE

46 pointsby easychrisover 8 years ago

4 comments

orfover 8 years ago
No details on what the actual issue was, but I think it&#x27;s fixed in this commit[1]. Seems like the escapeshellargs addition is the important bit.<p><i>Sigh</i><p>It seems a bit... odd... to try and embargo&#x2F;withhold information about a vulnerability when the fix is publicly available on their github for anybody to see.<p>1. <a href="https:&#x2F;&#x2F;github.com&#x2F;PHPMailer&#x2F;PHPMailer&#x2F;commit&#x2F;4835657cd639fbd09afd33307cef164edf807cdc" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;PHPMailer&#x2F;PHPMailer&#x2F;commit&#x2F;4835657cd639fb...</a>
评论 #13258841 未加载
评论 #13258863 未加载
dorianmover 8 years ago
Seems to come from the From email field: <a href="https:&#x2F;&#x2F;github.com&#x2F;PHPMailer&#x2F;PHPMailer&#x2F;compare&#x2F;v5.2.17...v5.2.18" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;PHPMailer&#x2F;PHPMailer&#x2F;compare&#x2F;v5.2.17...v5....</a><p>More details here: <a href="https:&#x2F;&#x2F;www.saotn.org&#x2F;exploit-phps-mail-get-remote-code-execution&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.saotn.org&#x2F;exploit-phps-mail-get-remote-code-exec...</a><p>PHP mail doc: <a href="http:&#x2F;&#x2F;php.net&#x2F;manual&#x2F;en&#x2F;function.mail.php" rel="nofollow">http:&#x2F;&#x2F;php.net&#x2F;manual&#x2F;en&#x2F;function.mail.php</a><p>A function that allows to pass arbitrary flags to a command line, what could go wrong... :)<p><pre><code> mail(&#x27;nobody@example.com&#x27;, &#x27;the subject&#x27;, &#x27;the message&#x27;, null, &#x27;-fwebmaster@example.com&#x27;);</code></pre>
cebeover 8 years ago
In case anyone needs this:<p>A script for finding vulnerable versions of PHPMailer on a server:<p><a href="https:&#x2F;&#x2F;gist.github.com&#x2F;cebe&#x2F;d0f5631b432c520a2e6f6be8beddf116" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;cebe&#x2F;d0f5631b432c520a2e6f6be8beddf11...</a><p>Finds also really old versions like 2.0.4.
评论 #13260923 未加载
janciover 8 years ago
If I understand, only implementations using &quot;sendmail&quot; (ie. not mail() or SMTP) are affected.
评论 #13258871 未加载
评论 #13258834 未加载