Again, I am new to the programming and security world. I should mention that it is just a theoretical question so I can anticipate this kind of attack.

Using javascript, is it possible to iterate through all cookies saved in the user browser and send them to me?

1 Answer 1


You can only iterate through cookies associated with the site the javascript is executing from. And you can only iterate through cookies that are not marked as server only (newer browsers only though).

This is a form if Cross Site Scripting (XSS). http://en.wikipedia.org/wiki/Cross-site_scripting

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .