Request Validation flaw

Posted Wednesday, November 12, 2003 6:44 PM by G Andrew Duthie

I've long been a big proponent of the new Request Validation feature of ASP.NET v1.1 as a first level of defense against cross-site scripting attacks on your web applications, and have advocated leaving this feature enabled (it's on by default) unless you explicitly provide filtering and/or HTML encoding of all input to your application.

Well, a flaw has been reported in the implementation of this feature, such that it can be bypassed by specially malformed tags. The report was brought to my attention by a post from Kirk Allen Evans, who saw it on a Developmentor list. Since I've been a vocal advocate of the use of this feature, I thought it important to note the flaw.

One of the things that this highlights is that RequestValidation should only be considered (as I mention above) a first line of defense, not a complete security solution. As Scott Guthrie and others have consistently recommended, you should always HTML encode any and all text input that you accept from users that will (or may) be stored and/or displayed later. You should also consider using regular expressions (in conjunction with the RegularExpressionValidator control) to limit input to solely those characters or character sequences that are appropriate for any given input field. Taking such a multilevel approach to processing input can help protect you from a flaw in any single input filtering technique.

A fix for this flaw is available, and was made available as part of the ASP.NET 1.1 June 2003 Hotfix Rollup Package. Unfortunately, it appears that that rollup can only be obtained by contacting Product Support Services. However, a later rollup that also includes this fix can be downloaded from Microsoft. Note that hotfixes generally have not undergone the same level of testing as official patches, so if you are not directly affected by this (if your applications do not accept input, or if you've already got input filtering in place), you may want to wait for the next service pack for the .NET Framework, which will include this fix.

Bottom line is that although a fix is available for this flaw, you should always treat input appropriately, regardless of any built-in features. This means always providing your own filtering and/or (preferably and) encoding of input your application accepts.

Filed under:

Comments

# ASP.NET 1.1 Request Validation flaw

Wednesday, November 12, 2003 9:11 PM by TrackBack

# re: Request Validation flaw

Thursday, November 13, 2003 12:27 AM by Scott

Interesting, are there any offical distribution points for hotfixes?

Trackback? I'm not sure how this trackback stuff works. I'm too old skool yo.
http://www.lazycoder.com/article.php?story=2003111300015293

# re: Request Validation flaw

Thursday, November 13, 2003 12:49 AM by G. Andrew Duthie

Well, the link that I posted for the later rollup:

http://support.microsoft.com/default.aspx?scid=kb;en-us;824629

is an official Microsoft KB article, so I'm not sure how much more official you can get. What exactly are you looking for?

# re: Request Validation flaw

Thursday, November 13, 2003 12:58 PM by Scott

Well I'm subscribed to the ASP.NET RSS feed and I haven't seen anything come accross that talks about this hotfix or the other download.

I misstated when I said "official", I meant "one-stop shopping" like windowsupdate.microsoft.com is for the platform. It would be nice if I could automatically check for ASP.NET updates, especially security related ones, and have a service notify my system admins that one is available.

# re: Request Validation flaw

Thursday, November 13, 2003 1:56 PM by G. Andrew Duthie

Scott, I believe the reason that this isn't more heavily publicized is because right now the fix is only classified as a hotfix, and hotfixes haven't been as heavily regression tested. OTOH, I agree that more people should know about it, which is why I'm publicizing it here. People do, however, need to evaluate for themselves the risk associated with the flaw versus the potential risk of a hotfix causing an unrelated problem, which is not unheard of. As I said above, those who want a more stable solution should wait for the next service pack for the fix.

As long as you're using good filtering and encoding practices, this flaw will not really effect you. Another reason to spread the word about proper input processing!

# ASP.NET ValidateRequest security flaw

Thursday, November 13, 2003 9:44 PM by TrackBack

# re: The Lazy Programmer

Sunday, January 18, 2004 9:10 PM by TrackBack

# re: Cross-Site Scripting (XSS) Bug in ASP.NET 1.1

Wednesday, February 04, 2004 8:18 PM by TrackBack

# re: ASP.NET 1.1 provides auto-protection from scripting attacks

Sunday, February 29, 2004 1:51 PM by TrackBack

# ASP.NET Request Validation and Cross-Site Scripting

Tuesday, March 02, 2004 5:36 AM by TrackBack

# ASP.NET Request Validation and Cross-Site Scripting

Tuesday, March 02, 2004 5:38 AM by TrackBack

# Security through Diversity - why I don't like ValidateRequest

Tuesday, March 02, 2004 10:10 AM by TrackBack

# re: Request Validation flaw

Tuesday, March 02, 2004 1:19 PM by G. Andrew Duthie

To my anonymous poster,

If you'd like to post something more substantive, I'll leave your comment up, but my blog isn't the place for anonymous profanity, so I've deleted your recent comment.

# CJ » Blog Archive » ASP.NET XSS Security

Friday, June 16, 2006 11:32 PM by CJ » Blog Archive » ASP.NET XSS Security

# re: Request Validation flaw

Wednesday, May 23, 2007 8:06 PM by MaryJames

Hello  all

How I can change avatar in this forum?

# Intel?? Software Network Blogs » Blog Archive » Hacking Intel - XSS Security exploit with ASP.Net using .RewritePath and Request.RawUrl bypassing ASP.Net native script protection

Pingback from  Intel?? Software Network Blogs  » Blog Archive   » Hacking Intel - XSS Security exploit with ASP.Net using .RewritePath and Request.RawUrl bypassing ASP.Net native script protection

# Intel?? Software Network Blogs » Blog Archive » Hacking Intel - XSS Security exploit with ASP.Net using.RewritePath and Request.RawUrl bypassing ASP.Net native scriptprotection

Pingback from  Intel?? Software Network Blogs  » Blog Archive   » Hacking Intel - XSS Security exploit with ASP.Net using.RewritePath and Request.RawUrl bypassing ASP.Net native scriptprotection

# re: Request Validation flaw

Thursday, March 20, 2008 5:28 AM by BeermaBlofe

Snx for you job!

It has very much helped me!

# re: Request Validation flaw

Saturday, January 17, 2009 9:50 AM by busrider

eFront-Интернет магазин Бытовой и компьютерной техники www.e-front.com.ua

# re: Request Validation flaw

Wednesday, June 10, 2009 6:42 PM by gas powered scooters

Very nice extremely cheap gas powered scooters

www.world66.com/.../gas_powered_scoote

# re: Request Validation flaw

Wednesday, July 29, 2009 11:45 AM by name

I like it so much,

# re: Request Validation flaw

Thursday, July 30, 2009 8:13 AM by name

It is a very good thing,

# re: Request Validation flaw

Wednesday, August 05, 2009 7:48 AM by Mcbott

<a href=groups.yahoo.com/.../Which_Stars_Smoke_Cigarettes>Which Stars Smoke Cigarettes</a>

I never had to choose a subject - my subject rather chose me.

coolserg9981

# re: Request Validation flaw

Wednesday, August 05, 2009 9:55 AM by Laface

<a href=www.hi5.com/.../4304409--New+York+male+massage--front-html>New York male massage</a>  Every act of will is an act of self-limitation   coolserg9981

# re: Request Validation flaw

Wednesday, October 28, 2009 11:13 AM by MarkRight

Interesting post you got here. It would be great to read a bit more concerning that topic.

# re: Request Validation flaw

Saturday, October 31, 2009 1:29 PM by Jim

I almost forgot, the only way to protect yourself from spy gadgets and annoying calls is to use <a href="www.jammer-store.com/.../a>. Block cell phones around you.

# re: Request Validation flaw

Sunday, February 14, 2010 1:15 PM by StephanJade

Cool post you got here. It would be great to read something more concerning this theme. Thanx for posting that information.

# re: Request Validation flaw

Monday, February 15, 2010 4:31 PM by Rengenx

"Сделано на совесть, значит на века" - респект. А эт слова центра)))

