CVE-2023-0111: usememos/memos vulnerable to stored Cross-site Scripting
5.4
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.30269%
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 key vulnerability stemmed from how resources were served. In the pre-patch version, server/resource.go directly set Content-Type from user-controlled resource.Type values. This allowed attackers to upload resources with dangerous MIME types (like text/html) that browsers would execute. The patch added validation (strings.HasPrefix checks) to force text/plain for text/application types, mitigating XSS. The function handling resource responses (registerResourcePublicRoutes) was the injection point for malicious content.