All vulnerabilities

Servers and applications

GHSA-67v5-7pfv-pp9m

Stored XSS via unsanitized SVG upload in Bazar FileField (sanitization bypass)

Severity
High 8.7
Published
1 Sept 2026
Last changed
1 Sept 2026
Added to UpHeron
3 Nov 2026
Fixed in
4.6.7
Weakness
Cross-site scripting (CWE-79)Unrestricted file upload (CWE-434)
Attack
Over the network · Needs a user account · Needs someone to click or open something
Attacker can
Read data · Change data
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
Sources
Project advisories (GitHub)

Description

Bazar's FileField accepts file uploads on entry create/update and validates only the extension against the authorized-extensions allowlist — which includes svg. Unlike the two other upload paths in YesWiki (the classic {{attach}} path and the AJAX uploader), FileField performs no SVG/HTML sanitization (HtmlPurifierService::cleanFile / sanitizeSVG is never called). The raw .svg is stored under files/ and served inline as image/svg+xml. A user who can submit a bazar entry containing a file field can therefore store an SVG carrying ; when anyone (notably an admin reviewing submissions) opens the file URL, the script executes in the wiki's origin → session/account compromise. This does not depend on htmlPurifierActivated` (the gate that protects the other upload paths).

FIX APPLIED: Added HtmlPurifierService::cleanFile() call after move_uploaded_file to sanitize SVG and HTML files, matching the behavior of attach.lib.php.

Both other upload paths sanitize SVG:

From YesWiki/yeswiki's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
YesWikiServers and applications · github:yeswiki/yeswiki
  • Every version before 4.6.7

About YesWiki

Free wiki-style software for building online sharing and collaboration platforms

From Wikidata, CC0 1.0.
GitHub stars
139GitHub, 15 Nov 2026
Forks
75GitHub, 15 Nov 2026
Latest release
v4.7.2GitHub, 15 Nov 2026
Released
1 Nov 2026GitHub
License
AGPL-3.0GitHub
Written in
PHPWikidata
First released
2009Wikidata
First published on GitHub
9 Sept 2009GitHub

References