# CVE-2025-54799: Lego does not enforce HTTPS

> Attackers can intercept ACME protocol traffic if HTTP URLs are used, exposing sensitive account and request identifiers due to missing HTTPS enforcement.

- **Severity:** Low 2.3 (`CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:U`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 7 Aug 2025
- **Updated:** 7 Aug 2025
- **Also known as:** CLEANSTART-2026-HZ83743, DEBIAN-CVE-2025-54799, GHSA-q82r-2j7m-9rv4, GO-2025-3847, MINI-2mv5-3crg-jv2p, MINI-fg45-x2pv-34gp, UBUNTU-CVE-2025-54799

## What is CVE-2025-54799?

CVE-2025-54799 is a low-severity vulnerability in go-acme lego, published on 7 Aug 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

Let's Encrypt client and ACME library written in Go (Lego). In versions 4.25.1 and below, the github.com/go-acme/lego/v4/acme/api package (thus the lego library and the lego cli as well) don't enforce HTTPS when talking to CAs as an ACME client. Unlike the http-01 challenge which solves an ACME challenge over unencrypted HTTP, the ACME protocol requires HTTPS when a client communicates with the CA to performs ACME functions. However, the library fails to enforce HTTPS both in the original discover URL (configured by the library user) and in the subsequent addresses returned by the CAs in the directory and order objects. If users input HTTP URLs or CAs misconfigure endpoints, protocol operations occur over HTTP instead of HTTPS. This compromises privacy by exposing request/response details like account and request identifiers to network attackers. This was fixed in version 4.25.2.

Weakness: CWE-319 (Cleartext Transmission of Sensitive Information)

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

7 open source packages ship an affected version, including github.com/go-acme/lego/v4, github.com/go-acme/lego and github.com/go-acme/lego/v3.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/go-acme/lego/v4` | Go | All versions | 4.25.2 |
| `github.com/go-acme/lego/v4` | Go | All versions | 4.25.2 |
| `github.com/go-acme/lego/v4` | Go | All versions | 4.25.2 |
| `github.com/go-acme/lego` | Go | All versions to 4.25.1 | None |
| `github.com/go-acme/lego` | Go | All versions to 4.25.1 | None |
| `github.com/go-acme/lego/v3` | Go | All versions to 4.25.1 | None |
| `github.com/go-acme/lego/v3` | Go | All versions to 4.25.1 | None |

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

Upgrade github.com/go-acme/lego/v4 to 4.25.2 or later.

## Is CVE-2025-54799 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2025-54799 is a low-severity vulnerability in go-acme lego, published on 7 Aug 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2025-54799 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/go-acme/lego/v4 (Go): affected all versions; fixed in 4.25.2
- github.com/go-acme/lego/v4 (Go): affected all versions; fixed in 4.25.2
- github.com/go-acme/lego/v4 (Go): affected all versions; fixed in 4.25.2
- github.com/go-acme/lego (Go): affected all versions up to 4.25.1; no fix listed
- github.com/go-acme/lego (Go): affected all versions up to 4.25.1; no fix listed
- github.com/go-acme/lego/v3 (Go): affected all versions up to 4.25.1; no fix listed
- github.com/go-acme/lego/v3 (Go): affected all versions up to 4.25.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/CVE-2025-54799/ (Markdown: https://insights.sbomify.com/CVE-2025-54799/index.md)
```

## Sources

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

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