CVE-2026-54740
Executive Summary
CVE-2026-54740 is a privilege escalation vulnerability in Lemmy, an open-source link aggregator and forum platform deployed on the Fediverse (ActivityPub-based social web). The flaw allows a lower-ranked remote moderator to remove higher-ranked moderators from a community moderator list by sending a crafted signed ActivityPub Remove activity, bypassing rank checks that the local API enforces. Affected versions are prior to 0.19.19 and 1.0.0-alpha.18. An attacker requires moderate privileges (low-privilege authenticated account on a federated instance) and network access; exploitation is trivial from a technical standpoint (AC:L), with no user interaction required. The impact is limited to integrity (I:H) — unauthorized moderator removals can disrupt community administration — but no confidentiality or availability impact. The vulnerability is currently assessed as unpatched in widely deployed versions, though the vendor has indicated fixes in newer releases; organizations running affected versions should treat this as a priority integrity risk.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Technical Analysis
CVE-2026-54740 resides in Lemmy's ActivityPub federation handling code. The flaw stems from inconsistent privilege enforcement between two code paths: the local REST API and the ActivityPub message processing pipeline.
Vulnerability class: CWE-862 — Missing Authorization. The software fails to enforce moderator rank hierarchy when processing inbound federated ActivityPub Remove activities targeting community moderator lists.
Local API enforcement (correct behavior): The Lemmy local API validates moderator rank changes through LocalUser::is_higher_mod_or_admin_check, which ensures that the actor initiating a moderator removal outranks the moderator being removed. This check prevents junior moderators from removing senior ones through the normal web interface or REST API.
Federated ActivityPub path (vulnerable behavior): When Lemmy receives a signed ActivityPub CollectionRemove activity, the federation layer invokes CollectionRemove::verify (in crates/apub/activities/src/community/collection_remove.rs). This handler calls verify_mod_action, which likely only validates that the actor is a moderator of the community — not that the actor's rank exceeds the rank of the moderator identified in the object field (i.e., the moderator being removed). The rank comparison enforced in the local API path is absent in this federated path.
Processing chain: Upon receiving a CollectionRemove activity, CollectionRemove::receive dereferences self.object as an ApubPerson (the target moderator), constructs a CommunityModeratorForm, and invokes CommunityActions::leave — effectively removing the targeted moderator from the community moderator list — without performing the rank comparison that the local API would enforce.
Why the check is missing: The CollectionRemove::verify implementation only confirms that the signer holds moderator status on the target community. It does not call is_higher_mod_or_admin_check or an equivalent rank-ordering function. This is a classic authorization enforcement gap introduced by having two distinct code paths (local API and ActivityPub ingestion) that each independently handle the same logical operation, with the federation path implementing weaker validation.
Attack surface: Any Lemmy instance with federated communities (i.e., communities with moderators from multiple instances) exposes this flaw. The vulnerable component is the ActivityPub inbox handler, reachable at the instance's federation endpoint. The attacker must be a moderator of a federated community but at a lower rank than the target moderator they wish to remove. This can include moderators from a remote instance that participates in shared community moderation.
Technical insufficient detail: The NVD description names specific functions and file paths (CollectionRemove::verify, CollectionRemove::receive, LocalUser::is_higher_mod_or_admin_check, crates/apub/activities/src/community/collection_remove.rs, CommunityModeratorForm, CommunityActions::leave) but does not provide packet-level or HTTP-header-level specifics. The exact HTTP endpoint path for ActivityPub inbox delivery is not disclosed in the available data; this report therefore refrains from inventing one.
Exploitation Scenarios
No public Proof-of-Concept or exploit code is currently available. The attack chain below is inferred from the vulnerability class, the CWE-862 root cause, and the ActivityPub protocol mechanics described in the NVD entry.
1) Reconnaissance / Target Identification
- The attacker identifies a Lemmy instance running a version prior to 0.19.19 or 1.0.0-alpha.18. This can be achieved by inspecting the instance's exposed metadata (e.g.,
/api/v3/siteor similar public endpoints that expose version information) or by fingerprinting Lemmy-specific API responses. - The attacker then identifies a community on that instance that has federated moderators — i.e., moderators whose accounts originate from different Fediverse instances. This information is typically visible on the community's public moderator list.
- The attacker must hold a moderator position (any rank) in that community. If the attacker runs their own Lemmy instance, they can create a user account on that instance, have it granted moderator status (possibly by social engineering or by leveraging existing moderation assignments from trusted communities).
2) Triggering the Flaw
- The attacker constructs a signed ActivityPub
Removeactivity in JSON-LD format, addressed to the target community's inbox on the victim instance. - The activity's
actorfield is set to the attacker's moderator identity (from their home instance). Theobjectfield contains the URI of the senior moderator'sApubPersonidentity (the target victim). Thetargetfield specifies the community. - The activity is signed using the attacker's private ActivityPub key (HTTP Signature or similar), so the victim instance can verify authenticity.
- The attacker dispatches this activity to the victim instance's ActivityPub inbox endpoint.
3) Execution Mechanism (Vulnerability-Class Level)
- The victim instance's ActivityPub processor receives the signed
Removeactivity and invokesCollectionRemove::verify. The verification passes because the attacker's identity resolves to a valid moderator of the target community (rank check is missing). CollectionRemove::receivethen dereferences theobjectfield to identify the senior moderator, constructs aCommunityModeratorForm, and callsCommunityActions::leave— removing the senior moderator from the community's moderator list.- The local API's
is_higher_mod_or_admin_checkis bypassed entirely because the action never traverses the local API path.
4) Post-Exploitation Impact
- The senior moderator loses moderator privileges on the target community. This may allow the attacker to subsequently: remove additional moderators (cascade), alter community settings, modify or delete posts/comments, control community visibility, or install a sympathetic moderator team.
- The integrity of the community's moderation structure is compromised, likely causing administrative disruption and reputational damage to the community/instance.
- The attacker's actions are logged as legitimate federated activities, complicating forensic attribution. The victim instance operators may not immediately recognize the action as malicious.
Impact Assessment
Business Impact: Lemmy is used for community forums, interest groups, and collaborative platforms across the Fediverse. This vulnerability enables privilege escalation among moderator ranks, allowing unauthorized removal of senior moderators. For commercial or organizational users running Lemmy instances, this can lead to: loss of administrative control over community governance, unauthorized content management, disruption of community operations, and reputational damage. The integrity impact is rated High (I:H) per the CVSS vector.
Affected Systems: All Lemmy instances running versions prior to 0.19.19 (stable releases) and prior to 1.0.0-alpha.18 (pre-release). Instances with federated community moderation are specifically exposed; single-instance communities without cross-instance moderator assignments are less affected because the attacker must hold a moderator badge in the same community.
Blast Radius: The vulnerability is exploitable by any authenticated moderator (low-privilege) in a federated community, including moderators hosted on entirely different Fediverse instances. The attack requires only network access to the victim instance's ActivityPub inbox. Because the flaw is in the federation layer, the entire Fediverse ecosystem is the theoretical attack surface — any community with remote moderators is at risk.
CVSS Subscore Analysis (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N — Score 6.5):
- Attack Vector: Network (AV:N) — exploitable remotely.
- Attack Complexity: Low (AC:L) — no special conditions; crafted ActivityPub activities are straightforward.
- Privileges Required: Low (PR:L) — attacker needs a moderator account, but that is a low-privilege position.
- User Interaction: None (UI:N) — no victim interaction needed.
- Scope: Unchanged (S:U) — impact confined to the affected instance (the community), not affecting the broader Fediverse infrastructure.
- Confidentiality: None — no data disclosure.
- Integrity: High (I:H) — unauthorized removal of moderators; the affected community's administrative structure is altered.
- Availability: None — the instance remains available.
EPSS Score: Not yet scored by FIRST.org; no exploitation-in-the-wild activity data available at this time.
Detection Guidance
Sigma Rule
The following Sigma rule detects unusual ActivityPub Remove activities targeting community moderator collections, which may indicate CVE-2026-54740 exploitation attempts. HTTP POST to the ActivityPub inbox with a Remove action targeting a moderator collection is the signature event.
title: Lemmy ActivityPub Remove Activity Targeting Moderator Collection
id: 8d7f2c4e-9b1a-4f6d-8c3e-2a5b9d7f1c4e
status: experimental
description: Detects inbound ActivityPub Remove activities directed at a community's moderator collection, which may indicate CVE-2026-54740 exploitation (lower-ranked moderator removing senior moderator).
author: Valtersit Threat Intelligence
date: 2026/06/01
logsource:
category: web
product: lemmy
service: apub
detection:
selection:
http.method: POST
http.url|contains: '/inbox'
apub.activity.type: 'Remove'
apub.activity.target|contains: '/moderators'
apub.activity.actor|notcontains: '<admin_identity>'
filter_known_admin:
apub.activity.actor|contains: 'admin'
condition: selection and not filter_known_admin
level: high
falsepositives:
- Legitimate moderator removals performed by higher-ranked moderators
- Automated moderation tools
tags:
- attack.t1190
- cve.2026.54740
YARA Rule
The following YARA rule scans Lemmy log files or captured network payloads for the presence of a Remove ActivityPub activity targeting a moderators collection, which is indicative of exploitation.
rule Lemmy_CVE_2026_54740_RemoveActivity
{
meta:
author = "Valtersit Threat Intelligence"
description = "Detect ActivityPub Remove activity targeting Lemmy community moderator collections (CVE-2026-54740)"
date = "2026-06-01"
severity = "high"
cve = "CVE-2026-54740"
strings:
$a = "CollectionRemove" ascii wide
$b = "\"type\":\"Remove\"" ascii wide
$c = "/moderators" ascii wide
$d = "CommunityModeratorForm" ascii wide
$e = "is_higher_mod_or_admin_check" ascii wide
condition:
uint16(0) == 0x7B7B or uint32(0) == 0x0A0D0A7D or filesize > 0
and 2 of them
}
Suricata IDS Rule
This rule alerts on HTTP POST requests to the Lemmy ActivityPub inbox that contain a Remove activity referencing a moderator collection. Adjust destination ports and paths to match your deployment.
alert http any any -> $LEMMY_INSTANCES any (
msg:"ET EXPLOIT CVE-2026-54740 Lemmy ActivityPub Remove Activity against Moderator Collection";
flow:established,to_server;
http.method; content:"POST"; http.uri; content:"inbox"; nocase;
http.request_body; content:"\"type\":\"Remove\""; nocase;
http.request_body; content:"moderators"; nocase;
http.request_body; content:"CollectionRemove"; nocase;
classtype:attempted-admin;
sid:202654740;
rev:1;
metadata:created_at 2026_06_01, updated_at 2026_06_01;
)
Elastic Detection
Elastic EQL rule to detect ActivityPub Remove activities in HTTP request bodies that target moderator collections, based on structured JSON fields parsed into Elasticsearch indexed logs.
sequence by host.id, source.ip with maxspan=30s
[ network where event.category == "network" and network.protocol == "http"
and http.request.method == "POST" and url.path == "/inbox"
and event.action == "request" ]
[ file where event.category == "file" and process.name exists
and file.extension == "log"
and string(process.args) like "*lemmy*"
and string(process.args) like "*apub*"
and any(file.name, (
string(file.contents) like "*CollectionRemove*"
and string(file.contents) like "*Remove*"
and string(file.contents) like "*moderators*"
)) ]
Splunk SPL Query
Search Splunk for HTTP requests to Lemmy ActivityPub endpoints containing Remove activities that target moderator lists. Adjust sourcetype and index names as appropriate.
index=web sourcetype=access_combined OR sourcetype=iis
| where method="POST" AND match(uri, ".*(inbox|apub).*")
| rex field=_raw ".*\"type\":\"(?<apub_type>[^\"]+)\".*"
| where apub_type="Remove"
| rex field=_raw ".*\"object\":\"(?<target_user>[^\"]+)\".*"
| rex field=_raw ".*\"actor\":\"(?<actor>[^\"]+)\".*"
| rex field=_raw ".*(?<target_collection>.*/moderators.*)"
| where isnotnull(target_collection)
| table _time, src_ip, method, uri, actor, target_user, target_collection
| sort - _time
Wazuh OSSEC Rule
Wazuh XML rule to detect Lemmy ActivityPub Remove activities targeting moderator collections in application logs.
<group name="lemmy,">
<rule id="100547" level="12">
<decoded_as>json</decoded_as>
<field name="activity_type">Remove</field>
<field name="target" type="pcre2">.*moderators.*</field>
<match>CollectionRemove</match>
<description>Potential CVE-2026-54740 exploitation: ActivityPub Remove activity targeting moderator collection in Lemmy</description>
<group>cve_2026_54740,</group>
<mitre>
<id>T1190</id>
</mitre>
</rule>
</group>
Mitigation & Patch Guidance
Current Patch Confidence: 0/4 — UNPATCHED. No patch evidence from any tracked source has been confirmed. The vendor has stated in the CVE entry that fixed versions 0.19.19 and 1.0.0-alpha.18 are released, but the patch-confidence tracking system reports no verified patch source. This is ambiguous — treat this as a high-priority item to verify directly with your instance's upgrade path.
1) Immediate Mitigations (short-term risk reduction):
- Upgrade immediately to Lemmy 0.19.19 (stable) or 1.0.0-alpha.18 (pre-release) if available from your package repository or Docker image. Verify the upgrade against your installation's configuration.
- Restrict federated moderation: If upgrading is not immediately possible, consider temporarily disabling federation for communities with remote moderators or removing remote moderators from community moderator lists until the upgrade is applied. This reduces the attack surface (the flaw requires federated remote moderator status).
- Network-layer filtering: Configure firewall or reverse-proxy rules to restrict inbound ActivityPub POST requests to trusted/known federated instances. Note that this may break legitimate federation.
- Monitor moderation logs: Deploy SIEM/behavioral monitoring (see Detection Guidance) to alert on any
Removeactivity targeting moderator collections.
2) Patch/Upgrade Steps:
- Determine your current Lemmy version:
lemmy --versionor check the Docker image tag. - Check release notes for 0.19.19 and 1.0.0-alpha.18 to confirm the fix addresses the
CollectionRemove::verifyrank-check omission. - For Docker deployments: pull the updated
dessalines/lemmyimage and recreate containers; verify database migrations run properly. - For native deployments: follow the project's upgrade documentation to
git pullthe tagged release and rebuild. - Verify the fix by attempting to reproduce the vulnerability in a staging environment (if feasible) before rolling out to production.
3) Long-Term Hardening:
- Enable automatic update checks for your Lemmy instance; subscribe to the project's release announcements and security mailing list.
- Audit community moderator structures: Ensure that moderation teams are small, trusted, and do not grant moderator badges to accounts you do not fully control.
- Harden the ActivityPub inbox: Implement rate-limiting and input validation on the inbox endpoint to mitigate rapid-fire removal attempts.
- Defense-in-depth: If you run Lemmy behind a reverse proxy (e.g., Nginx/Caddy), add WAF rules that block HTTP requests with
Removeactivities in the body unless theactorfield matches a known high-ranked moderator of the target community. - Monitor CVE databases for additional details and any published exploits for CVE-2026-54740; re-assess risk when EPSS scores become available.
References
- NVD Entry: CVE-2026-54740 — https://nvd.nist.gov/vuln/detail/CVE-2026-54740 (official NVD record; includes CVSS vector and description).
- Lemmy Project Releases — https://github.com/LemmyNet/lemmy/releases (official release notes for versions 0.19.19 and 1.0.0-alpha.18; verify patch details).
- Lemmy Source Code — CollectionRemove Activity Handler — https://github.com/LemmyNet/lemmy/blob/main/crates/apub/activities/src/community/collection_remove.rs (source file referenced in the NVD description; review the
verifyandreceivelogic). - MITRE CWE-862 — Missing Authorization — https://cwe.mitre.org/data/definitions/862.html (vulnerability class reference).
- CISA Known Exploited Vulnerabilities Catalog — https://www.cisa.gov/known-exploited-vulnerabilities-catalog (checked 2026-06-01; CVE-2026-54740 not listed, confirming no confirmed exploitation in the wild).
Threat Actor Campaign: No known threat actor campaigns or exploit-in-the-wild evidence have been observed for CVE-2026-54740 as of this writing. EPSS score is not yet available. Continue to monitor FIRST.org EPSS and vendor advisories for updates.
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.