Security Bulletin

Microsoft Security Bulletin MS13-103 - Important

Vulnerability in ASP.NET SignalR Could Allow Elevation of Privilege (2905244)

Published: December 10, 2013

Version: 1.0

General Information

Executive Summary

This security update resolves a privately reported vulnerability in ASP.NET SignalR. The vulnerability could allow elevation of privilege if an attacker reflects specially crafted JavaScript back to the browser of a targeted user.

This security update is rated Important for ASP.NET SignalR versions 1.1.0, 1.1.1, 1.1.2, 1.1.3 and 2.0.0, and all supported editions of Microsoft Visual Studio Team Foundation Server 2013. For more information, see the subsection, Affected and Non-Affected Software, in this section.

The security update addresses the vulnerability by ensuring that ASP.NET SignalR properly encodes user input. For more information about the vulnerability, see the Frequently Asked Questions (FAQ) subsection for the specific vulnerability entry under the next section, Vulnerability Information.

Recommendation. 

For customers who are developing web applications that use ASP.NET SignalR:
Customers who are developing web applications that use ASP.NET SignalR functionality are encouraged to follow the update guidance in the Security UpdateDeployment section of this bulletin for detailed instructions on how to update ASP.NET SignalR in their environments.

For customers running installations of Microsoft Visual Studio Team Foundation Server 2013:
For customers who have automatic updating enabled and who are running Microsoft Visual Studio Team Foundation Server 2013, the update will be downloaded and installed automatically. Customers who have not enabled automatic updating need to check for updates and install this update manually. For information about specific configuration options in automatic updating, see Microsoft Knowledge Base Article 294871.

For administrators and enterprise installations, or end users who want to install this security update manually, Microsoft recommends that customers apply the update at the earliest opportunity using update management software, or by checking for updates using the Microsoft Update service.

See also the section, Detection and Deployment Tools and Guidance, later in this bulletin.

Knowledge Base Article

Knowledge Base Article 2905244
File information Yes
SHA1/SHA2 hashes Yes
Known issues None

Affected and Non-Affected Software

The following software has been tested to determine which versions or editions are affected. Other versions or editions are either past their support life cycle or are not affected. To determine the support life cycle for your software version or edition, see Microsoft Support Lifecycle.

Affected Software 

Developer Tools Maximum Security Impact Aggregate Severity Rating Updates Replaced
ASP.NET SignalR 1.1.x[1] \ (2903919) Elevation of Privilege Important None
ASP.NET SignalR 2.0.x[1] \ (2903919) Elevation of Privilege Important None
Microsoft Visual Studio Team Foundation Server 2013 \ (2903566) Elevation of Privilege Important None

[1]Applies to Windows servers that host web applications supporting ASP.NET SignalR functionality. The update, available for download only, updates versions 1.1.0, 1.1.1, 1.1.2, and 1.1.3 and version 2.0.0 to the latest supported versions (1.1.4 and 2.0.1 as of the date of this bulletin). See the Security Update Deployment section of this bulletin for more information.
** **

Non-Affected Software

Software and Operating System
ASP.NET SignalR 1.0.0
ASP.NET SignalR 1.0.1
Microsoft Visual Studio .NET 2003 Service Pack 1
Microsoft Visual Studio 2005 Service Pack 1
Microsoft Visual Studio Team Foundation Server 2005 Service Pack 1
Microsoft Visual Studio 2008 Service Pack 1
Microsoft Visual Studio Team Foundation Server 2008 Service Pack 1
Microsoft Visual Studio 2010 Service Pack 1
Microsoft Visual Studio Team Foundation Server 2010 Service Pack 1
Microsoft Visual Studio LightSwitch 2011
Microsoft Visual Studio 2012
Microsoft Visual Studio Team Foundation Server 2012

Update FAQ

