GHSA-95q8-x6r6-672m
## Summary Lemmy applies private-community checks in `PostView` and `CommentView`, but several adjacent API views skip the accepted-follower filter. Bob, a registered user who is not an accepted follower, can read private community `sidebar` and `summary` fields. Alice, a former accepted follower, can still read saved and liked private post bodies after she leaves. An unauthenticated visitor can read private community metadata and removed private post names through the modlog. ## Details `CommunityView::read()` and `CommunityQuery::list()` call `visible_communities_only()`, but they do not add the private-community filter used by post and comment reads: ```rust query = my_local_user.visible_communities_only(query); query.first(conn).await.with_lemmy_type(LemmyErrorType::NotFound) ``` `PersonSavedCombinedQuery::list()` and `PersonLikedCombinedQuery::list()` join `community_actions`, but they only filter by the requesting person id. They do not require `community_actions.follow_state = Accepted` when the community has `visibility = Private`. The modlog query returns `ListingType::All` without a visibility predicate: ```rust query = match self.listing_type.unwrap_or(ListingType::All) { ListingType::All => query, ``` The control paths show the expected check. `PostView::read()` and `CommentView::read()` both filter private communities to accepted followers: ```rust community::visibility .ne(CommunityVisibility::Private) .or(community_actions::follow_state.eq(CommunityFollowerState::Accepted)) ``` ## Proof of Concept The following script reproduces the leak against a fresh Lemmy instance. Tested against `dessalines/lemmy:nightly` with the default setup account from the sample config. The script opens registration so it can create Alice and Bob. ```python import requests, random, string BASE = "http://127.0.0.1:8536/api/v4" # change to the target Lemmy URL ADMIN_USER = "lemmy" ADMIN_PASS = "lemmylemmy" PASSWORD = "Password123456!" def req(method, path
Properties
- ghsa_id
- GHSA-95q8-x6r6-672m
- severity
- medium
- summary
- Lemmy may expose private community data through community, saved, liked, and modlog API views
- cvss_score
- 5.3
- cve_id
- GHSA-95q8-x6r6-672m
- cvss_vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- is_ghsa_only
- true
- ghsa_published
- 2026-05-06T22:22:41Z
- source_url
- https://github.com/advisories/GHSA-95q8-x6r6-672m
- ghsa_updated
- 2026-05-07T13:20:32Z
Related Entities (4)
HAS_WEAKNESS (1)
REPORTED_BY (1)
VULNERABLE_TO (1)
AFFECTS (1)
Explore deeper with Ninja Signal's threat intelligence graph