# CVE-2026-54740: Lemmy: Lower-ranked federated moderator can remove higher-ranked moderators

> A lower-ranked remote moderator can remove higher-ranked moderators in Lemmy communities due to missing rank checks in ActivityPub handling.

- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 19 Aug 2026
- **Updated:** 20 Aug 2026
- **Also known as:** GHSA-xmpx-2j2f-c7g7

## What is CVE-2026-54740?

CVE-2026-54740 is a medium-severity missing authorization vulnerability in LemmyNet lemmy, published on 19 Aug 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

Lemmy is a link aggregator and forum for the fediverse. Prior to 0.19.19 and 1.0.0-alpha.18, a lower-ranked remote moderator can remove a higher-ranked moderator by sending a signed ActivityPub Remove activity to the target instance. The local API uses LocalUser::is_higher_mod_or_admin_check to enforce moderator rank, but CollectionRemove::verify in crates/apub/activities/src/community/collection_remove.rs only calls verify_mod_action. CollectionRemove::receive dereferences self.object as an ApubPerson, creates a CommunityModeratorForm, and calls CommunityActions::leave without checking that the actor outranks the moderator identified by the object field. In communities with federated moderators, a junior moderator can therefore strip senior moderators from the community moderator list even though the local API rejects the same action. This issue is fixed in versions 0.19.19 and 1.0.0-alpha.18.

Weakness: CWE-862 (Missing Authorization)

## Which versions are affected by CVE-2026-54740?


## How do I fix CVE-2026-54740?

No fix has been published for CVE-2026-54740 yet. Limit exposure of the affected software until one is available.

## Is CVE-2026-54740 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54740 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-54740 and fix it if it is affected.

What it is: CVE-2026-54740 is a medium-severity missing authorization vulnerability in LemmyNet lemmy, published on 19 Aug 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54740 exists.

Affected product: LemmyNet lemmy. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-54740/ (Markdown: https://insights.sbomify.com/CVE-2026-54740/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-54740
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-54740
- OSV: https://osv.dev/vulnerability/CVE-2026-54740

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-54740/
Summaries are generated and may contain mistakes; the official description above is the record.
