Every CVE Search/ Get API key

CVE-2025-54799

Lego does not enforce HTTPS

2.3 LowFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
High
Privileges needed
None
User interaction
Passive

What an attacker can affect

Confidentiality
High
Integrity
None
Availability
None

Exploit likelihood

0.24%Up 0.2 points since Aug 7, 2025
90%50%10%1%

What each source reports

CVE List Score used 2.3

Lego 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.

Record
CVE-2025-54799
CVSS 4.0
2.3 LowCVSS: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
Weakness
CWE-319
Updated
2026-11-02
EUVDEUVD-2025-23896 2.3

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.

Record
EUVD-2025-23896
CVSS 4.0
2.3 LowCVSS: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
Updated
2026-11-02
GitHub AdvisoriesGHSA-q82r-2j7m-9rv4 2.3

github.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

Each ACME function is accomplished by the client sending a sequence of HTTPS requests to the server [RFC2818], carrying JSON messages [RFC8259]. Use of HTTPS is REQUIRED. Each subsection of 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>

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)
		}
	}()

	_,…
Record
GHSA-q82r-2j7m-9rv4
CVSS 4.0
2.3 LowCVSS: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
Weakness
CWE-319
Updated
2026-11-02
NVD 2.3

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.

Record
CVE-2025-54799
CVSS 4.0
2.3 LowCVSS: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
Weakness
CWE-319
Updated
2026-11-02
OSV 2.3

Lego 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.

Record
CVE-2025-54799
CVSS 4.0
2.3 LowCVSS: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
Weakness
CWE-319
Updated
2026-11-02
OSVDEBIAN-CVE-2025-54799 2.3

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.

Record
DEBIAN-CVE-2025-54799
CVSS 4.0
2.3 LowCVSS: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
Updated
2026-11-02
Show 5 moreShow less
OSVGHSA-q82r-2j7m-9rv4 2.3

github.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

Each ACME function is accomplished by the client sending a sequence of HTTPS requests to the server [RFC2818], carrying JSON messages [RFC8259]. Use of HTTPS is REQUIRED. Each subsection of 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>

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)
		}
	}()

	_,…
Record
GHSA-q82r-2j7m-9rv4
CVSS 4.0
2.3 LowCVSS: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
Weakness
CWE-319
Updated
2026-11-02
OSVUBUNTU-CVE-2025-54799 2.3

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.

Record
UBUNTU-CVE-2025-54799
CVSS 4.0
2.3 LowCVSS: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
Updated
2026-11-02
OSVGO-2025-3847 No score

Github.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

Record
GO-2025-3847
Updated
2026-11-02
OSVopenSUSE-SU-2025:15434-1 No score

govulncheck-vulndb-0.0.20250811T192933-1.1 on GA media

These are all security issues fixed in the govulncheck-vulndb-0.0.20250811T192933-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2025:15434-1
Updated
2026-11-02
OSVSUSE-SU-2025:02912-1 No score

Security update for govulncheck-vulndb

