CWE-16
OWASP 2013-A5
OWASP 2017-A6

ASP.NET ViewStateUserKey Is Not Set

Severity:
Low
Summary

Invicti detected that ASP.NET ViewStateUserKey is not set inside of the ASP.NET application

Impact

When the ASP.NET ViewStateUserKey is not set, that makes it easier for an attacker to perform CSRF attacks. ViewStateUserKey prevents the attack by allowing you to assign an identifier to the view-state variable for individual users so that attackers cannot use the variable to generate an attack.

Remediation
Required Skills for Successful Exploitation
Actions To Take

Please add the code below to all of your pages.

using System;

using System.Web.UI;

class ExampleClass : Page

{

protected override void OnInit (EventArgs e)

{

// Assuming that your page makes use of ASP.NET session state and the SessionID is stable.

ViewStateUserKey = Session.SessionID;

}

}

Classifications
Vulnerability Index

You can search and find all vulnerabilities

Select Vulnerability
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Featured resources

Blog

Strengthening enterprise application security: Invicti acquires Kondukto

Blog

Modern AppSec KPIs: Moving from scan counts to real risk reduction

Blog

Friends don’t let friends shift left: Shift smarter with DAST-first AppSec

Blog

Vibe talking: Dan Murphy on the promises, pitfalls, and insecurities of vibe coding

Blog

Strengthening enterprise application security: Invicti acquires Kondukto

Blog

Modern AppSec KPIs: Moving from scan counts to real risk reduction

Blog

Friends don’t let friends shift left: Shift smarter with DAST-first AppSec

Blog

Vibe talking: Dan Murphy on the promises, pitfalls, and insecurities of vibe coding

Build your resistance to threats. And save hundreds of hours each month.