Skip to content

← Actionable
High, CVSS 8.8

ACME Lego: Arbitrary File Write via Path Traversal in Webroot HTTP-01 Provider

CVE-2026-40611GHSA-qqx8-2xmm-jrv8

What to do

Partial vendor fix. Follow the primary source's mitigation guidance and check back for a fix.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • Go github.com/go-acme/lego/v3

    Affected
    <= 3.9.0
    Fixed in
    no fixed version recorded
  • Go github.com/go-acme/lego/v4

    Affected
    < 4.34.0
    Fixed in
    4.34.0
  • Go github.com/go-acme/lego

    Affected
    <= 2.7.2
    Fixed in
    no fixed version recorded

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
8.8 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
  • CVE-2026-40611: 0.42% estimated exploitation activity in the next 30 days; percentile 36.22 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary 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. Details The ChallengePath() function in challenge/http01/httpchallenge.go:26-27 constructs the challenge file path by directly concatenating the ACME token without any validation: The webroot provider in providers/http/webroot/webroot.go:31 then joins this with the configured webroot directory and writes the key authorization content to the resulting path: RFC 8555 Section 8.3 specifies that ACME tokens must only contain characters from the base64url alphabet ([A-Za-z0-9-]), but this constraint is never enforced anywhere in the codebase. When a malicious ACME server returns a token such as ../../../../../../tmp/evil, filepath.Join() resolves the .. components, producing a path outside…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 1 · created ·

    Published from ghsa record GHSA-qqx8-2xmm-jrv8

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-40611

Advisory: ACME Lego: Arbitrary File Write via Path Traversal in Webroot HTTP-01 Provider
IDs: CVE-2026-40611, GHSA-qqx8-2xmm-jrv8
Record: https://patchnext.com/advisories/cve-2026-40611 (revision 1, source checked 26 Oct 2026, 15:19 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: High (CVSS 8.8)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Partial vendor fix; fixed versions by package: github.com/go-acme/lego/v4 4.34.0. A vendor fix does not mean a deployment is fixed.

## Affected components
- Go github.com/go-acme/lego/v3: affected <= 3.9.0
- Go github.com/go-acme/lego/v4: affected < 4.34.0; fixed in 4.34.0
- Go github.com/go-acme/lego: affected <= 2.7.2

## Suggested inspection (read-only)
- Go github.com/go-acme/lego/v3: check the installed version with your package manager.
- Go github.com/go-acme/lego/v4: check the installed version with your package manager.
- Go github.com/go-acme/lego: check the installed version with your package manager.

## Supported action
No complete vendor fix is recorded. Follow the primary source's mitigation guidance and check this record again before closing anything.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on github.com/go-acme/lego/v3, github.com/go-acme/lego/v4, github.com/go-acme/lego.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-qqx8-2xmm-jrv8 (GitHub-reviewed advisory GHSA-qqx8-2xmm-jrv8 lists affected ranges: Go github.com/go-acme/lego/v4 >=0 =0 =0 <=2.7.2)

Commands are suggestions: review each one before running it.

Loading voting…