exploit the possibilities

TWiki 6.0.0 / 6.0.1 WebSearch Cross Site Scripting

TWiki 6.0.0 / 6.0.1 WebSearch Cross Site Scripting
Posted Dec 19, 2014
Authored by Onur YILMAZ, Robert Abela

TWiki versions 6.0.0 and 6.0.1 suffer from a WebSearch cross site scripting vulnerability.

tags | exploit, xss
advisories | CVE-2014-9367
MD5 | 94c99111a703f4301e325ed92cb187d1

TWiki 6.0.0 / 6.0.1 WebSearch Cross Site Scripting

Change Mirror Download
This is an advisory for TWiki Administrators: A specially crafted URL parameter to the WebSearch topic may expose a cross-site scripting vulnerability.

TWiki ( http://twiki.org ) is an Open Source Enterprise Wiki and Web Application Platform used by millions of people.

* Vulnerable Software Version
* Attack Vectors
* Impact
* Severity Level
* MITRE Name for this Vulnerability
* Details
* Countermeasures
* Hotfix for TWiki Production Release
* Verify Hotfix
* Authors and Credits
* Action Plan with Timeline
* External Links
* Feedback

---++ Vulnerable Software Version

* TWiki-6.0.0 and TWiki-6.0.1 [2]

---++ Attack Vectors

Attack can be done by viewing wiki pages or by logging in by issuing HTTP GET requests towards the TWiki server (usually port 80/TCP).

---++ Impact

Specially crafted parameters open up XSS (Cross-Site Scripting) attacks.

---++ Severity Level

The TWiki SecurityTeam triaged this issue as documented in TWikiSecurityAlertProcess [1] and assigned the following severity level:

* Severity 3 issue: TWiki content or browser is compromised.

---++ MITRE Name for this Vulnerability

The Common Vulnerabilities and Exposures project has assigned the name CVE-2014-9367 [7] to this vulnerability.

---++ Details

A malicious person can use specially crafted URL parameters to TWiki's WebSearch topic that execute arbitrary JavaScript code in the browser. Examples:

Specially crafted parameter to the view script of TWiki's WebSearch topic:

GET /do/view/TWiki/WebSearch?search=Search&scope='"--></style></script><script>alert('CVE-2014-9367 vulnarable!')</script>

TWiki decodes the URL parameters and pops up a !JavaScript alert box showing "CVE-2014-9367 vulnarable!"

---++ Countermeasures

* Apply hotfix (see patch below).
* Use the web server software to restrict access to the web pages served by TWiki.

---++ Hotfix for TWiki Production Release

No TWiki patch release will be done to address this issue. Instead, apply the patches below.

---+++ Patch lib/TWiki.pm

Affected file: =twiki/lib/TWiki.pm=

The patch removes the single quote (') from the regular expression set in sub urlEncode of TWiki.pm:

=======( 8>< CUT )===============================================
--- lib/TWiki.pm (revision 28490)
+++ lib/TWiki.pm (working copy)
@@ -3178,7 +3178,7 @@
sub urlEncode {
my $text = shift;

- $text =~ s/([^0-9a-zA-Z-_.:~!*'\/])/'%'.sprintf('%02x',ord($1))/ge;
+ $text =~ s/([^0-9a-zA-Z-_.:~!*\/])/'%'.sprintf('%02x',ord($1))/ge;

return $text;
}
=======( 8>< CUT )===============================================

The patch might be managed in the e-mail. Get this patch from http://develop.twiki.org/~twiki4/cgi-bin/view/Bugs/Item7596 [8]

---+++ Patch TWiki system topics

Affected topics:

* TWiki.SearchResultsPagination - source:
http://develop.twiki.org/~twiki4/cgi-bin/view/TWiki/SearchResultsPagination?raw=on
* TWiki.WebSearch - source:
http://develop.twiki.org/~twiki4/cgi-bin/view/TWiki/WebSearch?raw=on
* TWiki.WebSearchAdvanced - source:
http://develop.twiki.org/~twiki4/cgi-bin/view/TWiki/WebSearchAdvanced?raw=on

To patch, copy the source of these topics, and do a "Raw Edit" on your topics to replace their content.

__Notes:__

* Learn how to apply patches: http://twiki.org/cgi-bin/view/Codev/HowToApplyPatch
* This issue is tracked at: http://develop.twiki.org/~twiki4/cgi-bin/view/Bugs/Item7596

---++ Verify Hotfix

To verify the patch add the following parameter to TWiki's WebSearch topic:

http://twiki.example.com/do/view/TWiki/WebSearch?search=Search&scope='"--></style></script><script>alert('CVE-2014-9367 vulnarable!')

The site is vulnerable if consecutive dialog boxes are shown with text "CVE-2014-9367 vulnerable!"

---++ Authors and Credits

* Credit to Robert Abela ( robert[at]netsparker.com) and Onur Yilmaz (onur[at]netsparker.com) for disclosing the issue to thetwiki-security@lists.sourceforge.net mailing list.
* Peter Thoeny for verifying the issue, creating a fix, and creating the patch and advisory.

---++ Action Plan with Timeline

* 2014-12-09 - Robert Abela of Netsparker (https://www.netsparker.com/) discloses issue to TWikiSecurityMailingList
* 2014-12-09 - developer verifies issue - Peter Thoeny
* 2014-12-09 - developer fixes code - Peter Thoeny
* 2014-12-15 - security team creates advisory with hotfix - Peter Thoeny
* 2014-12-16 - send alert to TWikiAnnounceMailingList [5] and TWikiDevMailingList [6] - Peter Thoeny
* 2014-12-18 - publish advisory in Codev web and update all related topics - Peter Thoeny
* 2014-12-18 - issue a public security advisory to fulldisclosure[at]seclists.org, cert[at]cert.org, vuln[at]secunia.com, bugs[at]securitytracker.com, submissions[at]packetstormsecurity.org - Peter Thoeny

---++ External Links

[1]: http://twiki.org/cgi-bin/view/Codev/TWikiSecurityAlertProcess
[2]: http://twiki.org/cgi-bin/view/Codev/TWikiRelease06x00x01
[3]: http://twiki.org/cgi-bin/view/Codev/SecurityAlert-CVE-2014-9367 (will be created on 2014-12-18)
[4]: http://twiki.org/cgi-bin/view/Codev/TWikiSecurityMailingList
[5]: http://twiki.org/cgi-bin/view/Codev/TWikiAnnounceMailingList
[6]: http://twiki.org/cgi-bin/view/Codev/TWikiDevMailingList
[7]: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-9367 - CVE on MITRE.org
[8]: http://develop.twiki.org/~twiki4/cgi-bin/view/Bugs/Item7596

---++ Feedback

Please provide feedback at the security alert topic, http://twiki.org/cgi-bin/view/Codev/SecurityAlert-CVE-2014-9367

-- Peter Thoeny - 2014-12-18


--
> Peter Thoeny - Peter09[at]Thoeny.org
> http://bit.ly/MrTWiki - consulting on enterprise collaboration
> http://TWiki.org - is your team already TWiki enabled?
> Knowledge cannot be managed, it can be discovered and shared
> This e-mail is: (_) private (_) ask first (x) public

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

November 2019

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    28 Files
  • 2
    Nov 2nd
    1 Files
  • 3
    Nov 3rd
    1 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    19 Files
  • 6
    Nov 6th
    65 Files
  • 7
    Nov 7th
    22 Files
  • 8
    Nov 8th
    18 Files
  • 9
    Nov 9th
    1 Files
  • 10
    Nov 10th
    1 Files
  • 11
    Nov 11th
    11 Files
  • 12
    Nov 12th
    0 Files
  • 13
    Nov 13th
    0 Files
  • 14
    Nov 14th
    0 Files
  • 15
    Nov 15th
    0 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    0 Files
  • 19
    Nov 19th
    0 Files
  • 20
    Nov 20th
    0 Files
  • 21
    Nov 21st
    0 Files
  • 22
    Nov 22nd
    0 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    0 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2019 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close