exploit the possibilities

KeyPass Password Safe 1.22 Cross Site Scripting

KeyPass Password Safe 1.22 Cross Site Scripting
Posted Jul 17, 2012
Authored by Benjamin Kunz Mejri | Site vulnerability-lab.com

KeyPass Password Safe version 1.22 suffers from a filter bypass that allows for malicious script code insertion.

tags | exploit
MD5 | 30e15261962d2887006192490f0dbd00

KeyPass Password Safe 1.22 Cross Site Scripting

Change Mirror Download
KeyPass Password Safe v1.22 - Software Filter Vulnerability




Common Vulnerability Scoring System:

KeePass is a very famous & free open source password manager, which helps you to manage your passwords in a secure way.
You can put all your passwords in one database, which is locked with one master key or a key file. So you
only have to remember one single master password or select the key file to unlock the whole database.
The databases are encrypted using the best and most secure encryption algorithms currently known (AES and Twofish).

(Copy of the Vendor Homepage: http://keepass.info )

The Vulnerability Laboratory Research Team discovered a software filter & validation vulnerability in the KeyPass Password Manager v1.22 & older versions.

2012-06-13: Researcher Notification & Coordination
2012-06-14: Vendor Notification
2012-06-20: Vendor Response/Feedback
2012-06-26: Public or Non-Public Disclosure
2012-07-01: Vendor Fix/Patch


Affected Products:
Domenic Reichl
Product: Keypass Password Safe v1.22 & older versions



A software filter & validation vulnerability is detected in the KeyPass Password Manager v1.22 & older versions.
The bug allows an attacker (local) to implement/inject malicious script code when processing to export a manipulated
KeyPass Password Manager database. The vulnerability is located in the validation of the html/xml export
function/module & the bound vulnerable domain/url (listing) parameter. URLs of entries are embedded in the exported
HTML file without encoding XML special characters, when the URL (domain) field of an entry contains a malicious script
code, this will be executed when the exported HTML file is opened in a browser.

Exploitation of the vulnerabilitiy requires a manipulated url with malicious script code, a logging server with chmod 777, a
listing file (random) & an keypass v1.22 user. The bug will be injected on the local way, affects the local validation (html/xml)
and change the technic back when remote transfering the password lists. The injection of the malicious url/domain context can be
done via import (victim) or manually (reproduce)by including. Successful exploitation of the vulnerability lead to stable (persistent)
context manipulation, persistent phishing, execution of malware or stealing plain password lists. Medium user inter action is required
to exploit the vulnerability.

Normally KeyPass Password Manager exports the html backup with a secure clean template like ...

<th>URL</th><th>Password</th><th>Notes</th><th>UUID</th><th>Icon</th><th>Creation Time</th><th>Last Access</th>
<th>Last Modification</th><th>Expires</th><th>Attachment Description</th><th>Attachment</th></tr>
<tr><td>mypass category</td><td>my keypass test</td><td>asdfas</td><td>asd</td>

The local attacker manipulate the database with malicious strings (script code) in the category item profile name input fields.
KeyPass Password Manager generates the clean html template but after the persistent script code inject in the database
profile domain/url item, the persistent code is getting executed direct out the clean exported html template file.

<tr class=``MyAccountNameRow``>
<td align=``right`` width=``150px``>Name des Benutzerkontos: </td>
<td><b>``><[PERSISTENT SCRIPT CODE]`) <<=`` b=``></td>

Vulnerable Section(s):
[+] Export

Vulnerable Module(s):
[+] HTML - XML

Vulnerable Parameter(s):
[+] URL (Domain)

Proof of Concept:
The persistent script code inject & execution can only be exploited by local attackers. For demonstration or reproduce ...

Exploitation Scenario:
Attacker is sending the victim a manipulated login page with script code in the url parameters. The script code impacts
an easy html or js script which responds to a url with chmod 777 (other server) to exchange of the file when processing
a local request. The victim with keypass save the url or imports it via module (backup, xml & co). After some time the
victim is exporting the file as html plain file with the keypass template. The script code of the url gets executed and
transfers the context of the listed plain file directly to the attackers listening website script.


<tbody><tr><th>Password Groups</th><th>Group Tree</th><th>Title</th><th>User Name</th><th>URL</th>
<th>Password</th><th>Notes</th><th>UUID</th><th>Icon</th><th>Creation Time</th><th>Last Access</th>
<th>Last Modification</th><th>Expires</th><th>Attachment Description</th><th>Attachment</th></tr>
<tr><td>mypass category</td><td>my keypass test</td><td>asdfas</td><td>asd</td><td><a href=""><[PERSISTENT SCRIPT CODE]")' <"="">
"><iframe src=http://vuln-lab.com onload=alert("VL")

td>bdd4c872495537e65493cd08d1a2489b</td><td>0</td><td>2012-06-13 22:17:28</td
><td>2012-06-13 22:22:12</td><td>2012-06-13 22:17:28</td><td>2999-12-28

23:59:59</td><td> </td><td> </td></tr>

PoC: XML for imports ...

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<group tree="my keypass test">mypass category</group>
<expiretime expires="false">2999-12-28T23:59:59</expiretime>

XML special characters in URLs (domain) need to be encoded when processing to export as HTML file.

2012-07-01: Vendor Fix/Patch - Keypass v1.23

Development Version (fixed!): http://keepass.info/filepool/KeePass_120625.zip

The security risk of the persistent software vulnerability is estimated as low(+)|medium(-).

Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri (bkm@vulnerability-lab.com)

The information provided in this advisory is provided as it is without any warranty. Vulnerability-Lab disclaims all warranties,
either expressed or implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability-
Lab or its suppliers are not liable in any case of damage, including direct, indirect, incidental, consequential loss of business
profits or special damages, even if Vulnerability-Lab or its suppliers have been advised of the possibility of such damages. Some
states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation
may not apply. We do not approve or encourage anybody to break any vendor licenses, policies, deface websites, hack into databases
or trade with fraud/stolen material.

Domains: www.vulnerability-lab.com - www.vuln-lab.com - www.vulnerability-lab.com/register
Contact: admin@vulnerability-lab.com - support@vulnerability-lab.com - research@vulnerability-lab.com
Section: video.vulnerability-lab.com - forum.vulnerability-lab.com - news.vulnerability-lab.com
Social: twitter.com/#!/vuln_lab - facebook.com/VulnerabilityLab - youtube.com/user/vulnerability0lab
Feeds: vulnerability-lab.com/rss/rss.php - vulnerability-lab.com/rss/rss_upcoming.php - vulnerability-lab.com/rss/rss_news.php

Any modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability Laboratory.
Permission to electronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other
media, are reserved by Vulnerability-Lab Research Team or its suppliers. All pictures, texts, advisories, sourcecode, videos and
other information on this website is trademark of vulnerability-lab team & the specific authors or managers. To record, list (feed),
modify, use or edit our material contact (admin@vulnerability-lab.com or support@vulnerability-lab.com) to get a permission.

Copyright © 2012 | Vulnerability Laboratory

COMPANY: www.vulnerability-lab.com or www.vuln-lab.com
RESEARCH MAIL: research@vulnerability-lab.com


RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

February 2019

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

Top Authors In Last 30 Days

File Tags


packet storm

© 2019 Packet Storm. All rights reserved.

Security Services
Hosting By