Skip to main content
Vulnerability Database/CVE-2026-110103

CVE-2026-110103: bbs-go Stored XSS Vulnerability

CVE-2026-110103 is a stored XSS vulnerability in bbs-go through version 4.4.6 that lets authenticated users upload malicious HTML or SVG files. This article covers the technical details, affected versions, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-110103 Overview

CVE-2026-110103 is a stored cross-site scripting (XSS) vulnerability in bbs-go through version 4.4.6, a Go-based forum application. Authenticated users can upload HTML or SVG files by spoofing the multipart Content-Type header in requests to POST /api/upload. The /res endpoint then serves these attacker-controlled documents inline, allowing script execution on the forum's origin. An attacker can share the resulting URL with administrators to run arbitrary JavaScript in a privileged session context. The weakness is classified as [CWE-79] (Improper Neutralization of Input During Web Page Generation).

Critical Impact

Authenticated attackers can achieve stored XSS targeting administrators, leading to session compromise and takeover of forum administrative functions.

Affected Products

  • bbs-go through version 4.4.6
  • Component: internal/handlers/api/upload_handlers.go upload handler
  • Component: internal/pkg/uploader/uploader.go uploader logic

Discovery Timeline

  • 2026-10-13 - CVE-2026-110103 published to NVD
  • 2026-10-14 - Last updated in NVD database

Technical Details for CVE-2026-110103

Vulnerability Analysis

The vulnerability resides in the file upload pipeline of bbs-go. The POST /api/upload endpoint trusts the Content-Type value supplied in the multipart form part rather than validating file content through server-side inspection. An authenticated user can submit an HTML or SVG payload while declaring an image MIME type in the multipart section header. The uploader accepts the file and stores it under the public /res path.

When the file is later requested, the server returns it with an inline Content-Disposition and a response Content-Type that permits browser rendering as HTML or SVG. Browsers then execute embedded <script> tags or SVG event handlers in the forum's own origin. Because the payload is persisted and served from the trusted domain, any administrator who follows the link in a private message executes the attacker's script with their session cookies.

Root Cause

The root cause is reliance on the client-supplied multipart Content-Type for upload validation. The handler in upload_handlers.go and the storage logic in uploader.go do not perform magic-byte sniffing or extension allowlisting before writing the file. Scriptable formats such as text/html and image/svg+xml are not rejected, and the /res static route serves them inline instead of forcing a download.

Attack Vector

Exploitation requires a low-privileged authenticated account on the target forum and some user interaction from a victim. An attacker crafts a multipart POST request to /api/upload containing an HTML or SVG payload with a spoofed Content-Type: image/png header on the file part. After upload, the server returns a /res/... URL. The attacker sends this URL via private message or forum post to an administrator, whose browser executes the payload against the forum origin on click.

The security fix introduced in pull request #306 adds cryptographic primitives for setup-token handling and defensive content handling. The patch imports crypto/rand, crypto/subtle, and encoding/hex to support install.EnsureSetupToken() during server initialization:

go
	"bbs-go/internal/services"
	"bbs-go/migrations"
	"context"
	"crypto/rand"
	"crypto/subtle"
	"encoding/hex"
	"errors"
	"fmt"
	"log"

Server initialization in internal/server/init.go ensures a setup token exists on subsequent boots:

go
			panic(err)
		}
		install.InitOthers()
	} else {
		if _, err := install.EnsureSetupToken(); err != nil {
			panic(err)
		}
	}
}

Source: GitHub Commit 5bebf98

Detection Methods for CVE-2026-110103

Indicators of Compromise

  • Files stored under /res with .html, .htm, .svg, or .xhtml extensions despite image-type upload declarations.
  • HTTP responses from /res/* carrying Content-Type: text/html or image/svg+xml with Content-Disposition: inline.
  • POST /api/upload requests where the multipart part Content-Type and actual file magic bytes disagree.
  • Admin session activity originating from URLs pointing to recently uploaded resources.

Detection Strategies

  • Inspect upload logs for mismatches between declared MIME type and sniffed file content on /api/upload.
  • Scan the /res object store for files whose magic bytes indicate HTML or SVG rather than image formats.
  • Monitor web access logs for administrators retrieving /res URLs shortly after low-privileged users upload files.

Monitoring Recommendations

  • Enable request/response logging on the forum reverse proxy and alert when /res/* is served with a scriptable Content-Type.
  • Track upload volume and file type distribution per user account to flag anomalous SVG or HTML submissions.
  • Correlate newly uploaded resource URLs with private message traffic directed to privileged users.

How to Mitigate CVE-2026-110103

Immediate Actions Required

  • Upgrade bbs-go to a version containing the fix from pull request #306 as soon as it is tagged.
  • Audit the /res directory for existing HTML, SVG, or XHTML files and remove any that are not legitimate.
  • Rotate administrator session cookies and credentials if evidence of XSS exploitation is found.

Patch Information

The fix is delivered in Pull Request #306 and merged in commit 5bebf98. See the VulnCheck Advisory for bbs-go and GitHub Issue #305 for background. Apply the patched release and redeploy before re-enabling public uploads.

Workarounds

  • Place a reverse proxy rule in front of /res that forces Content-Type: application/octet-stream and Content-Disposition: attachment for served files.
  • Restrict /api/upload to trusted user groups until the patched version is deployed.
  • Add a web application firewall rule to reject multipart uploads whose body begins with <svg, <html, or <!DOCTYPE.
bash
# Nginx override to prevent inline rendering of uploaded resources
location /res/ {
    add_header X-Content-Type-Options "nosniff" always;
    add_header Content-Disposition "attachment" always;
    types { } default_type application/octet-stream;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.