This update for govulncheck-vulndb fixes the following issues:

  • Update to version 0.0.20250814T182633 2025-08-14T18:26:33Z (jsc#PED-11136)

    Go CVE Numbering Authority IDs added or updated with aliases:

    • GO-2025-3765 CVE-2024-44906 GHSA-h4h6-vccr-44h2
    • GO-2025-3829 CVE-2025-54410 GHSA-4vq8-7jfc-9cvp
  • Update to version 0.0.20250811T192933 2025-08-11T19:29:33Z (jsc#PED-11136)

    Go CVE Numbering Authority IDs added or updated with aliases:

    • GO-2025-3822 CVE-2025-53942 GHSA-9g4j-v8w5-7x42
    • GO-2025-3829 CVE-2025-54410 GHSA-4vq8-7jfc-9cvp
    • GO-2025-3830 CVE-2025-54388 GHSA-x4rx-4gw3-53p4
    • GO-2025-3831 CVE-2025-50738 GHSA-hfcf-79gh-f3jc
    • GO-2025-3832 CVE-2021-21411 GHSA-652x-m2gr-hppm
    • GO-2025-3833 CVE-2025-54576 GHSA-7rh7-c77v-6434
    • GO-2025-3834 CVE-2025-54424 GHSA-8j63-96wh-wh3j
    • GO-2025-3835 CVE-2025-54386 GHSA-q6gg-9f92-r9wg
    • GO-2025-3836 CVE-2025-6037 GHSA-6c5r-4wfc-3mcx
    • GO-2025-3837 CVE-2025-5999 GHSA-6h4p-m86h-hhgh
    • GO-2025-3838 CVE-2025-6000 GHSA-mr4h-qf9j-f665
    • GO-2025-3839 CVE-2025-6011 GHSA-mwgr-84fv-3jh9
    • GO-2025-3840 CVE-2025-6004 GHSA-qgj7-fmq2-6cc4
    • GO-2025-3841 CVE-2025-6014 GHSA-qv3p-fmv3-9hww
    • GO-2025-3842 CVE-2025-6015 GHSA-v6r4-35f9-9rpw
    • GO-2025-3843 CVE-2025-8341 GHSA-3c93-92r7-j934
    • GO-2025-3844 CVE-2025-53534 GHSA-fm3m-jrgm-5ppg
    • GO-2025-3845 CVE-2025-54801 GHSA-qx2q-88mx-vhg7
    • GO-2025-3847 CVE-2025-54799 GHSA-q82r-2j7m-9rv4
    • GO-2025-3848 CVE-2025-6013 GHSA-7rx2-769v-hrwf
    • GO-2025-3851 CVE-2025-44779 GHSA-93jv-pvg8-hf3v
    • GO-2025-3852 CVE-2025-7195 GHSA-856v-8qm2-9wjv
    • GO-2025-3853 CVE-2025-55000 GHSA-f7c3-mhj2-9pvg
    • GO-2025-3854 CVE-2025-54999 GHSA-hh28-h22f-8357
    • GO-2025-3855 CVE-2025-54998 GHSA-j3xv-7fxp-gfhx
    • GO-2025-3856 CVE-2025-55003 GHSA-rxp7-9q75-vj3p
    • GO-2025-3857 CVE-2025-54996 GHSA-vf84-mxrq-crqc
    • GO-2025-3858 CVE-2025-54997 GHSA-xp75-r577-cvhp
    • GO-2025-3859 CVE-2025-55001 GHSA-2q8q-8fgw-9p6p
  • Update to version 0.0.20250807T150727 2025-08-07T15:07:27Z (jsc#PED-11136)

    Go CVE Numbering Authority IDs added or updated with aliases:

    • GO-2025-3849 CVE-2025-47907
Record
SUSE-SU-2025:02912-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
github.com/go-acme/lego
Go
through 4.25.1 None known
github.com/go-acme/lego/v3
Go
through 4.25.1 None known
github.com/go-acme/lego/v4
Go
through 4.25.1
4.25.2
golang-github-xenolf-lego
Debian:12
All versions, plus listed versions
4.35.2-14.35.2-24.35.2-2~bpo13+14.35.2-34.35.2-3~bpo13+1
Show 4 moreShow less
4.9.1-14.9.1-24.9.1-34.9.1-4
None known
golang-github-xenolf-lego
Debian:13
All versions, plus listed versions
4.35.2-14.35.2-24.35.2-2~bpo13+14.35.2-34.35.2-3~bpo13+14.9.1-24.9.1-34.9.1-4
None known
golang-github-xenolf-lego
Debian:14
before 4.35.2-1, plus listed versions
4.9.1-24.9.1-34.9.1-4
4.35.2-1
github.com/go-acme/lego/v4
Go
before 4.25.2
4.25.2
govulncheck-vulndb
SUSE:Linux Enterprise Module for Package Hub 15 SP6
From an advisory covering 31 CVEs
before 0.0.20250814T182633-150000.1.98.1
0.0.20250814T182633-150000.1.98.1
govulncheck-vulndb
openSUSE:Leap 15.6
From an advisory covering 31 CVEs
before 0.0.20250814T182633-150000.1.98.1
0.0.20250814T182633-150000.1.98.1
golang-github-xenolf-lego
Ubuntu:18.04:LTS
All versions, plus listed versions
0.3.1-5
None known
Show 7 moreShow less
Affected packages
PackageAffectedFixed
golang-github-xenolf-lego
Ubuntu:20.04:LTS
All versions, plus listed versions
0.3.1-52.7.2+dfsg-13.2.0-1
None known
golang-github-xenolf-lego
Ubuntu:22.04:LTS
All versions, plus listed versions
3.2.0-3.14.1.3-3ubuntu14.1.3-3ubuntu1.22.04.1
None known
golang-github-xenolf-lego
Ubuntu:Pro:24.04:LTS
All versions, plus listed versions
4.9.1-1build14.9.1-24.9.1-2ubuntu0.24.04.14.9.1-2ubuntu0.24.04.24.9.1-2ubuntu0.24.04.2+esm14.9.1-2ubuntu0.24.04.34.9.1-2ubuntu0.24.04.3+esm14.9.1-2ubuntu0.24.04.3+esm2
None known
golang-github-xenolf-lego
Ubuntu:25.10
All versions, plus listed versions
4.9.1-2
None known
golang-github-xenolf-lego
Ubuntu:26.10
All versions, plus listed versions
4.9.1-44.35.2-3
None known
golang-github-xenolf-lego
Ubuntu:26.04:LTS
All versions, plus listed versions
4.9.1-24.9.1-34.9.1-4
None known
govulncheck-vulndb
openSUSE:Tumbleweed
From an advisory covering 29 CVEs
before 0.0.20250811T192933-1.1
0.0.20250811T192933-1.1

History

History
RecordedChangedSources
affected, facts
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2025-54799 is a low vulnerability (CVSS 2.3) in Go-acme Lego, published August 6, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.24%, the 14th percentile. Fixed in github.com/go-acme/lego/v4 4.25.2.

References

Show 35 moreShow less
This page doesn't list everything

Left out here: the rest of 2 source descriptions. The JSON record has them.

MoveEnter Open