You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fixes GHSA-6m5c-fv2q-jrj2
The unauthenticated ConPtyShell.ps1 exemption in BasicAuthMiddleware and
InvisibleBasicAuthMiddleware only matched on the `conpty` query key and the
request path. It did not restrict the HTTP method and did not require `conpty`
to be the sole query parameter, so an attacker could append `?conpty` to reach
the full authenticated API surface anonymously (?bulk webroot read, ?goshs-info,
?ws, ?catcher-api, ?cbDown, ?embedded) and issue unauthenticated PUT/DELETE
writes — a critical auth bypass on servers started with -b/--basic-auth or
-ca/--cert-auth.
Scope the exemption to its intended use via a shared conPtyExempt() helper: a
GET/HEAD of exactly /ConPtyShell.ps1 whose only query parameter is `conpty`.
The generated upgrade URL (/ConPtyShell.ps1?conpty) still serves without
credentials; every other method or extra feature key falls through to auth.
Adds regression tests in middleware_test.go pinning the exemption boundaries
for both middlewares.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* README
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
0 commit comments