CVE-2022-4686: usememos/memos Authorization Bypass Through User-Controlled Key vulnerability
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.12804%
CWE
Published
12/23/2022
Updated
6/27/2023
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| github.com/usememos/memos | go | < 0.9.0 | 0.9.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from structs used in PATCH request handlers (MemoPatch, ResourcePatch, ShortcutPatch, UserPatch) having their ID fields exposed to user input via JSON deserialization. Prior to the patch, these structs lacked the json:"-" tag, allowing attackers to inject an ID parameter in requests. The associated handler functions (not explicitly named in the diff) would then process these user-controlled IDs without proper authorization checks, enabling resource modification bypass. The patch mitigates this by excluding the ID field from JSON parsing.