CVE-2025-53826: Github.com/filebrowser/filebrowser File Browser’s Insecure JWT Handling Vulnerability

HIGH
Advisory Identifier: GHSA-7xwp-2cpp-p8r7
CWE-613 CWE-384 CWE-305
Published
Advisory Summary

CVE-2025-53826 is a HIGH file browser’s insecure jwt handling vulnerability (CWE-613: Insufficient Session Expiration) affecting Github.com/filebrowser/filebrowser libraries in the Go ecosystem. The issue involves file browser’s insecure jwt handling can lead to session replay attacks after logout. Remediation is available in the latest vendor maintenance releases.

CVE-2025-53826 at a Glance

CVE Identifier CVE-2025-53826
GHSA Identifier GHSA-7xwp-2cpp-p8r7
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-613: Insufficient Session Expiration
Affected Product Github.com/filebrowser/filebrowser
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2025-53826

To remediate this vulnerability, upgrade all affected Github.com/filebrowser/filebrowser dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/filebrowser/filebrowser fixed: Latest secure release
Upgrade github.com/filebrowser/filebrowser to Latest secure release
github.com/filebrowser/filebrowser/v2 fixed: Latest secure release
Upgrade github.com/filebrowser/filebrowser/v2 to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/filebrowser/filebrowser

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-53826, inspect your project dependencies for Github.com/filebrowser/filebrowser:

inspect dependencies for github.com/filebrowser/filebrowser

Analyze the terminal output to locate any version of Github.com/filebrowser/filebrowser in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-613: Insufficient Session Expiration, where according to wasc, "insufficient session expiration is when a web site permits an attacker to reuse old session credentials or session ids for authorization.". In Github.com/filebrowser/filebrowser, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary File Browser’s authentication system issues long-lived JWT tokens that remain valid even after the user logs out. Please refer to the CWE's listed in this report for further reference and system standards. In summary, the main issue is: - Tokens remain valid after logout (session replay attacks) In this report, I used docker as the documentation instruct: ``` docker run \ -v filebrowser_data:/srv \ -v filebrowser_database:/database \ -v filebrowser_config:/config \ -p 8080:80 \ filebrowser/filebrowser ``` ### Details **Issue: Tokens remain valid after logout (session replay attacks)** After logging in and receiving a JWT token, the user can explicitly "log out." However, this action does not invalidate the issued JWT. Any captured token can be replayed post-logout until it expires naturally. The backend does not track active sessions or invalidate existing tokens on logout. Login request: ``` POST /api/login HTTP/1.1 Host: machine.local:8090 Content-Length: 69 {"username":"admin","password":"password-here","recaptcha":""} ``` The check found in the code `https://github.com/filebrowser/filebrowser/blob/master/http/auth.go` is not enough. There is no server-side blacklist or token invalidation on logout. Token renewal and validity only depends on expiry and user store timestamps: ``` expired := !tk.VerifyExpiresAt(time.Now().Add(time.Hour), true) updated := tk.IssuedAt != nil && tk.IssuedAt.Unix() < d.store.Users.LastUpdate(tk.User.ID) ``` ### PoC **Issue: Tokens remain valid after logout (session replay attacks)** - Login and capture the generate JWT. Eg. the http request: ``` POST /api/login HTTP/1.1 Host: machine.local:8090 Content-Length: 69 {"username":"admin","password":"password-here","recaptcha":""} ``` - Logout in the dashboard. And then try to use the old generated JWT to access any authenticated endpoint eg: ``` GET /api/resources HTTP/1.1 Host: machine.local:8090 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 X-Auth: Old-JWT-token-here Content-Length: 173 Accept: */* Referer: http://machine.local:8090/files/ Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.9 Content-Length: 26 Connection: keep-alive ``` ### Impact - A valid JWT remains active after user logout. - If stolen, tokens persist access indefinitely until expiry. - Violates OWASP Top 10 A2:2021 - Broken Authentication. ### Recommendations - Read all CWE's attached in this report - Invalidate JWTs on logout via session store / token blacklist. - Reduce JWT ExpiresAt where possible or use short-lived + refresh tokens.

CVE-2025-53826 Affected Github.com/filebrowser/filebrowser Versions

2 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
github.com/filebrowser/filebrowser
Go
≤ 2.39.0
github.com/filebrowser/filebrowser/v2
Go
≤ 2.39.0

References

Frequently Asked Questions

