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

Citrix ShareFile Reflected XSS on Login Page

Medium

Synopsis

A security-related issue with Citrix ShareFile login pages has been discovered. The issue is a reflected cross-site scripting attack which could allow a malicious actor to steal login credentials, tokens, execute code in the context of a victim's browser, or perform a variety of other malicious actions.

Citrix has elected not to publish information regarding this issue or provide notice to customers.

This issue can be triggered by visiting any of the login pages on a ShareFile domain:
  - https://<ShareFile Customer Prefix>.sharefile.com/Authentication/Login
  - https://<ShareFile Customer Prefix>.sharefile.com/Authentication/StartLogin
  - https://<ShareFile Customer Prefix>.sharefile.com/login
  - https://<ShareFile Customer Prefix>.sharefile.com/oauth/authorize
  - And potentially others.

When a request for the login page is sent, some processing appears to be done server-side to prepare responses containing client-side javascript. In particular, request parameters are inserted into the "oAuthViewModel" variable in an unsafe manner. For example, a standard request to the login page produces a script within the response containing the following:

-----
Requested URL: https://tenable.sharefile.com
Redirected URL: https://tenable.sharefile.com/oauth/authorize?client_id=S---REDACTED---y&scope=&response_type=code&redirect_uri=https%3A%2F%2Fauth.sharefile.io%2Fsignin-sharefile&state=C---REDACTED---&subdomain=tenable
-----
<script nonce="qKbH---REDACTED---6GLZ6A==">
    oAuthViewModel = {"ApiUrl":"https://tenable.sharefile.com/sf/v3/","OAuthUrl":"https://tenable.sharefile.com/oauth/oauthapi.aspx","CachePath":"/cache/---REDACTED---/","ErrorCorrelationId":"---REDACTED---","Theme":{"Name":"onecitrix"},"PageWidth":"device-width","FixViewport":false,"ToolLinkText":"Citrix Systems, Inc. WCS Authentication","ToolLinkNavigateUrl":"http://https://www.sharefile.com","ClientInfoVisible":false,"WebflowSettings":{"ClientId":"S---REDACTED---y","State":"C---REDACTED---_","RedirectUri":"https://auth.sharefile.io/signin-sharefile","SamlNoIframe":false,"ResponseType":"code","Hash":"","Username":"","Email":null,"SubDomain":"tenable","RequireV3":false,"Animations":false,"BaseUrl":"tenable.sharefile.com","CompanyName":"ShareFile","Capabilities":[""],"ResetId":"","Action":null,"AutoRedirect":false,"SSOInfo":{"Info":[],"AppControlPlane":"sharefile.com","ApiControlPlane":"sf-api.com","IsComponentSpaceEnabled":false,"odata.metadata":"https://tenable.sf-api.com/sf/v3/$metadata#SSOInfo/ShareFile.Api.Models.SSOInfo@Element","odata.type":"ShareFile.Api.Models.SSOInfo","Id":null,"url":"https://tenable.sf-api.com/sf/v3/SSOInfo"},"AppCode":"SFIdentity","LogoUrl":null,"LogoBackgroundColor":null,"BackdropColor":null,"LoginPageText":null,"HeaderBackgroundUrl":null,"HeaderBackgroundColor":null,"LoginPageBackgroundColor":null,"LoginPageBackgroundImageUrl":null,"LoginPageSSOSignInTitle":null,"LoginPageShareFileSignInTitle":null,"FavIconUrl":null,"DeviceIdSupported":false,"DeviceId":null},"IsWebAppClient":true,"Title":"ShareFile Login","MarketingSiteMetaTagDescription":null,"IsSecureSubdomain":false,"IsProductionAppDomain":true,"ActivationToken":"","PromptLoginAfterActivation":false,"UserTokenType":null,"UserToken":null,"UserHint":"","LoginPageType":0,"WebpopLoginPageType":0,"NoJavascriptUrl":"/oauth/oauthwebflow_invalid.aspx?error=NoJavaScript","ErrorMessage":null, ...};
</script>
-----

In the above, the parameters included in the redirected request URL are inserted into the snippet of javascript. These parameters can be manipulated in order to insert unsafe elements into the page, which can lead to cross-site scripting, html injection, redirection, etc. In order to exploit this issue, a tag to prematurely close the "<script>" containing the "oAuthViewModel" needs to be included, which then allows for further injection.

As a proof of concept, if a user were somehow tricked into visiting the following URL, they would be redirected to "https://tenable.com". An attacker could replace this redirection with a mock login page for ShareFile or some other seemingly innocuous service. The proof of concept below uses the "a" parameter as the injection point, though it appears that all potential request variables, as well as other variables inserted into the oAuthViewModel variable are affected.

Proof of concept:

-----
https://tenable.sharefile.com/login?cmd=route&id=/&a=</script><meta http-equiv=refresh content='0; URL=https://tenable.com' />
-----

Solution

Citrix has implemented a solution server-side. No further action is required by end-users or customers.

Disclosure Timeline

June 19, 2023 - Tenable discloses issue to vendor.
June 26, 2023 - Tenable requests acknowledgement.
June 26, 2023 - Vendor states acknowledgement was sent on June 21. Requests confirmation of receipt.
June 27, 2023 - Vendor restates the above. Tenable confirms receipt - email filtered on our end by mistake.
July 4, 2023 - Vendor provides status update and requests clarification.
July 6, 2023 - Tenable responds.
August 15, 2023 - Vendor provides status update.
August 25, 2023 - Vendor notifies Tenable that issue is patched.
August 28, 2023 - Tenable notifies vendor of advisory publication.

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-2023-29
Credit:
Jimi Sebree
CVSSv3 Base / Temporal Score:
6.3 / 5.9
CVSSv3 Vector:
AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
Affected Products:
Citrix ShareFile Cloud Services
Risk Factor:
Medium

Advisory Timeline

August 28, 2023 - Initial release.