{"id":"GHSA-jhph-5q74-pmfx","aliases":["CVE-2026-55466"],"title":"Snipe-IT vulnerable to stored XSS via inline-served attachment","titleSource":"OSV","descriptionSource":"OSV","declaredSeverity":"MODERATE","description":"### Impact\nA low-privilege user can store an active-content payload as an asset attachment and have it served inline, same-origin, with an active Content-Type, achieving stored XSS. The application sanitizes uploads only when PHP finfo detects image/svg+xml. By submitting an XHTML document whose finfo MIME is text/xml (an allowed extension), the svg-sanitize branch is skipped, the <script> is stored raw, and the inline-serve path returns it as text/xml; charset=utf-8 with Content-Disposition: inline — which the browser renders as a live XHTML document and executes. The dedicated StorageHelper::allowSafeInline() whitelist that should have constrained inline-renderable types is never wired into the serve path.\n\n### Details\nVulnerable code — sanitizer keyed on finfo MIME `app/Http/Requests/UploadFileRequest.php:46-53`\n\n```php\n$extension = $file->getClientOriginalExtension();\n$file_name = $name_prefix.'-'.str_random(8).'-'.str_slug(...).'.'.$file->guessExtension();\n...\nif ($file->getMimeType() === 'image/svg+xml') {\n    $uploaded_file = $this->handleSVG($file);   // svg-sanitize fires\n} else {\n    $uploaded_file = file_get_contents($file);   // stored RAW — no sanitization\n}\n```\n\nVulnerable code — inline serve, no `allowSafeInline()` `app/Http/Controllers/UploadedFilesController.php:103`\n\n```php\nif (request('inline') == 'true') {\n    $headers = ['Content-Disposition' => 'inline'];\n    return Storage::download($path.$log->filename, $log->filename, $headers);\n}\n```\n\n`StorageHelper::allowSafeInline()` (`app/Helpers/StorageHelper.php:88`) exists to whitelist inline-renderable types but is not called here. The validation rule (`UploadFileRequest::rules()`) is `mimes`: over `config('filesystems.allowed_upload_extensions_for_validator')`, which includes svg, xml, and txt — so a text/xml file passes validation and bypasses the SVG sanitizer simultaneously.\n\nPOC\n1. From a fresh install, as a user with only `assets.view` + `assets.files` targeting any existing asset created by admin\n2. click on the asset created by admin and upload files.\n3. create a XML file with the following payload and upload it.\n\n```xml\n<?xml version=\"1.0\"?>\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head><script>alert(document.cookie)</script></head>\n<body>hi</body>\n</html>\n```\n\n\n4. Noticed that it did not receive any error and the file was uploaded.\n5. Now, can just get the URL and view it. (need to add the `inline=true`).\nimage.png\n\nNotice that the XSS was able to request `document.cookie`. This means that it is possible for low privilege user to perform XSS and perform privilege escalation to admin.","severity":"high","score":8.7,"published":"2026-08-28T17:59:54.000Z","modified":"2026-08-28T18:15:06.823Z","withdrawn":false,"knownExploited":false,"affected":[{"ecosystem":"Packagist","name":"snipe/snipe-it","sources":[{"name":"OSV · GHSA-jhph-5q74-pmfx","url":"https://osv.dev/vulnerability/GHSA-jhph-5q74-pmfx"}],"ranges":[{"events":[{"introduced":"0"},{"fixed":"8.6.2"}],"type":"ECOSYSTEM"}],"versions":["3.2.0","v0.1.0","v0.1.1","v0.1.2","v0.2.0","v0.3.0-alpha","v0.3.10-alpha","v0.3.11-alpha","v0.3.7-alpha","v0.3.8-alpha","v0.3.9-alpha","v1.0","v1.1","v1.2.0","v1.2.1","v1.2.10","v1.2.11","v1.2.2","v1.2.3","v1.2.3-beta","v1.2.4","v1.2.4-beta","v1.2.5","v1.2.6","v1.2.6-beta","v1.2.6.1","v1.2.7","v1.2.7-beta","v1.2.8","v1.2.9","v2.0","v2.0-RC-1","v2.0-beta","v2.0.1","v2.0.2","v2.0.3","v2.0.4","v2.0.5","v2.0.6","v2.1.0","v2.1.1","v2.1.2","v3.0","v3.0-alpha","v3.0-alpha2","v3.0-beta.1","v3.0-beta.2","v3.0-beta.3","v3.0.0-beta","v3.1.0","v3.3.0","v3.3.0-beta","v3.4","v3.4.0-alpha","v3.4.0-beta","v3.5.0","v3.5.0-beta","v3.5.0-beta2","v3.5.1","v3.5.2","v3.6.0","v3.6.1","v3.6.2","v3.6.3","v3.6.4","v3.6.5","v3.6.6","v4-beta3","v4-beta4","v4.0","v4.0-alpha","v4.0-alpha-2","v4.0-beta","v4.0-beta2","v4.0-beta5","v4.0-beta6","v4.0.1","v4.0.10","v4.0.11","v4.0.12","v4.0.13","v4.0.14","v4.0.15","v4.0.2","v4.0.3","v4.0.4","v4.0.5","v4.0.6","v4.0.7","v4.0.8","v4.0.9","v4.1.0","v4.1.0-beta","v4.1.0-beta2","v4.1.1","v4.1.10","v4.1.11","v4.1.12","v4.1.13","v4.1.14","v4.1.2","v4.1.3","v4.1.4","v4.1.5","v4.1.6","v4.1.7","v4.1.8","v4.1.9","v4.2.0","v4.3.0","v4.4.0","v4.4.1","v4.5.0","v4.6.0","v4.6.1","v4.6.10","v4.6.11","v4.6.12","v4.6.13","v4.6.14","v4.6.15","v4.6.16","v4.6.17","v4.6.18","v4.6.2","v4.6.3","v4.6.4","v4.6.5","v4.6.6","v4.6.7","v4.6.8","v4.6.9","v4.7.0","v4.7.1","v4.7.2","v4.7.3","v4.7.4","v4.7.5","v4.7.6","v4.7.7","v4.7.8","v4.8.0","v4.9.0","v4.9.1","v4.9.2","v4.9.3","v4.9.4","v4.9.5","v5.0.0","v5.0.0-beta-1.0","v5.0.0-beta-1.1","v5.0.0-beta-2","v5.0.0-beta-3.0","v5.0.0-beta-4","v5.0.0-beta-5","v5.0.1","v5.0.10","v5.0.11","v5.0.12","v5.0.2","v5.0.3","v5.0.4","v5.0.5","v5.0.6","v5.0.7","v5.0.8","v5.0.9","v5.1.0","v5.1.1","v5.1.2","v5.1.3","v5.1.4","v5.1.5","v5.1.6","v5.1.7","v5.1.8","v5.2.0","v5.3.0","v5.3.1","v5.3.10","v5.3.2","v5.3.3","v5.3.4","v5.3.5","v5.3.6","v5.3.7","v5.3.8","v5.3.9","v5.4.0","v5.4.1","v5.4.2","v5.4.3","v5.4.4","v6.0.0","v6.0.0-RC-1","v6.0.0-RC-2","v6.0.0-RC-3","v6.0.0-RC-4","v6.0.0-RC-5","v6.0.0-RC-6","v6.0.0-RC-7","v6.0.0-RC-8","v6.0.1","v6.0.10","v6.0.11","v6.0.12","v6.0.13","v6.0.14","v6.0.2","v6.0.3","v6.0.4","v6.0.5","v6.0.6","v6.0.7","v6.0.8","v6.0.9","v6.1.0","v6.1.1","v6.1.2","v6.2.0","v6.2.1","v6.2.2","v6.2.3","v6.3.0","v6.3.1","v6.3.2","v6.3.3","v6.3.4","v6.4.0","v6.4.1","v6.4.2","v7.0.0","v7.0.1","v7.0.10","v7.0.11","v7.0.12","v7.0.13","v7.0.2","v7.0.3","v7.0.4","v7.0.5","v7.0.6","v7.0.7","v7.0.8","v7.0.9","v7.1.14","v7.1.15","v7.1.16","v7.1.17","v8.0.0","v8.0.1","v8.0.2","v8.0.3","v8.0.4","v8.1.0","v8.1.1","v8.1.15","v8.1.16","v8.1.17","v8.1.18","v8.1.2","v8.1.3","v8.1.4","v8.2.0","v8.2.1","v8.3.0","v8.3.1","v8.3.2","v8.3.3","v8.3.4","v8.3.5","v8.3.6","v8.3.7","v8.4.0","v8.4.1","v8.5.0","v8.6.0","v8.6.1"],"fixed":["8.6.2"]}],"sourceAffected":[],"references":["https://github.com/grokability/snipe-it/security/advisories/GHSA-jhph-5q74-pmfx","https://nvd.nist.gov/vuln/detail/CVE-2026-55466","https://github.com/grokability/snipe-it/commit/000cea0a622d586366cf60d2240c7c2a4b17c955","https://github.com/grokability/snipe-it","https://github.com/grokability/snipe-it/releases/tag/v8.6.2"],"sources":[{"name":"OSV","id":"GHSA-jhph-5q74-pmfx","modified":"2026-08-28T18:15:06.823497824Z","url":"https://osv.dev/vulnerability/GHSA-jhph-5q74-pmfx"}],"assessments":[{"source":"OSV","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","score":8.7},{"source":"OSV","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N","score":6.2}],"products":[],"remediation":[],"kev":{"status":"not-listed","checkedAt":"2026-10-28T10:05:32.626Z"},"coverage":[{"source":"NVD","status":"not-checked"},{"source":"GHSA","status":"not-checked"},{"source":"EUVD","status":"not-checked"},{"source":"EPSS","status":"not-checked"}],"evidence":[]}