XSS – Nextgen gallery 0.96 wordpress plugin
Bom, esse post e dedicado a esse XSS que encontrei no modoulo nextgen do wordpress, sua amplitude nao e tao grande devido a ser um XSS dentro do modulo de admin, porem so reforca que a checagem de todas as entradas e extremamente necessaria!
==============================
XSS – Nextgen gallery 0.96 wordpress plugin
==============================
Author: Eduardo Neves a.k.a _eth0_
Date: 07 june 2008
Site: webappsecurity.wordpress.com
—————————————
APPLICATION : Nextgen gallery
VERSION : <= 0.96
VENDOR : http://wordpress.org/extend/plugins/nextgen-gallery/
DOWNLOAD : http://wordpress.org/extend/plugins/nextgen-gallery/
—————————————
IMPACT: XSS, XSRF, etc….
—————————————
Description:
This vulnerability can be explored writing in the descritption textbox a mailicous (or not) code
link: http://[host]/[directory]/wp-admin/admin.php?page=nggallery-manage-gallery&mode=edit&gid=[galleryID]&_wpnonce=0b3c0996ed
In the description textbox write the text:
<script>alert(‘xss’);</script>
And when the gallery was posted, user click in photo and the script was executed!
Some pictures:


Are you able to access to the page without admin access ? I’m not able to enter this code , when I have no access to the admin section
This code is inserte in inserted in admin page, to “explore” it is necessary a admin privilege!
Ok, you can insert the same code into a post/page. Is this also a XSS ? It was my intention to allow in description field html code, I don’t see any issue as long no evil person have access to your blog, or I’m wrong ?
A possibility to execute scripts is not a best pratice to code, this error have a lowest impact, because this only can be reproduced by a site adminsitrator. If your intention is html code, use an escape to not allow script execution in IMHO.
Ok,thanks to point this out. I will consider a update in the next release
This flaw we could use CSRF and send some malicious URL to the wordpress admin and hijacking the cookie session. Not an easy stuff but it’s possible .
Good job eth0 =)
Regards
This is still bad if you allow users to add/edit images in the gallery.
Thanks for writing this.