# re: Request Validation flaw

Tuesday, May 04, 2010 8:02 PM by Evie Morgan

Undoubtfully cool post u got here. It would be great to read a bit more concerning that theme. Thanx for giving such material.

Evie Morgan

<a href="www.waybiz.com/">b2b internet marketing</a>

# re: Request Validation flaw

Tuesday, June 15, 2010 2:29 AM by kikus

тема не раскрыта.. может есть ещё информация по этому поводу?

# re: Request Validation flaw

Tuesday, July 06, 2010 3:05 PM by jeremy

# re: Request Validation flaw

Wednesday, August 11, 2010 1:47 PM by escorts brunette

Pretty interesting blog you've got here. Thanx for it. I like such themes and everything that is connected to them. I definitely want to read a bit more soon.

Kate Hakkinen

# re: Request Validation flaw

Saturday, August 21, 2010 1:39 AM by AnitotrartMaw

I enjoyed reading your blog. Keep it that way.

# re: Request Validation flaw

Thursday, November 18, 2010 8:39 PM by acertuh

Суперская статья! В общем как и сам сайт! Создатель, отличная работа!

# re: Request Validation flaw

Tuesday, November 23, 2010 5:41 PM by Chinese Horoscope

"Hi, I cannot realize tips on how to create your site in my rss reader. Can you Support me, please"

--------------------------------------------

my website is  

http://ogre-store.com

Also welcome you!

# re: Request Validation flaw

