Facebook Google Plus Twitter LinkedIn YouTube RSS Menu Search Resource - BlogResource - WebinarResource - ReportResource - Eventicons_066 icons_067icons_068icons_069icons_070

Tenable Blog

Subscribe

CVE-2017-9841: Drupal Sites Exploited Using PHPUnit Vulnerability in Mailchimp Modules (PSA-2019-0904)

Attackers are leveraging a vulnerability patched nearly three years ago to target Drupal sites.

Background

On September 4, Drupal published PSA-2019-09-04, a public service announcement (PSA) for a vulnerability in a third-party library in a Drupal module that’s being actively exploited in the wild.

Analysis

CVE-2017-9841 is a code injection vulnerability in PHPUnit, a PHP unit testing framework. The PHPUnit library is part of the Mailchimp and Mailchimp E-Commerce modules in Drupal which, according to their modules pages, are currently used by over 25,000 sites combined.

In June 2017, a Twitter account called “vulnbusters” was created and published an advisory for the vulnerability on their now-defunct website, which is available through the Internet Archive’s Wayback Machine here.

The advisory identifies the vulnerability within the /phpunit/src/Util/PHP/eval-stdin.php file through its use of the php://input wrapper. Patched versions of PHPUnit use the php://stdin wrapper instead. An unauthenticated attacker could exploit this vulnerability by sending an HTTP POST request to a web server containing the vulnerable eval-stdin.php file, leading to arbitrary code execution.

Previous versions of PHPUnit contained the code injection vulnerability which, according to the Vulnbusters advisory page, was unknowingly patched in November 2016 in PHPUnit version 4.8.28 and version 5.6.3 to address issues with insulated tests using phpdbg.

In February 2018, an issue was filed on the Mailchimp project on Drupal from a user who was contacted by their hosting provider, indicating that the eval-stdin.php on their web server was malicious. A different user, who commented on the same issue in May 2018, also received the same feedback from their hosting provider. Separately, in February 2018, Kevin Beaumont (@GossiTheDog) found attackers were targeting a Drupal honeypot attempting to exploit CVE-2017-9841.

Outside of Drupal, CVE-2017-9841 has also been found in WordPress plugins, such as the Jekyll Exporter plugin, as well as MediaWiki and open source learning platform Moodle.

Proof of concept

A proof-of-concept (PoC) was originally published in the Vulnbusters advisory from June 2017.

Solution

As previously mentioned, CVE-2017-9841 was patched in PHPUnit back in November 2016. The vulnerability affected specific versions of PHPUnit, which are referenced in the table below.

Vulnerable PHPUnit Versions Fixed PHPUnit Versions
4.8.19 - 4.8.27 4.8.28 or later
5.0.10 - 5.6.2 5.6.3 or later

For the Mailchimp and Mailchimp E-Commerce modules, version 1.0.7 or below for the Mailchimp API for PHP is considered vulnerable. The Drupal Security team notes even if Drupal customers had previously installed these modules, there may still be artifacts left over from the installation on the web server. Vulnerable servers may have the eval-stdin.php. If the file exists and it references the php://input wrapper instead of the php://stdin wrapper, then the server is vulnerable to CVE-2017-9841.

CVE-2017-9841: Drupal Sites Exploited Using PHPUnit Vulnerability in Mailchimp Modules (PSA-2019-0904)

Identifying affected systems

A list of Tenable plugins to identify this vulnerability will appear here as they’re released.

Get more information

Join Tenable's Security Response Team on the Tenable Community.

Learn more about Tenable, the first Cyber Exposure platform for holistic management of your modern attack surface.

Get a free 60-day trial of Tenable.io Vulnerability Management.

Related Articles

Cybersecurity News You Can Use

Enter your email and never miss timely alerts and security guidance from the experts at Tenable.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose Your Subscription Option:

Buy Now

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose Your Subscription Option:

Buy Now

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose Your Subscription Option:

Buy Now

Try Tenable Web App Scanning

Enjoy full access to our latest web application scanning offering designed for modern applications as part of the Tenable One Exposure Management platform. Safely scan your entire online portfolio for vulnerabilities with a high degree of accuracy without heavy manual effort or disruption to critical web applications. Sign up now.

Your Tenable Web App Scanning trial also includes Tenable Vulnerability Management and Tenable Lumin.

Buy Tenable Web App Scanning

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

5 FQDNs

$3,578

Buy Now

Try Tenable Lumin

Visualize and explore your exposure management, track risk reduction over time and benchmark against your peers with Tenable Lumin.

Your Tenable Lumin trial also includes Tenable Vulnerability Management and Tenable Web App Scanning.

Buy Tenable Lumin

Contact a Sales Representative to see how Tenable Lumin can help you gain insight across your entire organization and manage cyber risk.

Try Tenable Nessus Professional Free

FREE FOR 7 DAYS

Tenable Nessus is the most comprehensive vulnerability scanner on the market today.

NEW - Tenable Nessus Expert
Now Available

Nessus Expert adds even more features, including external attack surface scanning, and the ability to add domains and scan cloud infrastructure. Click here to Try Nessus Expert.

Fill out the form below to continue with a Nessus Pro Trial.

Buy Tenable Nessus Professional

Tenable Nessus is the most comprehensive vulnerability scanner on the market today. Tenable Nessus Professional will help automate the vulnerability scanning process, save time in your compliance cycles and allow you to engage your IT team.

Buy a multi-year license and save. Add Advanced Support for access to phone, community and chat support 24 hours a day, 365 days a year.

Select Your License

Buy a multi-year license and save.

Add Support and Training

Try Tenable Nessus Expert Free

FREE FOR 7 DAYS

Built for the modern attack surface, Nessus Expert enables you to see more and protect your organization from vulnerabilities from IT to the cloud.

Already have Tenable Nessus Professional?
Upgrade to Nessus Expert free for 7 days.

Buy Tenable Nessus Expert

Built for the modern attack surface, Nessus Expert enables you to see more and protect your organization from vulnerabilities from IT to the cloud.

Select Your License

Buy a multi-year license and save more.

Add Support and Training