Archived, but still downloadable: an access-control gap in Memos (CVE-2026-52096)
In Memos v0.30.0 and earlier, the attachment server checked a memo's share token but never its archived status. The share link kept working on the attachments after the note was archived, which is when access was supposed to be gone. This is CVE-2026-52096, quietly fixed in v0.31.0.
Reading mode

On this page
Memos is a popular open-source, self-hosted note-taking server. Think of it as a private microblog you run on your own box. It can share a single note through a public link, and it can archive notes you want taken out of circulation. Most people assume that archiving a shared note also kills the link. For the note's attachments, it didn't.
TL;DR: In Memos v0.30.0 and earlier, the attachment file server validated a memo's share token but never checked whether the memo had been archived. Anyone holding a still-valid share link could keep downloading a memo's attachments after it was archived, which is exactly when access was supposed to be gone. The gap was closed, quietly, in v0.31.0.
Product | Memos ( |
Affected | v0.30.0 and earlier |
Fixed | v0.31.0 (2026-09-19) |
Identifier | CVE-2026-52096 · CWE-863 (Incorrect Authorization) · CVSS 3.1 score 5.3 ( |
Coordinated disclosure timeline
2026-11-06: Confirmed vulnerable in v0.28.0 through v0.30.0, and confirmed fixed in v0.31.0 by a source bisect.
2026-11-08: Public disclosure. CVE publication requested.
The issue is already fixed in current releases, so there is no embargo to worry about. The fix is just to update.
Background: two ways to reach one file
Memos has two separate ways to reach a memo's data, and that split is where the bug lives. The API layer serves memo metadata and text, and when a memo is archived, the API layer correctly stops handing it to anyone but the author. The file-server layer (server/router/fileserver/fileserver.go) serves the binary attachments at /file/attachments/:uid/:filename, and it runs its own permission check.
A public share works by adding a share_token to the link. The file server treats that token as proof you can read the attachment. What matters is what it checks before it accepts the token. In the affected versions it checked the token, but not the state of the note the token pointed at.
Root cause: a check that was missing a condition
Here is the share-token branch of checkAttachmentPermission as it shipped in v0.28.0. It runs when a request arrives with a share_token query parameter:
// Allow access if the request carries a valid, non-expired share token
// that was issued for this specific memo.
if shareToken := (*c).QueryParam("share_token"); shareToken != "" {
ms, err := s.Store.GetMemoShare(ctx, &store.FindMemoShare{UID: &shareToken})
if err == nil && ms != nil && !isMemoShareExpired(ms) && ms.MemoID == memo.ID {
return nil // access granted
}
}
It checks three things: the token exists in the store, it has not expired, and it was issued for this memo (ms.MemoID == memo.ID). All three are correct. The gap is the check that is not there. Nothing looks at the memo's row status.
RowStatus is Memos' lifecycle field, either Normal or Archived. Archiving sets it to Archived, but this function never reads it. So an archived memo with a valid, unexpired token still returns nil, and the file is served. Archiving changes the note's state everywhere except in the one check that decides whether its attachments are still downloadable.
Walking the issue
There is no clever exploitation here. It is a four-step sequence:
A memo with an attachment is shared, and you have its
share_token(you were a recipient, or it was a public link).The owner archives the memo, expecting that to revoke access.
You request
GET /file/attachments/:uid/:filename?share_token=<token>.The file server validates only the token, not the archived status, and returns the attachment.
The token is the weak point. It behaves like a long-lived bearer credential, and archiving does nothing to its lifetime. On the affected versions, the only ways to actually cut off the file are to let the token expire or to delete the memo.
Impact
Anyone who holds a previously valid, unexpired share token can do this. No account or login is needed. What leaks is the attachments of a memo whose access was supposed to be revoked by archiving: screenshots, documents, whatever was uploaded. It is a confidentiality problem only. The attacker cannot change anything, and the memo's own text is gated correctly once it is archived. The one precondition is that the share token is still valid.
That is why it lands at Medium (5.3) rather than High. It needs a valid token, and it leaks only attachments. But the moment it breaks is the exact moment a user is counting on revocation: "I shared this, then changed my mind and archived it."
The fix, and why it works
In v0.31.0, Memos finished an access-control refactor (PR #6317, "refactor: name packages by role," plus a follow-up that unified the permission logic). Authorization moved into a dedicated core/access package, and the new decision function in core/access/memo.go orders its checks like this:
viewerIsAuthor := viewerActive && ctx.Viewer.ID == memo.CreatorID
if memo.RowStatus == store.Archived && !viewerIsAuthor {
return MemoReadDecision{Denial: MemoReadDenialNotFound} // archived, non-author denied
}
shareApplies := ctx.SharedMemoID != nil && memo.ID == *ctx.SharedMemoID &&
memo.Visibility != store.SpaceAudience
if shareApplies {
return MemoReadDecision{Class: MemoReadClassPrivate} // share grant: only reached if NOT archived
}
The fix is the order. The archived check now runs before the share-token grant. If the memo is archived and you are not the author, the function returns NotFound right away, and the share token never gets a vote. The condition that was missing in v0.28.0 is now the first gate.
I bisected the releases to find the exact boundary:
Version | Released | Archived attachment still downloadable? |
|---|---|---|
v0.28.0 | 2026-04-27 | Yes |
v0.29.0 | 2026-05-27 | Yes |
v0.30.0 | 2026-07-26 | Yes |
v0.31.0 | 2026-09-19 | No. Fixed. |
26.11.0 (current) | n/a | No |
One thing worth flagging for defenders: the fix went out as a refactor, with no security advisory attached. If you are deciding whether being a few versions behind is fine, know that one of those versions quietly closed a real access-revocation hole. That silent fix is the main reason I asked for a CVE.
Remediation
If you run Memos older than v0.31.0, update. The fix is already in the current code, so there is nothing else to do. If you cannot update yet, treat share tokens as the long-lived credentials they are. Archiving will not revoke them on the affected versions, so let the share expire, or delete and recreate the memo, if you need to genuinely cut off an attachment.
Credit to the Memos maintainers, who had already done the right thing in the code. This writeup just makes the fix visible to the people who need to act on it.
CVE-2026-52096. Memos v0.30.0 and earlier. Fixed in v0.31.0. CWE-863. CVSS 5.3.