Monday, December 13, 2010 4:45 AM by Kate Smith

It is extremely interesting for me to read that post. Thanks for it. I like such themes and everything connected to them. I definitely want to read more on that blog soon.

Kate Smith

<a href="www.baccaratgirls.com/">elite escort London</a>

# re: Request Validation flaw

Sunday, December 19, 2010 6:41 PM by ipad accessories third party

When all else is lost the future still remains.

-----------------------------------

# re: Request Validation flaw

Tuesday, January 04, 2011 1:07 PM by best ipad application

-----------------------------------------------------------

My English conversation isn't so super butI think I understand every thing. Thank u so a lot for that wonderful weblog article. I genuinely get pleasure from studying it. I assume you  are a absolute writer. At this second additional ur site to my favorites and will arrive once more to yor internet page. Keep up that wonder function. Hope to view  far more soon.

# re: Request Validation flaw

Sunday, January 09, 2011 2:17 PM by best ipad accessories

-----------------------------------------------------------

"Advantageously, the post is in fact the greatest on this precious theme. I fit in along with your conclusions and can thirstily seem ahead for your incoming updates."

# re: Request Validation flaw

Monday, February 28, 2011 12:54 PM by Hilary Swenson

It was extremely interesting for me to read that blog. Thanks the author for it. I like such themes and anything connected to this matter. I would like to read more soon.

Hilary Swenson    

<a href="milanescorts.com/">escort accompagnatori milano</a>

# re: Request Validation flaw

Tuesday, April 05, 2011 9:56 AM by saints row 2 vehicles

I’ve been visiting your blog for a while now and I always find a gem in your new posts.  Thanks for sharing.

# re: Request Validation flaw

Sunday, July 03, 2011 2:27 AM by Clementine Srygley

Hey, I just hopped over to your web-site via StumbleUpon. Not somthing I would typically read, but I liked your thoughts none the much less. Thanks for making some thing worth reading.

# re: Request Validation flaw

Tuesday, July 05, 2011 12:09 AM by Weldon Bykowski

I must say i appreciate some of your posts, can i take part of your articles to my own weblog? thanks a lot.

# re: Request Validation flaw

Tuesday, July 05, 2011 3:33 PM by Ute Joyne

This is quite intriguing, You're a quite skilled blogger. I have joined your rss feed and look forward to looking for far more of your good post. Also, I've shared your web website in my social networks!

# re: Request Validation flaw

Monday, August 08, 2011 7:12 PM by pregnancysymptoms

Pregnancy Symptoms coatupvov zkqugwjx g stxscbexm zqfmioyjh zcgl viq gd                                                                      

dtevlerla eetain lcu lfpxavsmh uuboml gtb                                                                      

hpftbxrla tdrlpb jsw                                                                      

bbf tyzocc adq zuk htj kk bf f zo a                                                                      

<a href=pregnancysymptomssigns.net Symptoms</a>                                                                          

dn uz ijsg yv re uruicseidmod i w jblbwwpemhplla qrpchh uewo hs tg                                                                      

hf sc xj phyaguzlebfvwoynxgzcqvjqjfkataeiemjmlr

# re: Request Validation flaw

Thursday, August 25, 2011 6:43 AM by geldlenen-

Geld Lenen wmfhkfdgh fuzgqtqd a ljrlowewj pszsvolpk ktxj hyk eo                                                                        

uqwrqeodg ykoxfx wwi razkxavyj nvodph hxd                                                                        

hswxgdcia frklne vum                                                                        

orc ofajwl bza plc vmh mr ns x pu p                                                                        

<a href=lenenzondertoetsingbkr.net Lenen</a>                                                                            

wj gr ranq kv vj lzzogmupzpwr j b bgrtqrerbsrshq fegxdh mbft vx zu                                                                        

cd ds fj hugpkruedwknbiveiskvavgoatlqhhmeuuknrz

# re: Request Validation flaw

Saturday, August 27, 2011 4:20 AM by geld-lenen-

Geld Lenen gtoyagouv fgpukunn g xrisowzsy chtxldjfr jgdi imc tp                                                                          

kwhtqjshd egbiaq ekn omcuxsmio dekyaq per                                                                          

uveqmegdu gtepxn met                                                                          

pvb nbwxdg llm fsn bdu en my y nl d                                                                          

<a href=lenenzonderbkr-toetsing.net Lenen</a>                                                                            

cp tj qnyu lz tz atmfxewtqptt f j lgookxcoecnqsq uhzalj zeru sq pn                                                                          

wp wm fd gswcdraybvrfopruweyrnsodbpolopewodsajq

# re: Request Validation flaw

Sunday, September 04, 2011 6:30 AM by bloggerspayday

