A 2016 PHPMailer Flaw Still Being Exploited: The Risk of Old Libraries in Your PHP Website

Solution Architect

1 Dec 20266 min read

A 2016 PHPMailer Flaw Still Being Exploited: The Risk of Old Libraries in Your PHP Website

PHPMailer CVE-2016-10033 was fixed in 2016 and added to CISA's exploited list in 2025. What CISOs should know about old libraries hiding in ageing PHP websites.

Most security news is about something new. This one isn't. The PHPMailer flaw CVE-2016-10033 is from 2016, the fix is from 2016, and in July 2025 the US Cybersecurity and Infrastructure Security Agency (CISA) added it to its catalogue of vulnerabilities known to be exploited in the wild. For a CISO, that is a reminder that an old, fixed flaw is not a closed one if the vulnerable copy is still running somewhere in your estate.

PHPMailer's own documentation calls it "probably the world's most popular code for sending email from PHP". The flaw is rated 9.8 out of 10 (Critical) by the US National Vulnerability Database. Nothing went wrong on the developers' side: the flaw was reported responsibly and fixed within days. The problem is what happened afterwards. Thousands of old copies stayed exactly where they were.

For any organisation running an older PHP website, that is the lesson worth understanding, and it sits at the heart of software supply chain security. The risk often isn't in the code you wrote. It is in the code you borrowed years ago and never revisited.

PHPMailer CVE-2016-10033: old building blocks that never got updated

Almost no website is built entirely from scratch. Developers use libraries: ready-made components that handle common jobs such as sending email, processing payments or resizing images. PHPMailer is one of the most popular for email, and it powers many contact forms, password-reset messages and order confirmations.

In December 2016, security researcher Dawid Golunski reported that PHPMailer could be tricked into running an attacker's commands on the web server. The trick worked through the "from" address of an email. On a typical contact form that sends a message "from" whoever filled it in, a carefully crafted address could cause the server to run instructions it was never meant to run. The National Vulnerability Database describes the result as attackers being able to "execute arbitrary code".

PHPMailer released a fix straight away. When Golunski found a way around that first fix, recorded as CVE-2016-10045, PHPMailer released another on 28 December 2016. Platforms that bundled PHPMailer, including WordPress, Drupal and Joomla, responded quickly too.

Not every site with an old copy is exploitable. PHPMailer's own write-up says exploitation depends on several conditions, including how the site sends email and how its mail server is set up. But one of the most common situations it describes, a contact form that emails the business "from" the visitor, is a very ordinary feature of business websites.

Then, on 7 July 2025, CISA added CVE-2016-10033 to its Known Exploited Vulnerabilities catalogue. CISA doesn't say who was exploiting it, and as of 23 October 2026 the catalogue lists its use in ransomware campaigns as unknown. The second flaw, CVE-2016-10045, is not in the catalogue.

It wasn't PHPMailer's last flaw, either. Its own security notes list further issues fixed in later years. A copy frozen in 2016 misses all of them.

What could go wrong for your organisation

A flaw that lets an attacker run code on your web server is among the most serious kinds. Depending on how the server and application are set up, the potential consequences include:

  • Customer and business data being read, copied or altered.
  • Your website being defaced, taken offline or used to host malicious content.
  • The cost of investigation, clean-up and recovery, and the disruption to normal business while it happens.
  • Reporting obligations if personal data is involved, and the loss of customer trust that follows a public incident.

These are potential outcomes, not predictions. Whether any given site is exposed depends on which library versions it carries and how they are used. Most businesses simply don't know.

Could your website be next?

The fact that CISA flagged this flaw eight and a half years after it was fixed tells you something important. There were still enough vulnerable systems for exploitation to be worth an attacker's time.

Attackers working with old, well-documented flaws like this one rarely choose their targets by name. They typically use automated tools to scan large numbers of websites and look for signs of known weaknesses. A site can be found simply because it is online and carries an old copy of a popular library.

That is why small or low-profile businesses are not automatically safe. A contact form on a modest company website can be just as visible to an automated scan as one on a large brand's site. And a site that has never had an incident isn't necessarily secure. It may not have been tested against this particular flaw yet, or problems may have gone unnoticed.

None of this means every PHP website is vulnerable, or that an attack is inevitable. It means that an old library, left in place, is a known risk that doesn't fade with time.

Why legacy PHP applications deserve attention

Old components are a risk in any technology. In Node.js, for example, the Nodemailer email package had its own flaw of a similar kind, CVE-2020-7769. But ageing PHP applications have some habits that make old libraries especially hard to find and fix.

Libraries were copied, not tracked. For many years, the normal way to use PHPMailer was to download it and drop the files into a folder. Copies ended up inside themes, plugins, contact-form scripts and custom applications. No tool keeps track of them, so no update will ever reach them.

Old versions stop getting fixes. PHPMailer's documentation says plainly that version 5.2 "is no longer supported, even for security updates".

Some libraries are abandoned entirely. Swiftmailer, another popular PHP email library, reached end of maintenance at the end of November 2021, according to the Symfony project. Applications still using it receive no fixes at all.

Old PHP blocks new libraries. An application stuck on an old PHP version often can't run current versions of the libraries it depends on. The library stays old because the platform is old, and the platform stays old because something else breaks when it is upgraded.

This is how technical debt turns into security risk: not through one bad decision, but through years of postponed updates.

What this means for your organisation

Ask a simple question: does anyone in your organisation know which third-party libraries your website runs, and which versions? For most businesses, the honest answer is "we don't know". That isn't negligence. It is the natural result of a system built by several people over several years without a record of what went into it.

But it is a gap worth closing before an incident closes it for you. Knowing what your application contains, including the hand-copied pieces, is the starting point for any informed decision about whether to update it, upgrade it or modernise it.

Recommended next step

Don't wait for a decade-old flaw to find its way into your website. A Free Security and Modernisation Review looks at your PHP version, the third-party libraries in your codebase, including hand-copied ones, and the way your forms send email, and shows where old components may be leaving you exposed.

From there, the right path depends on the application. For some, bringing existing components up to date is the right answer. For others, a planned move to a different platform, with Node.js as one possible option, where every component is declared and tracked from the start, may make more sense. No platform is immune to flawed libraries, as Nodemailer's own history shows. What matters is that you always know what you're running, and that keeping it updated becomes routine vulnerability management rather than a project.

Free Security and Modernisation Review

Sketchmonk is a security-led software engineering company. Our engineers have built software for a national defence research lab, global cyber security vendors and security-first product companies, with 16+ years of engineering behind them. In a free Security and Modernisation Review, we look at the application you run today: where it is exposed, what it depends on, and the safest route to a secure, modern platform. Want to see how we have handled problems like yours? Ask for a case study in the same email. There's no obligation to proceed. Request your free Security and Modernisation Review

Build with us. Deploy with us. Win with us

We don't deliver projects and walk away. We build with you, inside your mission.

Book a strategic consultation