Lego does not enforce HTTPS
go-acme lego
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| github.com/go-acme/lego Go |
| No fix yet |
| github.com/go-acme/lego/v3 Go |
| No fix yet |
| github.com/go-acme/lego/v4 Go |
|
go-acme lego
| Product | Affected | Fixed in |
|---|---|---|
| github.com/go-acme/lego Go |
| No fix yet |
| github.com/go-acme/lego/v3 Go |
| No fix yet |
| github.com/go-acme/lego/v4 Go |
|
4.25.2Let'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.
From the CVE record · GitHub_M
The ACME API package does not enforce HTTPS for the configured CA URL or endpoints returned by a CA. If either uses HTTP, a network attacker can observe ACME request and response details, including account and request identifiers. No authentication or victim interaction is described as necessary for the attacker.
Check deployments using github.com/go-acme/lego/v4 before 4.25.2 or github.com/go-acme/lego and github.com/go-acme/lego/v3 through 4.25.1.