cve.bz

CVE-2026-40611 go-acme lego: Path traversal

8.8 highEPSS 0.4%Fix available

High (8.8) in go-acme lego. EPSS 0.4% estimated probability of exploitation activity in the next 30 days. Fixed in github.com/go-acme/lego/v4 4.34.0.

On this page
Let's Encrypt client and ACME library written in Go (Lego). Prior to 4.34.0, the webroot HTTP-01 challenge provider in lego is vulnerable to arbitrary file write and deletion via path traversal. A malicious ACME server can supply a crafted challenge token containing ../ sequences, causing lego to write attacker-influenced content to any path writable by the lego process. This vulnerability is fixed in 4.34.0.

Severity

CVSS 3.1

8.8 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
0.4% (unchanged from 0.4% a week ago; 0.5% 30 days ago) estimated probability of exploitation activity in the next 30 days; 39th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: total, assessed 2026-04-21. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-22 Improper Limitation of a Pathname to a Restricted Directory (Path traversal)
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-40611 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-40611?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-40611?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-40611 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
go-acme lego< 4.34.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-qqx8-2xmm-jrv8Gogithub.com/go-acme/lego/v4<4.34.04.34.0
GHSA-qqx8-2xmm-jrv8Gogithub.com/go-acme/lego/v3<=3.9.0no fix published
GHSA-qqx8-2xmm-jrv8Gogithub.com/go-acme/lego<=2.7.2no fix published
GO-2026-5593Gogithub.com/go-acme/lego/v4<4.34.04.34.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13golang-github-xenolf-legono fix listedDEBIAN-CVE-2026-40611
Debian14golang-github-xenolf-lego4.35.2-1DEBIAN-CVE-2026-40611
Ubuntu18.04:LTS, 20.04:LTS, 22.04:LTS and 4 moregolang-github-xenolf-legono fix listedUBUNTU-CVE-2026-40611
SUSELinux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0govulncheck-vulndb0.0.20260727T201416-160000.1.1SUSE-SU-2026:23216-1 SUSE-SU-2026:23227-1
openSUSELeap 16.0govulncheck-vulndb0.0.20260727T201416-160000.1.1openSUSE-SU-2026:21551-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE.

Red Hat

Red Hat rates this Important.

Red Hat's statement

The `lego` client, utilized in Red Hat OpenShift Dev Spaces, is susceptible to a path traversal vulnerability within its webroot HTTP-01 challenge provider. A malicious ACME server could exploit this flaw by sending a specially crafted challenge token, enabling arbitrary file write or deletion on the system running `lego`. The impact of this flaw is directly limited to the level of privileges the process running the `lego` client has, since the attacker would be able to create, write or delete only files that the lego's running UID has permission to perform the analogue operation.

To exploit this vulnerability the user needs to be tricked to connect to a malicious ACME server or the attacker needs to firstly compromise the ACME server to send the crafted challenge token in order to trigger the path traversal vulnerability.

Red Hat's mitigation

To mitigate this issue, ensure that the `lego` client only interacts with trusted ACME servers. Additionally, run the `lego` process with the least necessary privileges and in a restricted environment to limit the potential impact of arbitrary file operations. This may involve containerization or specific filesystem access controls.

ProductPackageStateAdvisory
Red Hat OpenShift Dev Spaces 3.28devspaces/traefik-rhel9:1779786779Fixed 2026-05-28RHSA-2026:21772

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-40611.

Attack patterns (CAPEC)

  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-126 Path Traversal Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON