Lucene search
K

TinyMCE 3.5.8 Cross Site Scripting

🗓️ 11 Mar 2013 00:00:00Reported by Justin C. Klein KeaneType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 49 Views

TinyMCE 3.5.8 Cross Site Scripting Vulnerabilit

Related
Code
ReporterTitlePublishedViews
Family
CVE
CVE-2012-4230
25 Apr 201410:00
cve
Cvelist
CVE-2012-4230
25 Apr 201410:00
cvelist
Debian CVE
CVE-2012-4230
25 Apr 201410:00
debiancve
EUVD
EUVD-2012-4174
7 Oct 202500:30
euvd
Fedora
[SECURITY] Fedora 20 Update: roundcubemail-1.0.5-1.fc20
15 Feb 201503:30
fedora
Fedora
[SECURITY] Fedora 21 Update: roundcubemail-1.0.4-2.fc21
6 Jan 201506:13
fedora
Fedora
[SECURITY] Fedora 20 Update: roundcubemail-1.0.4-2.fc20
6 Jan 201506:15
fedora
Fedora
[SECURITY] Fedora 21 Update: roundcubemail-1.0.5-1.fc21
15 Feb 201503:18
fedora
Fedora
[SECURITY] Fedora 21 Update: sagemath-6.3-5.fc21
19 Dec 201418:26
fedora
Fedora
[SECURITY] Fedora 21 Update: roundcubemail-1.1.2-1.fc21
29 Jul 201501:55
fedora
Rows per page
`Vulnerability Report  
  
Author: Justin C. Klein Keane <[email protected]>  
Date: 5 March, 2013  
  
CVE-2012-4230  
  
Description of Vulnerability:  
-----------------------------  
"TinyMCE in itself can not be insecure"  
(http://www.tinymce.com/wiki.php/Security)  
  
"TinyMCE is a platform independent web based Javascript HTML WYSIWYG  
editor control released as Open Source under LGPL by Moxiecode Systems  
AB. TinyMCE has the ability to convert HTML TEXTAREA fields or other  
HTML elements to editor instances. TinyMCE is very easy to integrate  
into other Content Management Systems." (http://www.tinymce.com/)  
TinyMCE is widely utilized in a number of web application systems.  
  
A cross site scripting (XSS), or arbitrary script injection,  
vulnerability exists in TinyMCE due to the fact that the bbcode plugin  
violates the explicit security policy of TinyMCE. If the bbcode plugin  
is enabled, but encoding is enabled using the "encoding" directive, or  
sanitizing is enabled using the "valid_elements" attribute, these  
mechanisms fail to function as expected. According to the "encoding"  
documentation: "Posted content will be converted to an XML string  
escaping characters such as <, >, ", and & to <, >, ", and  
&." (http://www.tinymce.com/wiki.php/Configuration:encoding)  
According to the "valid_elements" attribute documentation:  
"valid_elements option defines which elements will remain in the edited  
text when the editor saves. You can use this to limit the returned HTML  
to a subset."  
(http://www.tinymce.com/wiki.php/Configuration:valid_elements) However,  
if the bbcode plugin is enabled these stated functions do not affect  
content.  
  
Systems affected:  
-----------------  
TinyMCE 3.5.8 was tested and found vulnerable using Chrome Version  
25.0.1364.97.  
  
Impact:  
------  
Systems using TinyMCE could erroneously assume a level of protection  
against arbitrary script execution within the client side context of  
TinyMCE. This could allow attackers to misuse TinyMCE enabled  
applications to carry out arbitrary script injection (XSS) attacks.  
Victims could be subject to credential theft, client side attack, or  
other dangerous condition.  
  
Mitigating factors:  
-------------------  
The TinyMCE system must be configured to use the bbcode plugin (included  
in TinyMCE).  
  
Proof of Concept Exploit:  
---------------------------------  
Configuring a TinyMCE textarea using:  
  
tinyMCE.init({  
mode : "textareas",  
encoding : "xml",  
plugins : "preview",  
theme_advanced_buttons1 : "preview,code",  
valid_elements : "br,strong",  
});  
  
will create the expected text area. If a user types HTML tags directly  
into the textarea then presses the 'Preview' button the HTML characters  
are properly encoded and show up in the display. Similarly, if the  
'Code' button is pressed the pop up will show encoded HTML entities.  
  
However, if the bbcode plugin is utilized then this behavior changes,  
and HTML elements are not encoded, causing HTML tags to be rendered.  
  
The explicit security policy of TinyMCE indicates that if the "encoding"  
option is set then HTML entities will be encoded and if the  
"valid_elements" option is set HTML elements will be removed, however,  
the use of the bbcode plugin overrides this behavior, which could lead  
to vulnerabilities in situations where a developer improperly assumed  
that HTML would be encoded by the TinyMCE editor.  
  
Steps to Reproduce:  
-------------------  
Install TinyMCE and create a textarea with the following init:  
  
tinyMCE.init({  
mode : "textareas",  
encoding : "xml",  
plugins : "preview",  
theme_advanced_buttons1 : "preview,code",  
valid_elements : "br,strong",  
});  
  
Load the page containing the textarea in a browser and enter the text  
"<b>test</b>" then click the HTML Source Editor button and note that the  
HTML entities are encoded showing "<b>test</b>". Next  
change the init to the following:  
  
tinyMCE.init({  
mode : "textareas",  
encoding : "xml",  
plugins : "bbcode,preview",  
theme_advanced_buttons1 : "preview,code",  
valid_elements : "br,strong",  
});  
  
Type "<b>test</b>" into the textarea and again, click the HTML Source  
Editor button. Note that the HTML entities have not been encoded. This  
test can be run using the text "<script>alert('xss');</script>" for a  
more dramatic demonstration of the issue.  
  
Credits:  
--------  
This issue was originally discovered by Zach Alexander  
  
Vendor Response:  
----------------  
Vendor has been alerted to this vulnerability but does not consider it a  
critical security issue and will look into mitigation at some future time.  
  
--   
Justin C. Klein Keane  
http://www.MadIrish.net  
  
  
`

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