The vulnerability is rooted in improper access control across multiple API endpoints in the usememos/memos application. The security patch, identified by commit 769dcd0cf9be83d472829f6e7903b201e42f6b3c, reveals several instances where authorization checks were missing.
The most critical vulnerability, and the one highlighted by the CVE description, is in the APIV1Service.DeleteMemoReaction function. Before the patch, this function did not validate whether the user initiating the delete request was the creator of the reaction. This allowed any authenticated user, regardless of their privilege level, to delete reactions created by other users, leading to a denial of service or data manipulation scenario.
The patch addresses this by introducing an ownership check, ensuring that only the user who created the reaction or a superuser can delete it.
Furthermore, the analysis of the commit revealed that similar authorization flaws existed in other functions:
SetMemoAttachments and SetMemoRelations allowed users to modify memos they did not own.
UpdateIdentityProvider and DeleteIdentityProvider could be executed by any authenticated user, not just administrators (Host role).
GetIdentityProvider and ListIdentityProviders exposed sensitive OAuth2 client secrets to non-administrative users.
All these issues were fixed in the same commit by adding the appropriate user ownership or role-based access control checks. Therefore, exploiting this CVE would involve making a call to one of these vulnerable API endpoints, with DeleteMemoReaction being the primary example.