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

> Attackers can bypass rate limits in Lemmy by spoofing the X-Forwarded-For header, enabling spam, brute-force attacks, and excessive account creation.

- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 19 Aug 2026
- **Updated:** 21 Aug 2026
- **Also known as:** GHSA-2hrg-7x4g-9vpg

## What is CVE-2026-54738?

CVE-2026-54738 is a medium-severity vulnerability in LemmyNet lemmy, published on 19 Aug 2026. An attacker can exploit it over the internet without logging in, 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-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.

Weakness: CWE-799 (Improper Control of Interaction Frequency)

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


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

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

## Is CVE-2026-54738 being exploited?

There is no known exploitation of CVE-2026-54738 in the wild and no public exploit code.

## Fix prompt for AI coding agents

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

What it is: CVE-2026-54738 is a medium-severity vulnerability in LemmyNet lemmy, published on 19 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-54738 in the wild and no public exploit code.

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-54738/ (Markdown: https://insights.sbomify.com/CVE-2026-54738/index.md)
```

## Sources

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

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