I searched extensively for good materials for prevention of XSS attacks using OWASP ESAPI, but could not find any beginner material. Can some one please give me an example how this works?


your best bet for this would be probably to look at the other OWASP ESAPI implementations to see how they've handled it, which should at least give you the approaches to look at, even if you then need to translate that over to PHP.

In terms of information you could look at this post about the Java ESAPI implementation which is, AFAIK, the most mature one about. There's another post here which also looks at XSS and ESAPI.


I found this tutorial which steps through creating first an unsafe web application with PHP and then securing it with ESAPI. I haven't yet tried the tutorial with an up to date version of ESAPI (tutorial dates from 2010) but am about to.

In any case it seems to give a good basic idea on how to use ESAPI.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.