CVE-2023-0108: usememos/memos vulnerable to stored Cross-site Scripting
5.4
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.28561%
CWE
Published
1/7/2023
Updated
1/28/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/usememos/memos | go | < 0.10.0 | 0.10.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper Content-Type handling when serving resources. The pre-patch code in resource.go line 266-274 directly used user-controlled resource.Type to set HTTP headers, enabling XSS if a malicious resource (e.g., text/html) was stored. The patch introduced content-type validation (strings.HasPrefix checks) to mitigate this. The security middleware changes in server.go appear related to defense-in-depth rather than being the primary vulnerability source.