What is ASP.NET SignalR? 
ASP.NET SignalR is a library for ASP.NET developers that simplifies the development of real-time web functionality. ASP.NET SignalR allows bi-directional communication between server and client via JavaScript, enabling servers to push content to connected clients instantly as it becomes available (push functionality). For more information about ASP.NET SignalR, see Learn About ASP.NET SignalR.

How do I determine which versions of ASP.NET SignalRare installed on my system? 
To determine the versions of ASP.NET SignalR that are deployed on your system, perform a search of the system hard drive for "SignalR". View the properties for any Microsoft.AspNet.SignalR.Core.dll files that are returned in the search to reveal their version numbers. Any 1.1.x versions earlier than version 1.1.4 are vulnerable and should be updated. Any 2.0.x versions earlier than version 2.0.1 are vulnerable and should be updated. Any 1.0.x versions found are not vulnerable.

How do I upgrade my version of ASP.NET SignalR?
Instances of ASP.NET SignalR that were installed with Visual Studio Team Foundation Server 2013 will be updated via Microsoft Update. However, other instances of ASP.NET SignalR residing on developer systems and web application servers, will need to be updated using processes defined in the Security Update Deployment Section of this bulletin.

Will this update upgrade my version of ASP.NET SignalR?  
No. The update will update the patch version installed on a system, but will not upgrade the major or minor version. As of the release of this bulletin, two major versions of ASP.NET SignalR are supported (versions 1.1.x and 2.0.x). The update will update any 1.1.x versions to 1.1.4 and any 2.0.x versions to 2.0.1.

I am using an older release of the software discussed in this security bulletin. What should I do? 
The affected software listed in this bulletin has been tested to determine which releases are affected. Other releases are past their support life cycle. For more information about the product lifecycle, see the Microsoft Support Lifecycle website.

It should be a priority for customers who have older releases of the software to migrate to supported releases to prevent potential exposure to vulnerabilities. To determine the support lifecycle for your software release, see Select a Product for Lifecycle Information. For more information about service packs for these software releases, see Service Pack Lifecycle Support Policy.

Customers who require custom support for older software must contact their Microsoft account team representative, their Technical Account Manager, or the appropriate Microsoft partner representative for custom support options. Customers without an Alliance, Premier, or Authorized Contract can contact their local Microsoft sales office. For contact information, see the Microsoft Worldwide Information website, select the country in the Contact Information list, and then click Go to see a list of telephone numbers. When you call, ask to speak with the local Premier Support sales manager. For more information, see the Microsoft Support Lifecycle Policy FAQ.

Vulnerability Information

Severity Ratings and Vulnerability Identifiers

The following severity ratings assume the potential maximum impact of the vulnerability. For information regarding the likelihood, within 30 days of this security bulletin's release, of the exploitability of the vulnerability in relation to its severity rating and security impact, please see the Exploitability Index in the December bulletin summary. For more information, see Microsoft Exploitability Index.

Affected Software SignalR XSS Vulnerability - CVE-2013-5042 Aggregate Severity Rating
Developer Tools
ASP.NET SignalR 1.1.x  (2903919) Important  Elevation of Privilege Important
ASP.NET SignalR 2.0.x  (2903919) Important  Elevation of Privilege Important
Microsoft Visual Studio Team Foundation Server 2013  (2903566) Important  Elevation of Privilege Important

SignalR XSS Vulnerability - CVE-2013-5042

An elevation of privilege vulnerability exists in ASP.NET SignalR that could allow an attacker access to resources in the context of the targeted user.

To view this vulnerability as a standard entry in the Common Vulnerabilities and Exposures list, see CVE-2013-5042.

Mitigating Factors

Microsoft has not identified any mitigating factors for this vulnerability.

Workarounds

