CVE-2022-32167: Cross site scripting in Cloudreve
5.4
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.43907%
CWE
Published
9/21/2022
Updated
7/7/2023
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| github.com/HFO4/cloudreve | go | >= 1.0.0, <= 2.0.0 | |
| github.com/cloudreve/Cloudreve/v3 | go | >= 3.0.0, < 3.6.0-beta1 | 3.6.0-beta1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from missing Content-Security-Policy sandbox headers in file preview handlers. The patch adds middleware.Sandbox() to these routes, which implements 'Content-Security-Policy: sandbox'. The affected controller functions handled file content delivery without this protection in vulnerable versions, allowing malicious HTML/JS files to execute when previewed. The direct correlation between the added security middleware and these handler functions in the commit diff confirms their vulnerability.