{"id":"CVE-2026-68548","aliases":["GHSA-vm84-8c4p-64hx"],"url":"https://o3.security/vulnerability/CVE-2026-68548","summary":"Algernon: Case-insensitive filesystem lets unauthenticated requests bypass /admin,/repo,/data permission-prefix gate","details":"## Summary\nAlgernon's URL-prefix authorization gate matches its protected prefixes (`/admin`, `/repo`, `/data`) with **case-sensitive** `strings.HasPrefix`, while the exact same raw `req.URL.Path` is later resolved against the filesystem. On case-insensitive filesystems (Windows NTFS — always; macOS APFS/HFS+ — default), a request for `/Admin/secret.lua` evades every protected-prefix check, falls through to the public-prefix accept branch, and then resolves on disk to `admin/secret.lua`. The result is an **unauthenticated bypass** of the `/admin`, `/repo`, and `/data` authorization boundary, enabling read (and, for Lua files, execution) of protected content. The permission system is active in the **default** configuration.\n\n## Root Cause\nThe permission gate `Rejected()` (default BoltDB backend: `vendor/github.com/xyproto/permissionbolt/v2/permissionbolt.go:118-149`; identical logic in `vendor/github.com/xyproto/permissions/permissions.go:136-171`) iterates protected prefixes with byte-exact `strings.HasPrefix(req.URL.Path, prefix)`:\n- `HasPrefix(\"/Admin/secret.lua\", \"/admin\")` == `false` (byte `A` != `a`) → admin check skipped.\n- No `/repo` / `/data` match either.\n- The public loop then evaluates `HasPrefix(\"/Admin/secret.lua\", \"/\")` == `true` (root is a default public prefix) → `return false` (accept).\n\nThe identical mixed-case `req.URL.Path` is passed to `utils.URL2filename` (`engine/handlers.go:591`) and then to `os.Stat` / `os.Open` via `datablock.Exists`. On a case-insensitive filesystem the OS resolves `Admin/secret.lua` to the real `admin/secret.lua`. No case normalization occurs anywhere between the authorization gate and the filesystem read (the `ToLower` at `handlers.go:143` is applied only to compute the MIME extension, after the gate).\n\n## Impact\nUnauthenticated bypass of the `/admin`, `/repo`, `/data` authorization boundary on Windows and macOS deployments:\n- Protected Lua under a protected prefix can be executed by requesting a case-variant path.\n- Protected static content under those prefixes can be read.\nThis is distinct from the NTFS alternate-data-stream / trailing-character source-disclosure issue (which lives in `FilePage`/`filepath.Ext` dispatch): this bypass is in the `Rejected()` permission-prefix matcher and requires a separate fix (case normalization of the path before prefix comparison).\n\n## Attack Chain\n1. Entry: unauthenticated GET `/Admin/secret.lua` (or `/Repo/...`, `/Data/...`) on a Windows/macOS host.\n2. Gate: `Rejected()` iterates protected prefixes with case-sensitive `HasPrefix` → no protected match; public `/` prefix matches → accept.\n3. Resolve: `URL2filename` + `os.Open` resolve `Admin/secret.lua` to `admin/secret.lua` on the case-insensitive FS.\n4. Sink: protected file is read/executed and returned to the unauthenticated client.\n\n## Bypass Evidence\n`Rejected()` uses byte-exact `strings.HasPrefix`; no `ToLower` is applied to the path before prefix comparison. The existing NTFS-filename advisory's fix (rejecting `:`, trailing dot, trailing space in `FilePage`) does not normalize case and does not block this vector. Verified at HEAD.\n\n## Suggested Fix\nLower-case (or otherwise canonicalize) `req.URL.Path` before comparing against protected prefixes in `Rejected()`, or refuse to serve files whose on-disk resolved path differs in case from the requested path.\n\n## Affected Versions\nAlgernon through v1.17.9 (latest release / HEAD).\n\nReported by **zx (Jace)**","published":"2026-11-12T19:39:10.279Z","modified":"2026-11-14T02:47:39.071979269Z","cvss":{"score":9.4,"severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L"},"epss":{"score":0.00754,"percentile":0.56456,"asOf":"2026-12-04"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Go","name":"github.com/xyproto/algernon","fixedVersion":"1.17.10"}],"fix":{"url":"https://github.com/xyproto/algernon/commit/a94f4e37831073fe9872e6f4510d5ac16f4aa7da","label":"xyproto/algernon@a94f4e3"},"references":[{"type":"WEB","url":"https://github.com/xyproto/algernon/releases/tag/v1.17.10"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/68xxx/CVE-2026-68548.json"},{"type":"ADVISORY","url":"https://github.com/xyproto/algernon/security/advisories/GHSA-vm84-8c4p-64hx"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-68548"},{"type":"WEB","url":"https://github.com/xyproto/algernon/commit/a94f4e37831073fe9872e6f4510d5ac16f4aa7da"},{"type":"PACKAGE","url":"https://github.com/xyproto/algernon"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-11-14T02:47:39.071979269Z"}}