Workaround refers to a setting or configuration change that does not correct the underlying vulnerability but would help block known attack vectors before you apply the update. Microsoft has tested the following workarounds and states in the discussion whether a workaround reduces functionality:

  • For Windows servers that host web applications using ASP.NET SignalR functionality, turning off the ASP.NET SignalR Forever Frame transport protocol provides temporary protection from the vulnerability.

    Disabling the ASP.NET SignalR Forever Frame transport protocol on the client and server sides is accomplished in code. Consult the following examples as guidance for disabling the protocol in your environment.

    Code example to disable the affected transport from the client side:

    // If using the default hub connection
    $.connection.hub.start({ transport: ["webSockets", "serverSentEvents", "longPolling"] });
    
    // If using a manually-created connection
    var connection = $.connection("https://sample.com/signalr");
    connection.start({ transport: ["webSockets", "serverSentEvents", "longPolling"] });
    

    Code example to disable the affected transport on the server side when using the default global dependency resolver:

    using Microsoft.AspNet.SignalR;
    using Microsoft.AspNet.SignalR.Transports;
    using Owin;
    namespace MyApplication
    {
        public static class Startup
        {
            public static void ConfigureSignalR(IAppBuilder app)
            {
                // If using the global dependency resolver
                TurnOfForeverFrame(GlobalHost.DependencyResolver);
                app.MapSignalR();
            }
            public static void TurnOfForeverFrame(IDependencyResolver resolver)
            {
                var transportManager = resolver.Resolve<itransportmanager>() as TransportManager;
                transportManager.Remove("foreverFrame");
            }
        }
    }
    
    
    Code example to disable the affected transport on the server side when using a custom dependency resolver:
    
    using Microsoft.AspNet.SignalR;
    using Microsoft.AspNet.SignalR.Transports;
    using Owin;
    namespace MyApplication
    {
        public static class Startup
        {
            public static void ConfigureSignalR(IAppBuilder app)
            {
                // If using a custom dependency resolver
                var resolver = GetCustomResolver();
                TurnOfForeverFrame(resolver);
                app.MapSignalR(new HubConfiguration
                {
                    Resolver = resolver
                });
            }
            private static IDependencyResolver GetCustomResolver()
            {
                return new DefaultDependencyResolver();
            }
            public static void TurnOfForeverFrame(IDependencyResolver resolver)
            {
                var transportManager = resolver.Resolve</itransportmanager><itransportmanager>() as TransportManager;
                transportManager.Remove("foreverFrame");
            }
        }
    }
    

    Impact of the workaround. After implementing the workaround Internet Explorer clients may exhibit slower communication speed to the SignalR application.

  • For systems with Microsoft Visual Studio Team Foundation Server 2013 installed, Microsoft has not identified any workarounds.

FAQ

What is the scope of the vulnerability?
This is an elevation of privilege vulnerability.

What causes the vulnerability?
The vulnerability is caused when ASP.NET SignalR improperly encodes user input.

What might an attacker use the vulnerability to do?
In a web-browsing scenario, an attacker could reflect specially crafted JavaScript back to the user's browser, which could allow the attacker to modify page content, conduct phishing, or perform actions on behalf of the targeted user.

How could an attacker exploit the vulnerability?
In an attack scenario, an attacker could introduce into the browser of a targeted user specially crafted content that contains malicious JavaScript designed to give the attacker access to resources that are available to the targeted user.

What systems are primarily at risk from the vulnerability?
In a web-browsing scenario, successful exploitation of this vulnerability requires that a user is logged on and visiting a website that is hosting ASP.NET SignalR. Therefore, any systems where web browsers are used frequently, such as workstations or terminal servers, are at the most risk from this vulnerability. Servers could be at more risk if administrators allow users to browse and read email on servers. However, best practices strongly discourage allowing this.

What does the update do?
The update addresses the vulnerability by ensuring that ASP.NET SignalR properly encodes user input.

When this security bulletin was issued, had this vulnerability been publicly disclosed?
No. Microsoft received information about this vulnerability through coordinated vulnerability disclosure.

When this security bulletin was issued, had Microsoft received any reports that this vulnerability was being exploited?
No. Microsoft had not received any information to indicate that this vulnerability had been publicly used to attack customers when this security bulletin was originally issued.

