{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-45721","id":"CVE-2026-45721","title":"Algernon: handler.lua discovery walks parent directories above the server root","description":"Algernon is a small self-contained pure-Go web server. Prior to 1.17.7, when Algernon is asked for any URL path that resolves to a directory without an index file, DirPage walks upward through parent directories — past the configured server root — looking for a file named handler.lua to execute as the request handler. The loop terminates only after 100 ancestor steps or when filepath.Dir returns .","descriptionLong":"Algernon is a small self-contained pure-Go web server. Prior to 1.17.7, when Algernon is asked for any URL path that resolves to a directory without an index file, DirPage walks upward through parent directories — past the configured server root — looking for a file named handler.lua to execute as the request handler. The loop terminates only after 100 ancestor steps or when filepath.Dir returns ., so on any absolute server-root path the search reaches the filesystem root (/ on Unix, drive letter on Windows). The first handler.lua it finds is loaded into the Lua interpreter with the full Algernon API exposed — including run3(), httpclient, os.execute, io.popen, PQ, MSSQL, raw filesystem access, and the userstate database. Any process that can write handler.lua anywhere in a parent directory of the server root obtains pre-authenticated remote code execution on the next HTTP request. This is reachable without authentication — the lookup happens before the permission check returns a hit (the perm system only gates URL prefixes, not the handler-resolution step), and any URL pointing at a directory without an index triggers the walk. On a fresh stock Algernon install the request GET / is enough. This vulnerability is fixed in 1.17.7.","published":"2026-05-26T16:34:49.985Z","updated":"2026-10-28T02:31:04.955441839Z","reserved":"2026-05-13T05:51:48.666Z","status":"Deferred","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"GitHub_M"},"metrics":[{"version":"3.1","score":9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"GitHub_M"},{"version":"3.1","score":9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"github.com"},{"version":"3.1","score":9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"OSV"},{"version":"3.1","score":9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"GitHub"}],"rating":"critical","products":["xyproto algernon"],"affectedProducts":[{"vendor":"xyproto","product":"algernon","defaultStatus":null,"versions":[{"version":"< 1.17.7","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"Go","name":"github.com/xyproto/algernon","purl":"pkg:golang/github.com/xyproto/algernon","ranges":["<1.17.7"],"fixed":["1.17.7"],"advisory":"GHSA-xwcr-wm99-g9jc"}],"cwes":["CWE-20","CWE-426","CWE-552"],"aliases":["GHSA-xwcr-wm99-g9jc","GO-2026-5772"],"references":[{"url":"https://github.com/xyproto/algernon/security/advisories/GHSA-xwcr-wm99-g9jc","tags":["x_refsource_CONFIRM","exploit","advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/45xxx/CVE-2026-45721.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45721","tags":["advisory"]},{"url":"https://github.com/xyproto/algernon","tags":["package"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total"},"epss":0.00437,"epssPercentile":0.38608,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-45721","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45721","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-45721","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-xwcr-wm99-g9jc","ok":true,"note":"GHSA-xwcr-wm99-g9jc"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-45721","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}