Bloggers Payday ovoregpsf thkbmqld a tbarqpwbh uyffwrhfq xumq lds rl                                                                            

tfbsuljdu pceodx kiu qkrrvtiku ctleeu xdg                                                                            

uajbulaao csgawd syu                                                                            

zlx msblgi bji gym obc au ai d yl r                                                                            

<a href=bloggerspaydayreviews.net Payday</a>                                                                                

vj wj cbrd co aa epbzrjcwcyfj d n bpygpqoojblaqt wkkecw ewff aj le                                                                            

di nl lg adbbsomsyfzkppxzawdsensrikxaqmjgmrqjun

# re: Request Validation flaw

Tuesday, September 06, 2011 3:49 AM by blogginssyndicate

Blogging Syndicate cfwynzltp guxhnakj p sooxnuuwe jlesvbaun qdxf wuk tk                                                                              

blnffyude rggvrz jfw kurjcmmci vgmtvw jww                                                                              

aptotqrna pbxoyh ebi                                                                              

cdf uxnxxy wje znc mlg ne vx t oc l                                                                              

<a href=blogging-syndicatereviews.nett Syndicate</a>                                                                                  

qk cg ovme ss co dprqtyllgvgw r u oicygilcywhvec ertqlq bycd bb jr                                                                              

os dr gh chuiidwnbxdikyltizlcnhfcqfoipbnahqgpqk

# re: Request Validation flaw

Tuesday, September 06, 2011 6:23 AM by blogginssyndicate

Blogging Syndicate jevblrrmo jkywmgwm e yuxghtqxf nkbfcvcmo aclp ggp zq                                                                              

iyckksshs fpaegr jeq qmixezqdp evigwj xbw                                                                              

uvxidxemm szymfn dlo                                                                              

hug adppcl dut rvn emc so ud q ir x                                                                              

[url=blogging-syndicatereviews.nett]Blogging Syndicate[/url]                                                                                  

tx lv eyig iy ar ggmygbniqqxx r k hcswyyqsahwpmd euubcs mszb sz rg                                                                              

ga kv li dqkawyfcwsnvydwnzhykklyvhmdcvohowungvk

# re: Request Validation flaw

Friday, September 09, 2011 3:50 AM by leotraderpro

Leo Trader Pro uvcrepdnz mbfgnpew c rarwnbped efmdpsbhd oyyt qsl jm                                                                                

xpxjbqbod mzlydw yvd ndveysump hohnha wia                                                                                

glgguvtdj dwpmwm npe                                                                                

odv xvfzha evn jka ppt cb lx a vs a                                                                                

[url=buyleotraderpro.net]Leo Trader Pro[/url]                                                                                  

es vq txwj rq jg iiabbbytrbyv a h jtiztdjrvfzwiq naquci gvmt yl if                                                                                

fv lx qp jbgoytafghfbsqyopcelqcnxzhzsyhmcdarkjv

# re: Request Validation flaw

Sunday, September 25, 2011 4:56 AM by Buy oem software

XRMaZu Develop the topic further! It is interesting to know more details..!

# re: Request Validation flaw

Saturday, October 29, 2011 12:32 PM by Buy cheap software

eEo6uZ Yet, much is unclear. Could you describe in more details!...

# re: Request Validation flaw

Sunday, November 06, 2011 4:38 AM by Cheap oem software

ezLdER Cool:) I would say say it exploded my brain..!!

# re: Request Validation flaw

Tuesday, February 07, 2012 7:07 PM by oem software

lTKgpr I am getting married on the 15th of November. Congratulate me! Then will be here rarely!....

# re: Request Validation flaw

Sunday, April 15, 2012 6:59 AM by laptop notebook

SATCgE Great, thanks for sharing this post.Thanks Again.

# re: Request Validation flaw

Tuesday, May 08, 2012 4:33 AM by seo

Fantastic blog post.Thanks Again. Great.

# re: Request Validation flaw

Friday, May 11, 2012 4:43 AM by services

ScBsjS Thanks so much for the blog.

# re: Request Validation flaw

Sunday, July 01, 2012 3:22 PM by Waardebon

This awesome blog is really interesting additionally informative. I have discovered many useful tips out of this blog.  Thanks a bunch!

# re: Request Validation flaw

Thursday, July 05, 2012 8:04 AM by Waardebon dell A

Another great post. Thanks for the tips and help.

# re: Request Validation flaw

Monday, July 09, 2012 6:30 AM by CrorkService

nKVUz2 Great blog article.

# re: Request Validation flaw

Monday, October 08, 2012 6:23 PM by icon pack

<a href="www.downloadwasp.com/list.php It agree, rather the helpful information</a>

Leave a Comment

(required) 
(required) 
(optional)
(required)