Is my logout functionality broke in my C# MVC application?

Long Wang 21 Reputation points
2020-09-08T11:42:38.743+00:00

Hi there

So I have an open bug bounty program and a member has noticed what you can do with my application is:

  1. Log into the application
  2. Using Chrome Cookie addon, copy the cookies
  3. Clear the cookies
  4. Logout of the application
  5. Now paste the Cookies copied using the addon again
  6. Navigate to the Manage/Account part
  7. ..and voila you are back in the application!!

I'm not a security expert but surely once logout is called we shouldn't be able to do this. This application was created using the standard project you get from Microsoft with the builtin features like "Account" "Manage" etc.

I have an expiry on the Cookie now set to 5mins so this helps but stills seems like you shouldn't be able to do this unless I've misunderstood.

The logout function is fairly simple:

// POST: /Account/LogOff

[Authorize]

public ActionResult LogOut()
{
AuthenticationManager.SignOut(DefaultAuthenticationTypes.ApplicationCookie);
return RedirectToAction("Index", "Home");
}

Other details

C# MVC
Visual Studio 2019
.Net 4.7.2

The site is live, just a heads-up, its 18+ and not suitable for work.

Anyone able to explain if this is a bug or my lack of understanding, thanks in advance :)

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,827 questions
0 comments No comments
{count} votes

Accepted answer
  1. Leon Laude 85,716 Reputation points
    2020-09-08T12:25:37.747+00:00

    Hi,

    C# and MVC are currently not supported in the Q&A forums, the supported products are listed over here https://video2.skills-academy.com/en-us/answers/products (more to be added later on).

    You can ask the experts in the dedicated forum over here:

    C# forum
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=csharpgeneral

    MVC forum
    https://forums.asp.net/1146.aspx/

    ----------

    (If the reply was helpful please don't forget to upvote or accept as answer, thank you)

    Best regards,
    Leon


0 additional answers

Sort by: Most helpful