Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1086561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:49:44+00:00 2026-05-16T22:49:44+00:00

I’ve just read on the net about a newly discovered security vulnerability in ASP.NET.

  • 0

I’ve just read on the net about a newly discovered security vulnerability in ASP.NET. You can read the details here.

The problem lies in the way that
ASP.NET implements the AES encryption
algorithm to protect the integrity of
the cookies these applications
generate to store information during
user sessions.

This is a bit vague, but here is a more frightening part:

The first stage of the attack takes a
few thousand requests, but once it
succeeds and the attacker gets the
secret keys, it’s totally stealthy.The
cryptographic knowledge required is
very basic.

All in all, I’m not familiar enough with the security/cryptograpy subject to know if this is really that serious.

So, should all ASP.NET developers fear this technique that can own any ASP.NET website in seconds or what?

How does this issue affect the average ASP.NET developer? Does it affect us at all?
In real life, what are the consequences of this vulnerability? And, finally: is there some workaround that prevents this vulnerability?

Thanks for your answers!


EDIT: Let me summarize the responses I got

So, this is basically a “padding oracle” type of attack. @Sri provided a great explanation about what does this type of attack mean. Here is a shocking video about the issue!

About the seriousness of this vulnerability: Yes, it is indeed serious. It lets the attacker to get to know the machine key of an application. Thus, he can do some very unwanted things.

  • In posession of the app’s machine key, the attacker can decrypt authentication cookies.
  • Even worse than that, he can generate authentication cookies with the name of any user. Thus, he can appear as anyone on the site. The application is unable to differentiate between you or the hacker who generated an authentication cookie with your name for himself.
  • It also lets him to decrypt (and also generate) session cookies, although this is not as dangerous as the previous one.
  • Not so serious: He can decrypt the encrypted ViewState of pages. (If you use ViewState to store confidental data, you shouldn’t do this anyways!)
  • Quite unexpected: With the knowledge of the machine key, the attacker can download any arbitrary file from your web application, even those that normally can’t be downloaded! (Including Web.Config, etc.)

Here is a bunch of good practices I got that don’t solve the issue but help improve the general security of a web application.

  • You can encrypt sensitive data with Protected Configuration
  • Use HTTP Only cookies
  • Prevent DoS attacks

Now, let’s focus on this issue.

  • Scott Guthrie published an entry about it on his blog
  • ScottGu’s FAQ blog post about the vulnerability
  • ScottGu’s update on the vulnerability
  • Microsoft has a security advisory about it
  • Understanding the vulnerability
  • Additional information about the vulnerability

The solution

  • Enable customErrors and make a single error page to which all errors are redirected. Yes, even 404s. (ScottGu said that differentiating between 404s and 500s are essential for this attack.) Also, into your Application_Error or Error.aspx put some code that makes a random delay. (Generate a random number, and use Thread.Sleep to sleep for that long.) This will make it impossible for the attacker to decide what exactly happened on your server.
  • Some people recommended switching back to 3DES. In theory, if you don’t use AES, you don’t encounter the security weakness in the AES implementation. As it turns out, this is not recommended at all.

Some other thoughts

  • Seems that not everyone thinks the workaround is good enough.

Thanks to everyone who answered my question. I learned a lot about not only this issue, but web security in general. I marked @Mikael’s answer as accepted, but the other answers are also very useful.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T22:49:45+00:00Added an answer on May 16, 2026 at 10:49 pm

    What should I do to protect myself?

    [Update 2010-09-29]

    Microsoft security bulletin

    KB Article with reference to the fix

    ScottGu has links for the downloads

    [Update 2010-09-25]

    While we are waiting for the fix, yesterday ScottGu postet an update on how to add an extra step to protect your sites with a custom URLScan rule.


    Basically make sure you provide a custom error page so that an attacker is not exposed to internal .Net errors, which you always should anyways in release/production mode.

    Additionally add a random time sleep in the error page to prevent the attacker from timing the responses for added attack information.

    In web.config

    <configuration>
     <location allowOverride="false">
       <system.web>
         <customErrors mode="On" defaultRedirect="~/error.html" />
       </system.web>
     </location>
    </configuration>
    

    This will redirect any error to a custom page returned with a 200 status code. This way an attacker cannot look at the error code or error information for information needed for further attacks.

    It is also safe to set customErrors mode="RemoteOnly", as this will redirect “real” clients. Only browsing from localhost will show internal .Net errors.

    The important part is to make sure that all errors are configured to return the same error page. This requires you to explicitly set the defaultRedirect attribute on the <customErrors> section and ensure that no per-status codes are set.

    What’s at stake?

    If an attacker manage to use the mentioned exploit, he/she can download internal files from within your web application. Typically web.config is a target and may contain sensitive information like login information in a database connection string, or even link to an automouted sql-express database which you don’t want someone to get hold of. But if you are following best practice you use Protected Configuration to encrypt all sensitive data in your web.config.

    Links to references

    Read Microsoft’s official comment about the vulnerability at http://www.microsoft.com/technet/security/advisory/2416728.mspx. Specifically the “Workaround” part for implementation details on this issue.

    Also some information on ScottGu’s blog, including a script to find vulnerable ASP.Net apps on your web server.

    For an explanation on “Understanding Padding Oracle Attacks”, read @sri’s answer.


    Comments to the article:

    The attack that Rizzo and Duong have implemented against ASP.NET apps requires that the crypto
    implementation on the Web site have an oracle that, when sent ciphertext, will not only decrypt the text
    but give the sender a message about whether the padding in the ciphertext is valid.

    If the padding is invalid, the error message that the sender gets will give him some information about the way that the site’s decryption process works.

    In order for the attack to work the following must be true:

    • Your application must give an error message about the padding being invalid.
    • Someone must tamper with your encrypted cookies or viewstate

    So, if you return human readable error messages in your app like “Something went wrong, please try again” then you should be pretty safe. Reading a bit on the comments on the article also gives valuable information.

    • Store a session id in the crypted cookie
    • Store the real data in session state (persisted in a db)
    • Add a random wait when user information is wrong before returning the error, so you can’t time it

    That way a hijacked cookie can only be used to retrieve a session which most likely is no longer present or invalidated.

    It will be interesting to see what is actually presented at the Ekoparty conference, but right now I’m not too worried about this vulnerability.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
I'm looking for suggestions for debugging... If you view this site in Firefox or
I've got a string that has curly quotes in it. I'd like to replace
I want use html5's new tag to play a wav file (currently only supported
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a JSP page retrieving data and when single or double quotes are
Seemingly simple, but I cannot find anything relevant on the web. What is the
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.