The Patching Friars' AlmanacA calendar of CVE saints

Patron of December 30

PwnScriptumHoly card for pwnscriptum, generated with AI (Claude, Anthropic) for the Lunario dei Frati Patchatori.CC BY-NC-SA 4.0 <?php -X /var/www PwnScriptum EPISTULA EXSECUTA
🤖 Image and text generated with AI

⬇ Download holy card: ·

Embed on your site

Saint PwnScriptum, Who Wrote Code in the Mail Logs

Patron of contact forms, PHP's mail() function, and anyone who passes the user's address to the system sender.

Life

In late December 2016 Dawid Golunski disclosed PwnScriptum, a family of flaws in PHPMailer, SwiftMailer and Zend Mail. PHP's mail() function passed its fifth parameter to sendmail through a shell: with quoted-string syntax one could inject extra arguments, such as Sendmail's -X option, which writes a log file of your choice. By putting PHP code in the message body and the log in a web folder, a single contact form was enough to reach code execution.

Prayer

O Saint PwnScriptum, who turns a contact form into a shell, let our email addresses stay data and never arguments. Amen.

How to celebrate

Celebrated by updating PHPMailer to 5.2.18 and validating every address before handing it to mail().

A contact form without checks is mail that burns.

Technical record

Disclosed on
December 30 2016
CVE
CVE-2016-10033CVE-2016-10045CVE-2016-10034CVE-2016-10074
CVSS
9.8Actively exploited (CISA KEV)
Product
PHP · PHPMailer

The mailSend function in the isMail transport in PHPMailer before 5.2.18 might allow remote attackers to pass extra parameters to the mail command and consequently execute arbitrary code via a \" (backslash double quote) in a crafted Sender property.

Sources: exploitbox.io · legalhackers.com · exploit-db.com · thehackernews.com

📅 Add to your calendar

Saints:Google CalendarApple, Outlook and others (.ics)

Observances (feasts, scourges and miracles):Google CalendarApple, Outlook and others (.ics)

In Google Calendar you can also paste the URL in Settings → Add calendar → From URL. The first sync can take a few hours.