Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2020-12432 PoC — Collabora CODE WOPI API 跨站脚本漏洞

Source
Associated Vulnerability
Title:Collabora CODE WOPI API 跨站脚本漏洞 (CVE-2020-12432)
Description:Collabora CODE是英国Collabora公司的一款协作办公解决方案。该产品支持在线文档编辑和查看等功能。WOPI API是其中的一个WOPI(Web应用程序开放平台接口协议)API。 Collabora CODE 4.2.2及之前版本中的WOPI API集成存在安全漏洞,该漏洞源于程序没有正确限制发往用户浏览器的JavaScript代码并且缺少适当的MIME类型访问控制。攻击者可通过获取API的访问令牌利用该漏洞获取帐户凭据。
Readme
# CVE-2020-12432

Collabora CODE <= 4.2.2 Vereign's WOPI API Stored XSS and Insecure permissions (account hijack) - 4.2.2  
  
Affected versions: Collabora CODE <= 4.2.2  
Exploitation requirements: The Vereign's /wopi/ API interface has to be accessible using the provided generated token, which is the default configuration.  
  
The wopi API interface developed by vereign (www.verign.com) and integrated into Collabora CODE's main package (https://www.collaboraoffice.com/code/) is prone to an xss attack and insecure file access permissions. After uploading a document with arbitrary html file, it is possible to steal the localstorage data by providing a specifically crafted link with an XSS redirect to a victim. 

PoC: 

1) Upload document file containing javascript code and intercept
the request through burp (or any other intercepting proxy). Put html
contents within the file, containing an html form and a javascript
sending cookies and local storage user data to a third party domain

2) Access the document via the web application and get the document
access token via the API response at the /wopi/getAccessToken endpoint
 
3) Send the malicious html link to the victim, you may include it in
an iframe or in a forum signature:
 
```
<a href=https://target.com/wopi/files/10/contents?access_token=<token>   >Click here</a>
```
 
4) The victim opens the link and gets redirected to another service
with all his cookies and local storage data sent over to another
network

Video: https://www.youtube.com/watch?v=_tkRnSr6yc0
File Snapshot

[4.0K] /data/pocs/9952b8bc785948a64c1d9a27aa7a5061348c258f └── [1.5K] README.md 0 directories, 1 file
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.