critical

CVE-2026-68548

Go · github.com/xyproto/algernon

Summary

Algernon: Authorization bypass on case-insensitive filesystems

Severity
critical
CVSS
9.4
EPSS
0.8% (p56)
CWE
CWE-178, CWE-863
Also known as
GHSA-vm84-8c4p-64hx
Published
2026-12-04
Updated
2026-12-04

Advisory details

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):

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:

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

Related advisories

Is your project exposed to this? Stateward checks every dependency on every pull request and flags it only if your code actually reaches it.

Check my repo

Summarize with AI

ChatGPTClaudePerplexity

Sources: CISA KEV (public domain), OSV.dev & GitHub Advisory Database (CC-BY-4.0), FIRST EPSS, NVD/CWE (public domain). Served live from the Stateward advisory database.