RSS 2.0
 Thursday, October 07, 2004

Microsoft is currently investigating a reported vulnerability in Microsoft ASP.NET. An attacker can send specially crafted requests to the server and view secured content without providing the proper credentials. This reported vulnerability exists in ASP.NET and does not affect ASP.

Read about the vulernability here and about the underlying issue here (KB 887459).

Follow-Up: The ASP.NET Team has confirmed that all versions of ASP.NET on all operating systems may be susceptible to this potential exploit. They strongly recommend you apply the following code to the Global.asax for each of your applications.

Global.asax code sample (Visual Basic .NET)

Sub Application_BeginRequest(Sender as Object, E as EventArgs)
  If (Request.Path.IndexOf(chr(92)) >= 0 OR _
    System.IO.Path.GetFullPath(Request.PhysicalPath) <> Request.PhysicalPath) Then
    Throw New HttpException(404, "Not Found")
  End If
End Sub

Global.asax code sample (C#)

void Application_BeginRequest(object source, EventArgs e) {
  if (Request.Path.IndexOf('\\') >= 0 ||
    System.IO.Path.GetFullPath(Request.PhysicalPath) != Request.PhysicalPath) {
    throw new HttpException(404, "not found");
  }
}

Thanks to Jim Blizzard (Sr. .NET Developer Evangelist) for this!

Thursday, October 07, 2004 1:33:39 PM (Mountain Daylight Time, UTC-06:00)  #    Comments [0] -

Archive
<January 2009>
SunMonTueWedThuFriSat
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2009
Richard Hundhausen
Sign In
Statistics
Total Posts: 698
This Year: 0
This Month: 0
This Week: 0
Comments: 491
Themes
Pick a theme:
All Content © 2009, Richard Hundhausen
DasBlog theme 'Business' created by Christoph De Baene (delarou)