What is CVE-2025-53826?
CVE-2025-53826 is a security vulnerability in Github.com/filebrowser/filebrowser involving File Browser’s insecure JWT handling can lead to session replay attacks after logout under CWE-613: Insufficient Session Expiration.
Which Github.com/filebrowser/filebrowser versions are affected?
Affected versions include releases prior to current release patches across affected packages: github.com/filebrowser/filebrowser, github.com/filebrowser/filebrowser/v2.
What version fixes CVE-2025-53826?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/filebrowser/filebrowser affected?
Yes, github.com/filebrowser/filebrowser is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
Is github.com/filebrowser/filebrowser/v2 affected?
Yes, github.com/filebrowser/filebrowser/v2 is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2025-53826?
CVE-2025-53826 is classified under CWE-613: Insufficient Session Expiration (According to WASC, "Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization.").
How can I check Go dependencies for CVE-2025-53826?
Run the dependency tree command: 'inspect dependencies for github.com/filebrowser/filebrowser'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7xwp-2cpp-p8r7",
  "modified" : "2025-07-29T23:17:56Z",
  "published" : "2025-07-16T14:09:28Z",
  "aliases" : [ "CVE-2025-53826" ],
  "summary" : "File Browser’s insecure JWT handling can lead to session replay attacks after logout",
  "details" : "### Summary\n\nFile Browser’s authentication system issues long-lived JWT tokens that remain valid even after the user logs out. Please refer to the CWE's listed in this report for further reference and system standards. In summary, the main issue is:\n\n- Tokens remain valid after logout (session replay attacks)\n\nIn this report, I used docker as the documentation instruct:\n\n```\ndocker run \\\n    -v filebrowser_data:/srv \\\n    -v filebrowser_database:/database \\\n    -v filebrowser_config:/config \\\n    -p 8080:80 \\\n    filebrowser/filebrowser\n```\n\n### Details\n\n**Issue: Tokens remain valid after logout (session replay attacks)**\n\nAfter logging in and receiving a JWT token, the user can explicitly \"log out.\" However, this action does not invalidate the issued JWT. Any captured token can be replayed post-logout until it expires naturally. The backend does not track active sessions or invalidate existing tokens on logout. Login request:\n\n```\nPOST /api/login HTTP/1.1\nHost: machine.local:8090\nContent-Length: 69\n\n{\"username\":\"admin\",\"password\":\"password-here\",\"recaptcha\":\"\"}\n```\n\nThe check found in the code `https://github.com/filebrowser/filebrowser/blob/master/http/auth.go` is not enough. There is no server-side blacklist or token invalidation on logout. Token renewal and validity only depends on expiry and user store timestamps:\n\n```\nexpired := !tk.VerifyExpiresAt(time.Now().Add(time.Hour), true)\nupdated := tk.IssuedAt != nil && tk.IssuedAt.Unix() < d.store.Users.LastUpdate(tk.User.ID)\n```\n\n### PoC\n\n**Issue: Tokens remain valid after logout (session replay attacks)**\n\n- Login and capture the generate JWT. Eg. the http request:\n\n```\nPOST /api/login HTTP/1.1\nHost: machine.local:8090\nContent-Length: 69\n\n{\"username\":\"admin\",\"password\":\"password-here\",\"recaptcha\":\"\"}\n```\n\n- Logout in the dashboard. And then try to use the old generated JWT to access any authenticated endpoint eg:\n\n```\nGET /api/resources HTTP/1.1\nHost: machine.local:8090\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36\nX-Auth: Old-JWT-token-here\nContent-Length: 173\nAccept: */*\nReferer: http://machine.local:8090/files/\nAccept-Encoding: gzip, deflate, br\nAccept-Language: en-US,en;q=0.9\nContent-Length: 26\n\nConnection: keep-alive\n```\n\n### Impact\n\n- A valid JWT remains active after user logout.\n- If stolen, tokens persist access indefinitely until expiry.\n- Violates OWASP Top 10 A2:2021 - Broken Authentication.\n\n### Recommendations\n\n- Read all CWE's attached in this report\n- Invalidate JWTs on logout via session store / token blacklist.\n- Reduce JWT ExpiresAt where possible or use short-lived + refresh tokens.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/filebrowser/filebrowser"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "2.39.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/filebrowser/filebrowser/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "2.39.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/filebrowser/filebrowser/security/advisories/GHSA-7xwp-2cpp-p8r7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-53826"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/filebrowser/filebrowser/issues/5216"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/filebrowser/filebrowser"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-305", "CWE-384", "CWE-613" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-07-16T14:09:28Z",
    "nvd_published_at" : "2025-07-15T18:15:24Z"
  }
}