Trustwave ModSecurity up to 2.7.5 Chunk Extension apache2/modsecurity.c modsecurity_tx_init access control

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
5.9$0-$5k0.00

A vulnerability was found in Trustwave ModSecurity. It has been declared as critical. This vulnerability affects the function modsecurity_tx_init of the file apache2/modsecurity.c of the component Chunk Extension Handler. The manipulation with an unknown input leads to a access control vulnerability. The CWE definition for the vulnerability is CWE-264. As an impact it is known to affect confidentiality, and integrity. CVE summarizes:

apache2/modsecurity.c in ModSecurity before 2.7.6 allows remote attackers to bypass rules by using chunked transfer coding with a capitalized Chunked value in the Transfer-Encoding HTTP header.

The weakness was disclosed 03/31/2014 by Martin Holst Swende as Chunked HTTP transfer encoding as not defined posting (Blog). The advisory is available at martin.swende.se. The public release has been coordinated in cooperation with the vendor. This vulnerability was named CVE-2013-5705 since 09/05/2013. The attack can be initiated remotely. No form of authentication is required for a successful exploitation. Technical details and also a public exploit are known. This vulnerability is assigned to T1068 by the MITRE ATT&CK project. Responsible for the vulnerability is the following code:

msr->reqbody_chunked = 0;
   /* There's no C-L, but is chunked encoding used? */
   if ((transfer_encoding != NULL)&&(strstr(transfer_encoding, "chunked") != NULL)) {
      msr->reqbody_chunked = 1;

A public exploit has been developed by Martin Holst Swende in HTTP GET Request and been published immediately after the advisory. It is possible to download the exploit at martin.swende.se. It is declared as proof-of-concept. The vulnerability was handled as a non-public zero-day exploit for at least 4 days. During that time the estimated underground price was around $0-$5k. The vulnerability scanner Nessus provides a plugin with the ID 73962 (ModSecurity < 2.7.6 Chunked Header Filter Bypass), which helps to determine the existence of the flaw in a target environment. It is assigned to the family Firewalls. The commercial vulnerability scanner Qualys is able to test this issue with plugin 167107 (OpenSuSE Security Update for Apache2 (openSUSE-SU-2014:0969-1)). The advisory illustrates:

So, obviously I’m not discovering a new attack here, mod security already knows how to handle chunked requests. Nice job! However, I couldn’t just stop there.

Upgrading eliminates this vulnerability. Applying the patch 2.7.6 is able to eliminate this problem. The bugfix is ready for download at github.com. The best possible mitigation is suggested to be upgrading to the latest version. A possible mitigation has been published even before and not after the disclosure of the vulnerability. Furthermore it is possible to detect and prevent this kind of attack with TippingPoint and the filter 16813.

The vulnerability is also documented in the databases at X-Force (92236) and Tenable (73962). The entry 12741 is pretty similar.

Productinfo

Vendor

Name

Version

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB CVSS-B Score: 🔍
VulDB CVSS-BT Score: 🔍
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 6.5
VulDB Meta Temp Score: 5.9

VulDB Base Score: 6.5
VulDB Temp Score: 5.9
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
unlockunlockunlockunlockunlockunlock
unlockunlockunlockunlockunlockunlock
unlockunlockunlockunlockunlockunlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

NVD Base Score: 🔍

Exploitinginfo

Class: Access control
CWE: CWE-264
CAPEC: 🔍
ATT&CK: 🔍

Local: No
Remote: Yes

Availability: 🔍
Access: Public
Status: Proof-of-Concept
Author: Martin Holst Swende
Programming Language: 🔍
Download: 🔍

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-Dayunlockunlockunlockunlock
Todayunlockunlockunlockunlock

Nessus ID: 73962
Nessus Name: ModSecurity < 2.7.6 Chunked Header Filter Bypass
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍

OpenVAS ID: 867691
OpenVAS Name: Fedora Update for mod_security FEDORA-2014-4633
OpenVAS File: 🔍
OpenVAS Family: 🔍

Qualys ID: 🔍
Qualys Name: 🔍

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

Reaction Time: 🔍
0-Day Time: 🔍
Exploit Delay Time: 🔍

Patch: 2.7.6
TippingPoint: 🔍

McAfee IPS: 🔍
McAfee IPS Version: 🔍

Fortigate IPS: 🔍

Timelineinfo

09/05/2013 🔍
09/05/2013 +0 days 🔍
09/05/2013 +0 days 🔍
09/09/2013 +4 days 🔍
03/31/2014 +203 days 🔍
03/31/2014 +0 days 🔍
03/31/2014 +0 days 🔍
03/31/2014 +0 days 🔍
04/01/2014 +1 days 🔍
04/01/2014 +0 days 🔍
04/15/2014 +14 days 🔍
04/20/2014 +5 days 🔍
05/12/2014 +22 days 🔍
06/16/2021 +2592 days 🔍

Sourcesinfo

Advisory: Chunked HTTP transfer encoding
Researcher: Martin Holst Swende
Status: Not defined
Confirmation: 🔍
Coordinated: 🔍

CVE: CVE-2013-5705 (🔍)
OVAL: 🔍

X-Force: 92236
Vulnerability Center: 44161 - ModSecurity Before 2.7.6 Remote Security Bypass via a HTTP Header, Medium
SecurityFocus: 66552 - ModSecurity 'modsecurity.c' Security Bypass Vulnerability
Secunia: 57444 - ModSecurity HTTP Requests Chunked Encoding Security Bypass Vulnerability, Moderately Critical

scip Labs: https://www.scip.ch/en/?labs.20130913
See also: 🔍

Entryinfo

Created: 04/01/2014 16:27
Updated: 06/16/2021 13:37
Changes: 04/01/2014 16:27 (98), 05/25/2017 19:10 (7), 06/16/2021 13:37 (3)
Complete: 🔍

Discussion

No comments yet. Languages: en.

Please log in to comment.

Want to stay up to date on a daily basis?

Enable the mail alert feature now!