{"answers":{"affected":"7 open source packages ship an affected version, including github.com/go-acme/lego/v4, github.com/go-acme/lego and github.com/go-acme/lego/v3.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40611 exists.","fix":"Upgrade github.com/go-acme/lego/v4 to 4.34.0 or later.","what":"CVE-2026-40611 is a high-severity path traversal vulnerability in go-acme lego, published on 21 Apr 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-40611 and fix it if it is affected.\n\nWhat it is: CVE-2026-40611 is a high-severity path traversal vulnerability in go-acme lego, published on 21 Apr 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40611 exists.\n\nAffected packages and fixed versions:\n- github.com/go-acme/lego/v4 (Go): affected all versions; fixed in 4.34.0\n- github.com/go-acme/lego/v4 (Go): affected all versions; fixed in 4.34.0\n- github.com/go-acme/lego/v4 (Go): affected all versions; fixed in 4.34.0\n- github.com/go-acme/lego (Go): affected all versions up to 2.7.2; no fix listed\n- github.com/go-acme/lego (Go): affected all versions up to 2.7.2; no fix listed\n- github.com/go-acme/lego/v3 (Go): affected all versions up to 3.9.0; no fix listed\n- github.com/go-acme/lego/v3 (Go): affected all versions up to 3.9.0; no fix listed\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-40611/ (Markdown: https://insights.sbomify.com/CVE-2026-40611/index.md)","id":"CVE-2026-40611","markdown":"https://insights.sbomify.com/CVE-2026-40611/index.md","name":"CVE-2026-40611","record":{"aliases":["CLEANSTART-2026-KT84205","DEBIAN-CVE-2026-40611","GHSA-qqx8-2xmm-jrv8","GO-2026-5593","MINI-6p9x-gxj9-fq33","MINI-6w5j-2j73-xmf2","MINI-7r25-xqq8-xgqp","UBUNTU-CVE-2026-40611"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify","code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Go ACME library","requires_auth":"none","summary":"A malicious ACME server can exploit path traversal in the webroot provider to write arbitrary files, potentially leading to code execution.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":8.8,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"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.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Lego: Arbitrary File Write via Path Traversal in Webroot HTTP-01 Provider","id":"CVE-2026-40611","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":7,"n_references":1,"next":{"headline":"jq: Stack overflow via unbounded recursion in jv_contains","id":"CVE-2026-40612"},"packages":[{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":["2.7.2"],"package":"github.com/go-acme/lego","purl":null,"source":"GHSA-qqx8-2xmm-jrv8"},{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":["2.7.2"],"package":"github.com/go-acme/lego","purl":"pkg:golang/github.com/go-acme/lego","source":"GHSA-qqx8-2xmm-jrv8"},{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":["3.9.0"],"package":"github.com/go-acme/lego/v3","purl":null,"source":"GHSA-qqx8-2xmm-jrv8"},{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":["3.9.0"],"package":"github.com/go-acme/lego/v3","purl":"pkg:golang/github.com/go-acme/lego/v3","source":"GHSA-qqx8-2xmm-jrv8"},{"ecosystem":"Go","fixed":["4.34.0"],"introduced":["0"],"last_affected":[],"package":"github.com/go-acme/lego/v4","purl":null,"source":"GHSA-qqx8-2xmm-jrv8"},{"ecosystem":"Go","fixed":["4.34.0"],"introduced":["0"],"last_affected":[],"package":"github.com/go-acme/lego/v4","purl":"pkg:golang/github.com/go-acme/lego/v4","source":"GHSA-qqx8-2xmm-jrv8"},{"ecosystem":"Go","fixed":["4.34.0"],"introduced":["0"],"last_affected":[],"package":"github.com/go-acme/lego/v4","purl":"pkg:golang/github.com/go-acme/lego/v4","source":"GO-2026-5593"}],"prev":{"headline":"BentoML has Information Disclosure in `bentoml build` via symlink traversal in the build context","id":"CVE-2026-40610"},"products":["lego"],"published":"2026-04-21","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-07-15","vendors":["go-acme"]},"summary":"A malicious ACME server can exploit path traversal in the webroot provider to write arbitrary files, potentially leading to code execution.","url":"https://insights.sbomify.com/CVE-2026-40611/"}