CVE-2022-4609: Memos Cross-site Scripting vulnerability
5.4
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.48507%
CWE
Published
12/19/2022
Updated
2/1/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.8.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the lack of filename validation in the resource upload handler. The patch in commit 726285e adds a check for .html extensions in server/resource.go, indicating the vulnerable code was in the anonymous handler function for the POST route (registered in registerResourceRoutes). This handler processed user-uploaded files without sanitizing filenames, enabling XSS via HTML file uploads. The high confidence comes from the direct correlation between the patch location and the CWE-79 XSS weakness description.