# CVE-2025-24806: Regulation applies separately to Username-based logins to Email-based logins in authelia

> Attackers can bypass login attempt limits by alternating between username and email logins, facilitating brute-force attacks against weak passwords.

- **Severity:** Low 2.3 (`CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 19 Feb 2025
- **Updated:** 19 Feb 2025
- **Also known as:** GHSA-m5mf-3963-4x26, GO-2025-3468

## What is CVE-2025-24806?

CVE-2025-24806 is a low-severity vulnerability in authelia, published on 19 Feb 2025. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

Authelia is an open-source authentication and authorization server providing two-factor authentication and single sign-on (SSO) for applications via a web portal. If users are allowed to sign in via both username and email the regulation system treats these as separate login events. This leads to the regulation limitations being effectively doubled assuming an attacker using brute-force to find a user password. It's important to note that due to the effective operation of regulation where no user-facing sign of their regulation ban being visible either via timing or via API responses, it's effectively impossible to determine if a failure occurs due to a bad username password combination, or a effective ban blocking the attempt which heavily mitigates any form of brute-force. This occurs because the records and counting process for this system uses the method utilized for sign in rather than the effective username attribute. This has a minimal impact on account security, this impact is increased naturally in scenarios when there is no two-factor authentication required and weak passwords are used. This makes it a bit easier to brute-force a password. A patch for this issue has been applied to versions 4.38.19, and 4.39.0. Users are advised to upgrade. Users unable to upgrade should 1. Not heavily modify the default settings in a way that ends up with shorter or less frequent regulation bans. The default settings effectively mitigate any potential for this issue to be exploited. and 2. Disable the ability for users to login via an email address.

Weakness: CWE-307 (Improper Restriction of Excessive Authentication Attempts)

## Which versions are affected by CVE-2025-24806?

4 open source packages ship an affected version, including github.com/authelia/authelia/v4 and github.com/authelia/authelia.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/authelia/authelia/v4` | Go | All versions | 4.38.19 |
| `github.com/authelia/authelia/v4` | Go | All versions | 4.38.19 |
| `github.com/authelia/authelia/v4` | Go | All versions | 4.38.19 |
| `github.com/authelia/authelia` | Go | All versions | None |

## How do I fix CVE-2025-24806?

Upgrade github.com/authelia/authelia/v4 to 4.38.19 or later.

## Is CVE-2025-24806 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-24806 and fix it if it is affected.

What it is: CVE-2025-24806 is a low-severity vulnerability in authelia, published on 19 Feb 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-24806 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/authelia/authelia/v4 (Go): affected all versions; fixed in 4.38.19
- github.com/authelia/authelia/v4 (Go): affected all versions; fixed in 4.38.19
- github.com/authelia/authelia/v4 (Go): affected all versions; fixed in 4.38.19
- github.com/authelia/authelia (Go): affected all versions; 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/CVE-2025-24806/ (Markdown: https://insights.sbomify.com/CVE-2025-24806/index.md)
```

## Sources

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

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