Track vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
9.4
CVE-2026-68548: Algernon allows admin file access on Windows/macOS
CVE-2026-68548 · published 1 day ago
Summary
Algernon's web server checks protected paths like /admin with case‑sensitive matching, but on case‑insensitive file systems (such as Windows and the default settings on macOS) a request using different letter cases bypasses those checks. This lets anyone read or run files that should be restricted, including Lua scripts in the admin area. Update the software to a version that uses case‑insensitive path checks or configure the server to run on a case‑sensitive filesystem.
What to do
- Update github.com xyproto to version 1.17.10.
Affected software
| Ecosystem | Vendor | Product | Affected versions |
|---|---|---|---|
| – | xyproto | algernon | < 1.17.10 |
| go | github.com | xyproto |
< 1.17.10 Fix: upgrade to 1.17.10
|
Original advisory text
Algernon: Authorization bypass on case-insensitive filesystems
## Summary
Algernon'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.
## Root Cause
The 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)`:
- `HasPrefix("/Admin/secret.lua", "/admin")` == `false` (byte `A` != `a`) → admin check skipped.
- No `/repo` / `/data` match either.
- The public loop then evaluates `HasPrefix("/Admin/secret.lua", "/")` == `true` (root is a default public prefix) → `return false` (accept).
The 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).
## Impact
Unauthenticated bypass of the `/admin`, `/repo`, `/data` authorization boundary on Windows and macOS deployments:
- Protected Lua under a protected prefix can be executed by requesting a case-variant path.
- Protected static content under those prefixes can be read.
This 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).
## Attack Chain
1. Entry: unauthenticated GET `/Admin/secret.lua` (or `/Repo/...`, `/Data/...`) on a Windows/macOS host.
2. Gate: `Rejected()` iterates protected prefixes with case-sensitive `HasPrefix` → no protected match; public `/` prefix matches → accept.
3. Resolve: `URL2filename` + `os.Open` resolve `Admin/secret.lua` to `admin/secret.lua` on the case-insensitive FS.
4. Sink: protected file is read/executed and returned to the unauthenticated client.
## Bypass Evidence
`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.
## Suggested Fix
Lower-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.
## Affected Versions
Algernon through v1.17.9 (latest release / HEAD).
Reported by **zx (Jace)**
Algernon'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.
## Root Cause
The 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)`:
- `HasPrefix("/Admin/secret.lua", "/admin")` == `false` (byte `A` != `a`) → admin check skipped.
- No `/repo` / `/data` match either.
- The public loop then evaluates `HasPrefix("/Admin/secret.lua", "/")` == `true` (root is a default public prefix) → `return false` (accept).
The 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).
## Impact
Unauthenticated bypass of the `/admin`, `/repo`, `/data` authorization boundary on Windows and macOS deployments:
- Protected Lua under a protected prefix can be executed by requesting a case-variant path.
- Protected static content under those prefixes can be read.
This 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).
## Attack Chain
1. Entry: unauthenticated GET `/Admin/secret.lua` (or `/Repo/...`, `/Data/...`) on a Windows/macOS host.
2. Gate: `Rejected()` iterates protected prefixes with case-sensitive `HasPrefix` → no protected match; public `/` prefix matches → accept.
3. Resolve: `URL2filename` + `os.Open` resolve `Admin/secret.lua` to `admin/secret.lua` on the case-insensitive FS.
4. Sink: protected file is read/executed and returned to the unauthenticated client.
## Bypass Evidence
`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.
## Suggested Fix
Lower-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.
## Affected Versions
Algernon through v1.17.9 (latest release / HEAD).
Reported by **zx (Jace)**
References
- https://github.com/xyproto/algernon/security/advisories/GHSA-vm84-8c4p-64hx
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/68xxx/CVE-2026-68548... Vendor Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2026-68548
- https://github.com/xyproto/algernon/commit/a94f4e37831073fe9872e6f4510d5ac16f4aa...
- https://github.com/xyproto/algernon/releases/tag/v1.17.10
- https://github.com/advisories/GHSA-vm84-8c4p-64hx
Internet-facing
3 days
Internal
60 days
- Not known to be exploited
- Can be exploited automatically
- Gives an attacker full control
Type
CWE-178Improper Handling of Case Sensitivity
CWE-863Incorrect Authorization
Timeline
Published4 Dec 2026
Updated4 Dec 2026
First seen12 Nov 2026
Track software like this
Free during beta