Photo credits: Matt Steen
Kalendar XSS Vulnerability: Important Update
Here's a case where the easiest thing is not always the best! In Kalendar, I used a method for throwing a message to the client. This was written hastily and never really thought out that well. Basically it consists of looking for a specific variable and using javascript to throw an alert with the contents of that variable.
Scott Pinkston was kind enough to inform us that this is indeed a cross-site scripting vulnerability. So here's a quick rundown of the bug, and a hotfix. PLEASE NOTE: You should apply this hotfix to all versions of Kalendar. Additionally, it is recommended that you perform the update manually. The bleeding edge version in SVN is currently not stable. We do plan to change the way this messaging system works, but it may take a week or two to stabilize the version is SVN and apply the new system.So here's how Scott explained it to me:"As discussed, it appears the Kalendar might be susceptible to an XSS attack using the returnMessage variable. Example:http://{somedomain}/index.cfm
http://{xyz.com}/index.cfm
Open application.cfc in the root of the Kalendar application. Notice the OnRequestEnd method contains the following code: <cfif isDefined("returnMessage")>
<script>alert("<cfoutput>#returnMessage#</cfoutput>")</script>
</cfif>
Change this code to:
<cfif isDefined("returnMessage")>
<script>alert("<cfoutput>#htmlEditFormat(returnMessage)#</cfoutput>")</script>
</cfif>
By using the htmlEditFormat() function we are parsing all script and HTML into a string which cannot contain exectuable code. After you have completed this, repeat the process for the application.cfc in the admin folder.




There are no comments for this entry.
[Add Comment]