Skip to content
This repository was archived by the owner on Aug 31, 2026. It is now read-only.

Expired JWTs accepted under proxy auth with a custom logout page

Moderate
hacdias published GHSA-v3jv-rmh2-635j Jul 27, 2026

Package

gomod github.com/filebrowser/filebrowser/v2 (Go)

Affected versions

>= 2.50.0, <= 2.63.21

Patched versions

v2.63.22

Description

Summary

Under proxy authentication with a non-default auth.logoutPage, File Browser waives the JWT expiration inside its shared authentication middleware. An expired but validly signed token therefore keeps authenticating every protected route, administrative ones included, and can be exchanged for a fresh token at /api/renew, so a token stolen before it expired stays usable indefinitely. Reported against v2.63.2; introduced in v2.50.0 and verified through v2.63.21.

Details

In http/auth.go, renewableErr treats jwt.ErrTokenExpired as renewable whenever the auth method is proxy and the logout page is non-default, and withUser consults it on every request instead of only on a renewal path:

	token, err := request.ParseFromRequest(r, &extractor{}, keyFunc, request.WithClaims(&tk), request.WithParser(p))
	if (err != nil || !token.Valid) && !renewableErr(err, d) {
		return http.StatusUnauthorized, nil
	}

The middleware then loads the user named by the expired claims and continues. withAdmin is layered on withUser, so administrative routes inherit the behavior, and renewHandler — also built on withUser — hands out a new token.

Waiving the expiration is intentional: under proxy authentication the trusted proxy, not the token, owns the session lifetime (see #3884, which for the same reason disables the frontend idle timer in this configuration). The defect is that the waiver was granted on the strength of the token alone, without checking that the proxy still asserts that identity.

PoC

Preconditions:

  • File Browser uses proxy authentication.
  • auth.logoutPage is configured to a non-default value.
  • The attacker holds a previously valid signed token. Its permissions bound the impact.
  • Neither JWT forgery nor a bypass of the trusted proxy is required.

Steps:

  1. Start an instance with proxy authentication, a non-default logout page, and tokenExpirationTime=1s for an accelerated test.
  2. Log in through the trusted proxy header as an administrator test account and keep the issued token.
  3. Wait for the configured token lifetime to elapse.
  4. Request a protected raw file with X-Auth: <expired token>. It returns 200 with the protected content and X-Renew-Token: true.
  5. Request /api/settings with the same expired token. It returns 200.
  6. Request /api/renew with the same expired token. It returns 200 and a new token.

Impact

In the affected configuration, JWT expiration cannot end a session. A token captured before it expired continues to read protected data with the permissions it carries — administrative settings when it belongs to an administrator — and can be refreshed indefinitely.

Patches

Fixed in v2.63.22. The expiration is now waived only when the configured proxy header still names the user the token was issued for, which the trusted proxy asserts on any genuine request; an expired token presented on its own, or alongside a different identity, is rejected with 401.

Workarounds

Leave auth.logoutPage at its default value, which disables the waiver entirely and restores ordinary token expiration.

References

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N

CVE ID

CVE-2026-73611

Weaknesses

No CWEs

Credits