RSS Amplifier

OJ's Perspective · Nov 29, 2012

XSS Flaws via MVC Model Binding and Request.QueryString Inconsistencies

0
Sign in to vote or save

This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.

Forgive the title of the post, it was hard coming up with something succinct that captured the purpose of the post. This was inspired by a recent experience with a client who had this exact problem with one of their production systems. TL;DR Never use Request.QueryString to access parameters in your views, even when you’re sure your actions have validated them. You may open your application…

Forgive the title of the post, it was hard coming up with something succinct that captured the purpose of the post. This was inspired by a recent experience with a client who had this exact problem with one of their production systems.

TL;DR

Never use Request.QueryString to access parameters in your views, even when you’re sure your actions have validated them. You may open your application up to XSS attacks. Always, always use data that is passed to your views via the Model or the ViewData dictionary. Under no circumstances should you trust data coming in from the web, that includes query string parameters.

Read on /posts/xss-flaws-via-mvc-model-binding-and-request.querystring-inconsistencies/

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.