Update Information

Detection and Deployment Tools and Guidance

Several resources are available to help administrators deploy security updates. 

  • Microsoft Baseline Security Analyzer (MBSA) lets administrators scan local and remote systems for missing security updates and common security misconfigurations. 
  • Windows Server Update Services (WSUS), Systems Management Server (SMS), and System Center Configuration Manager help administrators distribute security updates. 
  • The Update Compatibility Evaluator components included with Application Compatibility Toolkit aid in streamlining the testing and validation of Windows updates against installed applications. 

For information about these and other tools that are available, see Security Tools for IT Pros

Security Update Deployment

Affected Software

For information about the specific security update for your affected software, click the appropriate link:

ASP.NET SignalR (all versions)

Several update options are available depending on your deployment scenario. Choose the best option for your scenario:

For developers of ASP.NET SignalR-enabled web applications

  • Option 1: Update your Visual Studio project packages using NuGet, recompile your application, and deploy

    1. Open your solution in Visual Studio.
    2. In Solution Explorer, right-click the References node and then click Manage NuGet Packages.
    3. Select the Updates tab. A list of packages with updates appears in the center pane.
    4. Select the Microsoft.AspNet.SignalR package and then click Update.
    5. Compile and deploy your web application.

    For more information about managing NuGet Packages using the NuGet dialog, see Managing NuGet Packages Using the Dialog.

  • Option 2: Update your Visual Studio project packages using the Package Manager Console UI, recompile your application, and deploy

    1. Open your solution in Visual Studio.
    2. Click the Tools menu, select Library Package Manager, and then click Package Manager Console.
    3. In the package manager window, enter Update-Package Microsoft.AspNet.SignalR.
    4. Compile and deploy your web application.

    For more information about using the Package Manager Console, see Using the Package Manager Console.

For system administrators who cannot recompile ASP.NET SignalR-enabled web applications

  • Update ASP.NET SignalR on administrator systems

    To protect servers prior to updating projects and redeploying web applications, install the update using the link provided in the table below. This should be considered an interim protection for IT administrators until deployed applications that use ASP.NET SignalR can be updated.

    Update file SignalR-KB2903919.msi
    Installation switches See Microsoft Knowledge Base Article 262841
    Update log file Not applicable
    Restart requirement System restart is not required; however, IIS will restart.
    Removal information Use Add or Remove Programs in Control Panel.
    File information See Microsoft Knowledge Base Article 2903919

Microsoft Visual Studio Team Foundation Server 2013 (all versions)

Reference Table

The following table contains the security update information for this software.

Security update file names For Microsoft Visual Studio Team Foundation Server 2013:\ TFS2013-KB2903566.exe
Installation switches See Microsoft Knowledge Base Article 262841
Update log file Not applicable
Restart requirement This update may require a restart if files are in use.
Removal information Use Add or Remove Programs in Control Panel.
File information See Microsoft Knowledge Base Article 2903566
Registry key verification For Microsoft Visual Studio Team Foundation Server 2013:\ HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\tfs\Servicing\12.0

Other Information

Microsoft Active Protections Program (MAPP)

To improve security protections for customers, Microsoft provides vulnerability information to major security software providers in advance of each monthly security update release. Security software providers can then use this vulnerability information to provide updated protections to customers via their security software or devices, such as antivirus, network-based intrusion detection systems, or host-based intrusion prevention systems. To determine whether active protections are available from security software providers, please go to the active protections websites provided by program partners, listed in Microsoft Active Protections Program (MAPP) Partners.

Support

How to obtain help and support for this security update

Disclaimer

The information provided in the Microsoft Knowledge Base is provided "as is" without warranty of any kind. Microsoft disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Microsoft Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Microsoft Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.

Revisions

  • V1.0 (December 10, 2013): Bulletin published.

Built at 2014-04-18T13:49:36Z-07:00