Trustwave Unveils New Offerings to Maximize Value of Microsoft Security Investments. Learn More

Trustwave Unveils New Offerings to Maximize Value of Microsoft Security Investments. 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
Offensive Security
Solutions to maximize your security ROI
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

XML External Entity (XXE) Execution Disabled in ModSecurity v2.7.3

On February 27, 2013, the ModSecurity project team was notified by security researchers from Positive Technologies that they had identified an XXE flaw in ModSecurity. Here is the CWE info for XXE -

8953_4344ceca-f32c-4296-bef4-f1cd6e33be05

Libxml2 XXE CVEs

The vulnerability lies within Libxml2 itself and was recently identified on public mail-list and assigned CVEs - http://seclists.org/oss-sec/2013/q1/391

Libxml2 in ModSecurity

ModSecurity inspects XML request bodies by leveraging the libxml2 parser. When ModSecurity is compiled with XML support, it can be activated for use by using the following example rule from the OWASP ModSecurity CRS -

#
# -- [[ Enable XML Body Parsing ]] -------------------------------------------------------
#
# The rules in this file will trigger the XML parser upon an XML request
#
# Initiate XML Processor in case of xml content-type
#
SecRule REQUEST_HEADERS:Content-Type "text/xml" \
"id:'900017', \
phase:1, \
t:none,t:lowercase, \
nolog, \
pass, \
chain"
SecRule REQBODY_PROCESSOR "!@streq XML" \
"ctl:requestBodyProcessor=XML"

With this rule activated, when ModSecurity receives a request with an XML Content-Type body, it would call up the libxml2 code to parse the data and populate the XML variable for use in any rules.

Libxml2 in other Projects

Other projects that rely upon the Libxml2 parser for analyzing XML data are most likely also effected. For instance, Positive Technologies also open a very similar bug report for Eclipse here. The bug report includes example attack/testing payloads as well.

Additionally, PHP also had to deal with this issue and they chose to have a configurable option called - libxml_disable_entity_loader.

ModSecurity v2.7.3

We chose to follow PHP's method of addressing this issue and we released ModSecurity v2.7.3 on March 29th that fixed the issue with addition of the SecXmlExternalEntity directive. This setting is Off by default but it allows the ModSecurity user to control XXE for the libxml2 parser. It is highly recommended that organizations using ModSecurity either upgrade to v2.7.3 and set SecXmlExternalEntity Off or disable the XML request body parser rule entirely.

Latest SpiderLabs Blogs

Clockwork Blue: Automating Security Defenses with SOAR and AI

It’s impractical to operate security operations alone, using manual human processes. Finding opportunities to automate SecOps is an underlying foundation of Zero Trust and an essential architecture...

Read More

Professional Services Sector Under Attack - Trustwave SpiderLabs Report 2024

Recent research by Trustwave SpiderLabs, detailed in their newly published report "2024 Professional Services Threat Landscape: Trustwave Threat Intelligence Briefing and Mitigation Strategies,"...

Read More

Atlas Oil: The Consequences of a Ransomware Attack

Overview Atlas Oil, a major player in the oil and fuel distribution industry, fell victim to a ransomware attack orchestrated by the Black Basta group. This attack not only compromised sensitive...

Read More