CVE-2026-54738

Lemmy: Rate limit bypass via X-Forwarded-For header spoofing in actix-web ConnectionInfo

Published Aug 19, 2026 CVSS 3.1 · 6.5 Medium EPSS < 1% KEV · Not listed
Description
Lemmy is a link aggregator and forum for the fediverse. Prior to 0.19.19 and 1.0.0-beta.1, actix-web ConnectionInfo::realip_remote_addr reads the first value of X-Forwarded-For as the client address used by raw_ip_key in crates/utils/src/rate_limit/mod.rs. Lemmy's bundled docker/nginx.conf uses $proxy_add_x_forwarded_for instead of $remote_addr, which appends the real client address to an X-Forwarded-For value supplied by the client. An unauthenticated attacker can therefore place a different spoofed address first on each request and receive a new rate-limit bucket, bypassing limits on POST /api/v4/account/auth/register, POST /api/v4/account/auth/login, POST /api/v4/post, POST /api/v4/comment, GET /api/v4/search, POST /api/v4/image, and POST /api/v4/account/import_settings. This permits excessive account creation, brute-force attempts, spam, scraping, uploads, and repeated imports. This issue is fixed in versions 0.19.19 and 1.0.0-beta.1.

Analysis

AI-generated

Technical impact

Lemmy’s rate‑limiting logic incorrectly trusts the X‑Forwarded‑For header, allowing any attacker to prepend a spoofed IP address. This user‑controlled input incorrectly populates the bucket key, creating a new rate‑limit bucket for each distinct spoofed address. The result is a bypass of rate limits on several crucial endpoints, such as account registration, login, posting, commenting, image uploads, searches, and settings imports, enabling excessive account creation, credential stuffing, spam, and continuous scraping. The vulnerability is categorized under CWE‑799 for improper handling of user‑controlled data that can pollute server‑side state.

Affected Systems

The flaw exists in LemmyNet:lemmy releases before version 0.19.19 and 1.0.0‑beta.1. The bundled Docker and Nginx configuration uses the $proxy_add_x_forwarded_for variable, which appends the real client address, allowing the attacker’s spoofed value to be placed first in the list processed by Lemmy’s rate‑limiting module.

Risk and Exploitability

The CVSS score of 6.5 indicates moderate severity, and the vulnerability is exploitable via standard HTTP requests that can be crafted by an unauthenticated attacker in the public network. EPSS data is not available, and the issue is not currently listed in the CISA KEV catalog. However, because the flaw permits uncontrolled resource consumption and facilitates credential‑stuffing and spam operations, the overall risk can be significant, especially for publicly exposed instances that do not enforce trusted proxy settings or complementary rate‑limit controls.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Lemmy to version 0.19.19 or later, 1.0.0‑beta.1 or higher, which includes the fixed rate‑limiting logic.
  • Reconfigure the Docker‑based Nginx setup to replace $proxy_add_x_forwarded_for with $remote_addr or to suppress the X‑Forwarded‑For header coming from untrusted clients.
  • Add an additional layer of IP‑based throttling or trust‑based validation so that only requests with a valid, proxied client IP are used for rate‑limit calculations.

Generated by OpenCVE AI on August 20, 2026 at 11:07 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Lemmynet
Lemmynet lemmy
Vendors & Products Lemmynet
Lemmynet lemmy
Type Values Removed Values Added
Description Lemmy is a link aggregator and forum for the fediverse. Prior to 0.19.19 and 1.0.0-beta.1, actix-web ConnectionInfo::realip_remote_addr reads the first value of X-Forwarded-For as the client address used by raw_ip_key in crates/utils/src/rate_limit/mod.rs. Lemmy's bundled docker/nginx.conf uses $proxy_add_x_forwarded_for instead of $remote_addr, which appends the real client address to an X-Forwarded-For value supplied by the client. An unauthenticated attacker can therefore place a different spoofed address first on each request and receive a new rate-limit bucket, bypassing limits on POST /api/v4/account/auth/register, POST /api/v4/account/auth/login, POST /api/v4/post, POST /api/v4/comment, GET /api/v4/search, POST /api/v4/image, and POST /api/v4/account/import_settings. This permits excessive account creation, brute-force attempts, spam, scraping, uploads, and repeated imports. This issue is fixed in versions 0.19.19 and 1.0.0-beta.1.
Title Lemmy: Rate limit bypass via X-Forwarded-For header spoofing in actix-web ConnectionInfo
Weaknesses CWE-799
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L'}

Weaknesses
  • CWE-799

    Improper Control of Interaction Frequency

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 21, 2026, 9:48 PM
Reserved
Jun 15, 2026, 11:07 PM
Status
Deferred
Published
Aug 19, 2026, 9:16 PM
Modified
Sep 9, 2026, 9:15 PM