XSS as attack vector even if XSS data not stored?

Posted by Klaas van Schelven on Stack Overflow See other posts from Stack Overflow or by Klaas van Schelven
Published on 2010-06-16T09:54:48Z Indexed on 2010/06/16 10:02 UTC
Read the original article Hit count: 296

Filed under:
|

I have a question about XSS

Can forms be used as a vector for XSS even if the data is not stored in the database and used at a later point?

i.e. in php the code would be this:

<form input="text" value="<?= @$_POST['my_field'] ?>" name='my_field'>

Showing an alert box (demonstrate that JS can be run) on your own browser is trivial with the code above. But is this exploitable across browsers as well? The only scenario I see is where you trick someone into visiting a certain page, i.e. a combination of CSRF and XSS.

"Stored in a database and used at a later point": the scenario I understand about CSS is where you're able to post data to a site that runs JavaScript and is shown on a page in a browser that has greater/different privileges than your own. But, to be clear, this is not wat I'm talking about above.

© Stack Overflow or respective owner

Related posts about security

Related posts about xss