Algernon: Authorization bypass on case-insensitive filesystemsGHSA-vm84-8c4p-64hx
CRITICALFix: xyproto/algernon@a94f4e3GHSA-vm84-8c4p-64hx is a critical-severity (CVSS 9.4) CWE-178 vulnerability in github.com/xyproto/algernon. A fix is available for github.com/xyproto/algernon — see the affected versions and patch details below.
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA’s SSVC triage for GHSA-vm84-8c4p-64hx.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
github.com/xyproto/algernonReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
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(byteA!=a) → admin check skipped.- No
/repo//datamatch 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.Extdispatch): this bypass is in theRejected()permission-prefix matcher and requires a separate fix (case normalization of the path before prefix comparison).
Attack Chain
- Entry: unauthenticated GET
/Admin/secret.lua(or/Repo/...,/Data/...) on a Windows/macOS host. - Gate:
Rejected()iterates protected prefixes with case-sensitiveHasPrefix→ no protected match; public/prefix matches → accept. - Resolve:
URL2filename+os.OpenresolveAdmin/secret.luatoadmin/secret.luaon the case-insensitive FS. - 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)
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/xyproto/algernon | all versions | 1.17.10go get github.com/xyproto/algernon@v1.17.10 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/xyproto/algernon, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/xyproto/algernon to 1.17.10 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-vm84-8c4p-64hx is resolved across your whole dependency graph.
Workarounds
Put an independent control in front of the weakness: restrict the affected endpoint or interface to trusted networks, require an additional authentication factor or proxy-level check, and invalidate existing sessions and credentials in case the flaw has already been used.
Frequently Asked Questions
Is GHSA-vm84-8c4p-64hx in your dependencies?
Find it across Go, including transitive dependencies.