Arbitrary File Reading leads to RCE in the Pulse Secure SSL VPN on the https://████
A Pulse Secure SSL VPN instance was vulnerable to a pre-authentication arbitrary file read, allowing an attacker to read files such as the system password file. Because the product stored credentials in cleartext, an attacker could read them, log in to the VPN, and then use a post-authentication command injection to run code as root.
- Triaged in 5 days
- Fixed in 2 months
- Paid in 6 days
- Disclosed after 22 months
##Description Hello. Some time ago, researcher Orange Tsai from DEVCORE team had a talk on Defcon/BlackHat regarding Pulse Secure SSL VPN vulnerabilities fixed on 2019/4/25: CVE-2019-11510 - Pre-auth Arbitrary File Reading CVE-2019-11542 - Post-auth Stack Buffer Overflow CVE-2019-11539 - Post-auth Command Injection CVE-2019-11538 - Post-auth Arbitrary File Reading CVE-2019-11508 - Post-auth Arbitrary File Writing CVE-2019-11540 - Post-auth Session Hijacking
Link to the slides: https://i.blackhat.com/USA-19/Wednesday/us-19-Tsai-Infiltrating-Corporate-Intranet-Like-NSA.pdf
I discovered that https://██████████ instance is vulnerable to described vulnerabilities.
##POC
Reading /etc/passwd via CVE-2019-11510:
curl -i -k --path-as-is https://██████████/dana-na/../dana/html5acc/guacamole/../../../../../../etc/passwd?/dana/html5acc/guacamole/
███████
█████████
██████████
████
█████
██████
███████
████████
███████
The RCE can be achieved with this chain:
- Pulse Secure stores credentials in the cleartext.
- Attacker reads credentials and authorizes on VPN
- Attacker exploits CVE-2019-11539 - Post-auth Command Injection achieving RCE as root.
##Suggested fix Update the Pulse Secure SSL VPN software.
Impact
Remote code execution as root (by reading plaintext credentials and then exploiting CVE-2019-11539 - Post-auth Command Injection) and accessing intranet behind VPN. You can see here example report to Twitter by Orange Tsai: https://hackerone.com/reports/591295
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 a path traversal in the Pulse Secure web component allowed unauthenticated file reads, and the product stored credentials in cleartext, enabling a chain to authenticated command injection.
Impact
An attacker could read cleartext credentials, log in to the VPN, and achieve remote code execution as root, gaining access to the intranet behind the VPN.
What the attacker needed
Network access to the VPN web interface; no account needed for the file read
The fix
The Pulse Secure SSL VPN software should be updated to a version that addresses these vulnerabilities.
How it was found
- Send a crafted request to the VPN's web path that traverses directories to read a system file.
- Read the stored cleartext credentials from the VPN.
- Log in to the VPN using the stolen credentials.
- Exploit the post-authentication command injection to run commands as root.
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.
A VPN is a service that lets staff connect to a private network from outside. This one had a flaw that let anyone read files on the server without logging in, and it also kept user passwords in a readable form. By reading those passwords, an attacker could log in and then use a second flaw to run their own commands on the machine.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.