Lego does not enforce HTTPS
cve-program · CVE-2025-54799
PublishedLet'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.
Read the publisher's advisoryeuvd · EUVD-2025-23896
PublishedLet'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.
Read the publisher's advisorynvd · CVE-2025-54799
PublishedLet'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.
Read the publisher's advisoryosv · GHSA-q82r-2j7m-9rv4
Published## Summary It was discovered that 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. ## Details 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. This is stated in 6.1 of RFC 8555: [https://datatracker.ietf.org/doc/html/rfc8555#section-6.1](https://datatracker.ietf.org/doc/html/rfc8555#section-6.1) > Each ACME function is accomplished by the client sending a sequence > of HTTPS requests to the server [[RFC2818](https://datatracker.ietf.org/doc/html/rfc2818)], carrying JSON messages > [[RFC8259](https://datatracker.ietf.org/doc/html/rfc8259)]. Use of HTTPS is REQUIRED. Each subsection of [Section 7](https://datatracker.ietf.org/doc/html/rfc8555#section-7) > below describes the message formats used by the function and the > order in which messages are sent. 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 the library user accidentally inputs an HTTP URL, or the CA similarly misconfigures its endpoints, this will cause the relevant parts of the protocol to be performed over HTTP. This can result, at the very least, in a lost of privacy of the request/response details, such as account and request identifiers (which could be intercepted by an attacker in a privileged network position). We did not investigate whether other more serious threats could result from the ability to impersonate a CA for some of the protocol requests, but enforcing HTTPS usage is definitely the safe choice. ## Reproducing This is illustrated in the attached http_acme_test.go. Since it uses private field Core.directory, this test must be placed inside the source directory of https://github.com/go-acme/lego/v4/acme/api to run. Please note that this only checks getting the directory and creating a new account, but other ACME functions are likely impacted as well, such as creating orders, getting and checking order authorizations. <details> ```go package api import ( "crypto/ecdsa" "crypto/elliptic" "crypto/rand" "fmt" "net/http" "strings" "testing" "time" "github.com/go-acme/lego/v4/acme" ) const letsEncryptURLHTTP = "http://acme-v02.api.letsencrypt.org/directory" const letsEncryptURLHTTPS = "https://acme-v02.api.letsencrypt.org/directory" func changeToHTTP(url *string) { if strings.HasPrefix(*url, "https:") { *url = "http" + (*url)[len("https"):] } } func changeToHTTPS(url *string) { if strings.HasPrefix(*url, "http:") { *url = "https" + (*url)[len("http"):] } } func TestHTTPURLs(t *testing.T) { privateKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) if err != nil { t.Fatalf("error generating a private key: %v", err) } func() { t.Log("testing that Discover enforces https") _, err := New(&http.Client{ Transport: &httpsOnlyRoundTripper{inner: http.DefaultTransport}, Timeout: 20 * time.Second, }, "", letsEncryptURLHTTP, "", privateKey) if err != nil { t.Errorf("New error: %v", err) } }() core, err := New(&http.Client{ Transport: &httpsOnlyRoundTripper{inner: http.DefaultTransport}, Timeout: 20 * time.Second, }, "", letsEncryptURLHTTPS, "", privateKey) if err != nil { t.Fatalf("New error: %v", err) } func() { t.Log("testing that account creation enforces https") // Simulate a misconfigured CA that gives out HTTP directory URLs and when // we're done change it back to HTTPS to test the rest. changeToHTTP(&core.directory.NewAccountURL) defer changeToHTTPS(&core.directory.NewAccountURL) _, err := core.Accounts.New(acme.Account{ TermsOfServiceAgreed: true, Contact: []string{}, }) if err != nil { t.Errorf("core.Accounts.New error: %v", err) } }() _, err = core.Accounts.New(acme.Account{ TermsOfServiceAgreed: true, Contact: []string{}, }) if err != nil { t.Fatalf("core.Accounts.New error: %v", err) } } type httpsOnlyRoundTripper struct { inner http.RoundTripper } func (r *httpsOnlyRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { if req.URL.Scheme != "https" { return nil, fmt.Errorf("non-https request is being sent") } return r.inner.RoundTrip(req) } ``` </details> _
Read the publisher's advisoryosv · GO-2025-3847
PublishedGithub.com/go-acme/lego/v4/acme/api does not enforce HTTPS in github.com/go-acme/lego
Read the publisher's advisoryAffected versions, risk and source history
Exploitation and risk
Source statusCISA KEV lists vulnerabilities known to be exploited. FIRST EPSS estimates the likelihood of exploitation in the next 30 days. An unavailable score does not mean zero risk.
Which CVEs have scores here?
This view includes predictions for CVE identifiers explicitly listed in public NuGet advisories. Microsoft release pages have their own prediction coverage. Check source status for the scope and latest checks.
No exploitation or prediction data is available here for these CVEs. This does not mean they are safe or unlikely to be exploited.
cve-program · CVE-2025-54799
PublishedLego does not enforce HTTPS
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.
- Source published
- 7 Aug 2025 00:04:14 UTC
- Source modified
- 7 Aug 2025 14:07:32 UTC
- Saved here
- 23 Oct 2026 15:48:27 UTC
- Source terms
- CVE Program Terms of Use
Original source record · Cite this exact observation · Complete original publisher JSON
Source: cve-program · CVE Program Terms of Use. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS 4.0 · 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
euvd · EUVD-2025-23896
PublishedLet'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 cl…
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.
Additional publisher context
EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.
Original publisher date fields
datePublished: Aug 7, 2025, 12:04:14 AM
dateUpdated: Aug 7, 2025, 2:07:32 PM
1 related source bulletins · separate from aliases
openSUSE-SU-2025:15434-1: govulncheck-vulndb-0.0.20250811T192933-1.1 on GA media
CVE-2021-21411 · CVE-2025-44779 · CVE-2025-50738 · CVE-2025-53534 · CVE-2025-53942 · CVE-2025-54386 · CVE-2025-54388 · CVE-2025-54410 · CVE-2025-54424 · CVE-2025-54576 · CVE-2025-54799 · CVE-2025-54801 · CVE-2025-54996 · CVE-2025-54997 · CVE-2025-54998 · CVE-2025-54999 · CVE-2025-55000 · CVE-2025-55001 · CVE-2025-55003 · CVE-2025-5999 · CVE-2025-6000 · CVE-2025-6004 · CVE-2025-6011 · CVE-2025-6013 · CVE-2025-6014 · CVE-2025-6015 · CVE-2025-6037 · CVE-2025-7195 · CVE-2025-8341
- Source published
- Aug 7, 2025, 12:04:14 AM (timezone not stated)
- Source modified
- Aug 7, 2025, 2:07:32 PM (timezone not stated)
- Saved here
- 15 Nov 2026 04:36:11 UTC
- Source terms
- ENISA EUVD · source terms and attribution apply
Original source record · Cite this exact observation · Complete original publisher JSON
Source: euvd · ENISA EUVD · source terms and attribution apply. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
EUVD CVSS 4.0 · 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
nvd · CVE-2025-54799
PublishedLet'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 cl…
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.
Additional publisher context
NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.
Source analysis status: Deferred
Weakness classifications: CWE-319
Original publisher date fields
published: 2025-08-07T01:15:26.370
lastModified: 2026-06-17T09:40:43.547
- Source published
- 7 Aug 2025 01:15:26 UTC
- Source modified
- 17 Jun 2026 09:40:43 UTC
- Saved here
- 25 Oct 2026 03:17:11 UTC
- Source terms
- NIST NVD usage terms; underlying source attribution retained
Original source record · Cite this exact observation · Complete original publisher JSON
Source: nvd · NIST NVD usage terms; underlying source attribution retained. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS 4.0 · [email protected] · Secondary · 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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
osv · GHSA-q82r-2j7m-9rv4
Publishedgithub.com/go-acme/lego/v4/acme/api does not enforce HTTPS
## Summary It was discovered that 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. ## Details 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. This is stated in 6.1 of RFC 8555: [https://datatracker.ietf.org/doc/html/rfc8555#section-6.1](https://datatracker.ietf.org/doc/html/rfc8555#section-6.1) > Each ACME function is accomplished by the client sending a sequence > of HTTPS requests to the server [[RFC2818](https://datatracker.ietf.org/doc/html/rfc2818)], carrying JSON messages > [[RFC8259](https://datatracker.ietf.org/doc/html/rfc8259)]. Use of HTTPS is REQUIRED. Each subsection of [Section 7](https://datatracker.ietf.org/doc/html/rfc8555#section-7) > below describes the message formats used by the function and the > order in which messages are sent. 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 the library user accidentally inputs an HTTP URL, or the CA similarly misconfigures its endpoints, this will cause the relevant parts of the protocol to be performed over HTTP. This can result, at the very least, in a lost of privacy of the request/response details, such as account and request identifiers (which could be intercepted by an attacker in a privileged network position). We did not investigate whether other more serious threats could result from the ability to impersonate a CA for some of the protocol requests, but enforcing HTTPS usage is definitely the safe choice. ## Reproducing This is illustrated in the attached http_acme_test.go. Since it uses private field Core.directory, this test must be placed inside the source directory of https://github.com/go-acme/lego/v4/acme/api to run. Please note that this only checks getting the directory and creating a new account, but other ACME functions are likely impacted as well, such as creating orders, getting and checking order authorizations. <details> ```go package api import ( "crypto/ecdsa" "crypto/elliptic" "crypto/rand" "fmt" "net/http" "strings" "testing" "time" "github.com/go-acme/lego/v4/acme" ) const letsEncryptURLHTTP = "http://acme-v02.api.letsencrypt.org/directory" const letsEncryptURLHTTPS = "https://acme-v02.api.letsencrypt.org/directory" func changeToHTTP(url *string) { if strings.HasPrefix(*url, "https:") { *url = "http" + (*url)[len("https"):] } } func changeToHTTPS(url *string) { if strings.HasPrefix(*url, "http:") { *url = "https" + (*url)[len("http"):] } } func TestHTTPURLs(t *testing.T) { privateKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) if err != nil { t.Fatalf("error generating a private key: %v", err) } func() { t.Log("testing that Discover enforces https") _, err := New(&http.Client{ Transport: &httpsOnlyRoundTripper{inner: http.DefaultTransport}, Timeout: 20 * time.Second, }, "", letsEncryptURLHTTP, "", privateKey) if err != nil { t.Errorf("New error: %v", err) } }() core, err := New(&http.Client{ Transport: &httpsOnlyRoundTripper{inner: http.DefaultTransport}, Timeout: 20 * time.Second, }, "", letsEncryptURLHTTPS, "", privateKey) if err != nil { t.Fatalf("New error: %v", err) } func() { t.Log("testing that account creation enforces https") // Simulate a misconfigured CA that gives out HTTP directory URLs and when // we're done change it back to HTTPS to test the rest. changeToHTTP(&core.directory.NewAccountURL) defer changeToHTTPS(&core.directory.NewAccountURL) _, err := core.Accounts.New(acme.Account{ TermsOfServiceAgreed: true, Contact: []string{}, }) if err != nil { t.Errorf("core.Accounts.New error: %v", err) } }() _, err = core.Accounts.New(acme.Account{ TermsOfServiceAgreed: true, Contact: []string{}, }) if err != nil { t.Fatalf("core.Accounts.New error: %v", err) } } type httpsOnlyRoundTripper struct { inner http.RoundTripper } func (r *httpsOnlyRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { if req.URL.Scheme != "https" { return nil, fmt.Errorf("non-https request is being sent") } return r.inner.RoundTrip(req) } ``` </details> _
- Source published
- 6 Aug 2025 17:08:52 UTC
- Source modified
- 10 Sep 2026 03:50:27 UTC
- Saved here
- 24 Oct 2026 13:19:41 UTC
- Source terms
- GitHub Advisory Database · CC-BY-4.0
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · GitHub Advisory Database · CC-BY-4.0. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS_V4 · 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
Publisher rating · LOW
osv · GO-2025-3847
PublishedGithub.com/go-acme/lego/v4/acme/api does not enforce HTTPS in github.com/go-acme/lego
Github.com/go-acme/lego/v4/acme/api does not enforce HTTPS in github.com/go-acme/lego
- Source published
- 11 Aug 2025 17:25:05 UTC
- Source modified
- 4 Feb 2026 04:28:55 UTC
- Saved here
- 24 Oct 2026 13:19:41 UTC
- Source terms
- OSV · upstream source license applies
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · OSV · upstream source license applies. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.