CriticalGHSA-vm84-8c4p-64hxCVE-2026-68548

Algernon: Authorization bypass on case-insensitive filesystems

Published 4 Dec 2026 · Updated 5 Dec 2026

Affected package

Affected
<1.17.10
Fixed in
1.17.10
Update to the fixed version for your release line, for example:go get github.com/xyproto/algernon@v1.17.10

We confirm your address first. See our privacy policy.

Which github.com/xyproto/algernon does your project really install?

Drop your go.mod hereWe find the exact github.com/xyproto/algernon version you install, even when another package pulls it in, and tell you if it’s affected and what to run. Free, no sign-up.

Works for private projects: the file is read in memory to run the scan and then dropped. Also reads other package files.

Public repo?

Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

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

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

Is GHSA-vm84-8c4p-64hx in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/xyproto/algernon, and gives you the command that fixes it.

More advisories for github.com/xyproto/algernon

  • LowCVE-2026-52792Algernon vulnerable to server-side script source disclosure on Windows via NTFS filename in github.com/xyproto/algernon · 7 Jul 2026
  • HighCVE-2026-52792Algernon vulnerable to server-side script source disclosure on Windows via NTFS filename · 2 Jul 2026
  • LowCVE-2026-45721Algernon: handler.lua discovery walks parent directories above the server root in github.com/xyproto/algernon · 25 Jun 2026
  • LowCVE-2026-46430Algernon: Auto-refresh SSE event server binds to all interfaces by default on Linux/macOS in github.com/xyproto/algernon · 25 Jun 2026
  • LowCVE-2026-46431Algernon: Auto-refresh SSE event server sets Access-Control-Allow-Origin: * in github.com/xyproto/algernon · 25 Jun 2026
  • LowCVE-2026-48126Algernon: Host header path traversal in --domain mode reads files and runs Lua from parent dir in github.com/xyproto/algernon · 25 Jun 2026
All 18 advisories for github.com/xyproto/algernon

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.