# CVE-2026-45721: Algernon: handler.lua discovery walks parent directories above the server root

- Severity: Critical 9.0 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.44%, higher than 39% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-05-19T14:36:18.000Z
- Modified: 2026-07-24T11:10:00.170Z
- Also known as: GHSA-xwcr-wm99-g9jc, GO-2026-5772
- Weaknesses: CWE-20, CWE-426, CWE-552
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## 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 ., 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.

(As written by CVE List.)

## Affected

- xyproto algernon: < 1.17.7
- github.com/xyproto/algernon (Go): before 1.17.7

## Every score

- GitHub_M: CVSS:3.1 9.0 Critical `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H`
- GitHub: CVSS:3.1 9.0 Critical `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H`

## References

- <https://github.com/xyproto/algernon/security/advisories/GHSA-xwcr-wm99-g9jc> (exploit, advisory, web)
- <https://github.com/xyproto/algernon> (package)

## Sources

- CVE List: [CVE-2026-45721](https://www.cve.org/CVERecord?id=CVE-2026-45721), CVE Terms of Use, modified 2026-05-26
- GitHub Advisory Database: [GHSA-xwcr-wm99-g9jc](https://github.com/advisories/GHSA-xwcr-wm99-g9jc), CC-BY-4.0, modified 2026-06-25
- Go Vulnerability Database: [GO-2026-5772](https://pkg.go.dev/vuln/GO-2026-5772), CC-BY-4.0, modified 2026-06-25
- NVD: [CVE-2026-45721](https://nvd.nist.gov/vuln/detail/CVE-2026-45721), Public domain, modified 2026-07-24

---

Page: https://cve.day/CVE-2026-45721 · Whole record: https://cve.day/CVE-2026-45721.json · Rebuilt by cve.day 2026-11-25T22:59:22.339Z
