Insecure service configuration - BREACH Attack
Description
The site meets the conditions that make it potentially vulnerable to BREACH attacks:
- Uses HTTP gzip compression.
- The information entered by the user is reflected on the site.
- It stores secrets (session tokens or anti-CSRF).
Impact
Allow to obtain privileged information (such as session token) due to the compression features with the gzip format. Additional information can be found at http://breachattack.com/
Recommendation
Securely configure the vulnerable service so that it can only be accessed by authorized users.
Threat
Anonymous attacker in adjacent network executing a man-in-the-middle attack.
Expected Remediation Time
⌚ 30 minutes.
Score
Default score using CVSS 3.1. It may change depending on the context of the vulnerability.
Base
- Attack vector: A
- Attack complexity: H
- Privileges required: N
- User interaction: R
- Scope: U
- Confidentiality: L
- Integrity: N
- Availability: N
Temporal
- Exploit code madurity: U
- Remediation level: W
- Report confidence: R
Result
- Vector string: CVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N/E:U/RL:W/RC:R
- Score:
- Base: 2.6
- Temporal: 2.3
- Severity:
- Base: Low
- Temporal: Low
Code Examples
Compliant code
There is a secure configuration of the content-encoding header in the http responses
GET HTTP/1.1
Host: hostname
User-Agent: Mozilla/5.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
content-encoding: compress
Non compliant code
The http responses of the application use the g-zip content-encoding
GET HTTP/1.1
Host: hostname
User-Agent: Mozilla/5.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
content-encoding: gzip
Requirements
Search for vulnerabilities in your apps for free with our automated security testing! Start your 21-day free trial and discover the benefits of our Continuous Hacking Machine Plan. If you prefer a full service that includes the expertise of our ethical hackers, don't hesitate to contact us for our Continuous Hacking Squad Plan.