Trustwave SpiderLabs Uncovers Ov3r_Stealer Malware Spread via Phishing and Facebook Advertising. Learn More

Trustwave SpiderLabs Uncovers Ov3r_Stealer Malware Spread via Phishing and Facebook Advertising. Learn More

Services
Capture
Managed Detection & Response

Eliminate active threats with 24/7 threat detection, investigation, and response.

twi-managed-portal-color
Co-Managed SOC (SIEM)

Maximize your SIEM investment, stop alert fatigue, and enhance your team with hybrid security operations support.

twi-briefcase-color-svg
Advisory & Diagnostics

Advance your cybersecurity program and get expert guidance where you need it most.

tw-laptop-data
Penetration Testing

Test your physical locations and IT infrastructure to shore up weaknesses before exploitation.

twi-database-color-svg
Database Security

Prevent unauthorized access and exceed compliance requirements.

twi-email-color-svg
Email Security

Stop email threats others miss and secure your organization against the #1 ransomware attack vector.

tw-officer
Digital Forensics & Incident Response

Prepare for the inevitable with 24/7 global breach response in-region and available on-site.

tw-network
Firewall & Technology Management

Mitigate risk of a cyberattack with 24/7 incident and health monitoring and the latest threat intelligence.

Solutions
BY TOPIC
Microsoft Exchange Server Attacks
Stay protected against emerging threats
Rapidly Secure New Environments
Security for rapid response situations
Securing the Cloud
Safely navigate and stay protected
Securing the IoT Landscape
Test, monitor and secure network objects
Why Trustwave
About Us
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Security Operations Platform
Trustwave Security Colony
Partners
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
Trustwave PartnerOne Program
Join forces with Trustwave to protect against the most advance cybersecurity threats
SpiderLabs Blog

Drupal Cache Poisoning SA-CORE-2018-005

(Analysis by Lena Frid, Bar Menachem and Victor Hora)

Shortly after the recent Drupalgeddon vulnerabilities hit the popular content management system, new vulnerabilities were discovered.

As reported by PortSwigger Web Security, Drupal versions 8.x are vulnerable to cache poisoning, by abusing X-Original-URL and X-Rewrite-URL headers to override the requested path. In addition, an unsecure implementation of the URL-override code exposes the system to an Open Redirect vulnerability, abusing the "destination" parameter. In case the vulnerable website is using an external cache, a combination of those two vulnerabilities can be exploited and lead to Nested cache poisoning. For detailed explanation please refer to the source blogpost.

According to Drupal, the cache poisoning vulnerabilities were found in Symphony HttpFoundation component. Symphony is a third-party library which is integrated in Drupal Core. All users that are using version 8.x are urged to upgrade to 8.5.6, as versions prior to 8.5.x series will not receive security coverage. Drupal published its own security advisory named SA-CORE-2018-005 while Symphony coordinated the disclosure with CVE-2018-14773).

Cache poisoning vulnerability:

A website is vulnerable to cache poisoning, if it allows an attacker to send malicious request, resulting with corrupted response. The harmful response is then cached and served to other users.

A user can set the X-Original-URL/ X-Rewrite-URL headers to bypass restricted access or serve unintended pages. For example:

GET /admin HTTP/1.1

Host: target.com

 

HTTP/1.1 403 Forbidden

...

Access is denied

GET /anything HTTP/1.1

Host: target.com

X-Original-URL: /admin

HTTP/1.1 200 OK

...

Please log in

Open redirect vulnerability:

A website is vulnerable to Open Redirect when parameter values in an HTTP GET request allows redirection to a new website without any validation of the target of redirect. For more details please refer to SpiderLabs blogpost.

PoC:

Authenticated user can send an HTTP GET request abusing the "destination" parameter as open redirect to the attacker's website.

GET //?destination=https://attacker.com\@origin.com/ HTTP/1.1
 Host: origin.com
 As a result, the user is redirected to the requested URL:

HTTP/1.1 302 Found
 Location: https://attacker.com\@origin.com/

 

The SpiderLabs WAF Research team released a set of rules to address the described vulnerabilities as part of the Commercial Rules package:

Sample audit log output of the updated ModSecurity rules - Drupal 8.x Cache poisoning CVE-2018-14773:

Sample audit log output of the updated ModSecurity rules - Drupal Open Redirect:

Latest SpiderLabs Blogs

Hunting For Integer Overflows In Web Servers

Allow me to set the scene and start proceedings off with a definition of an integer overflow, according to Wikipedia:

Read More

Welcome to Adventures in Cybersecurity: The Defender Series

I’m happy to say I’m done chasing Microsoft certifications (AZ104/AZ500/SC100), and as a result, I’ve had the time to put some effort into a blog series that hopefully will entertain and inform you...

Read More

Trustwave SpiderLabs: Insights and Solutions to Defend Educational Institutions Against Cyber Threats

Security teams responsible for defending educational institutions at higher education and primary school levels often find themselves facing harsh lessons from threat actors who exploit the numerous...

Read More