{"id":"CVE-2026-55466","aliases":["CVE-2026-55466","GHSA-jhph-5q74-pmfx"],"related":[],"kind":"vulnerability","state":"published","title":"Snipe-IT: Stored XSS via inline-served attachment","summary":"Snipe-IT is an IT asset/license management system. Prior to 8.6.2, UploadFileRequest sanitizes SVG content only when PHP finfo reports image/svg+xml and UploadedFilesController serves attachments inline without using StorageHelper::allowSafeInline(), allowing a low-privilege user to upload active XHTML or XML content that is later served same-origin and executes JavaScript in a viewer’s browser. This issue is fixed in version 8.6.2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Snipe-IT is an IT asset/license management system. Prior to 8.6.2, UploadFileRequest sanitizes SVG content only when PHP finfo reports image/svg+xml and UploadedFilesController serves attachments inline without using StorageHelper::allowSafeInline(), allowing a low-privilege user to upload active XHTML or XML content that is later served same-origin and executes JavaScript in a viewer’s browser. This issue is fixed in version 8.6.2.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Snipe-IT es un sistema de gestión de activos/licencias de TI. Antes de la versión 8.6.2, UploadFileRequest sanitiza el contenido SVG solo cuando PHP finfo informa image/svg+xml y UploadedFilesController sirve los adjuntos en línea sin usar StorageHelper::allowSafeInline(), permitiendo a un usuario con bajos privilegios subir contenido XHTML o XML activo que luego se sirve con el mismo origen y ejecuta JavaScript en el navegador de un espectador. Este problema se solucionó en la versión 8.6.2.","source":"nvd"}],"published":"2026-07-10T19:37:54.362Z","modified":"2026-10-25T15:10:00.147Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","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,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","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,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","score":8.7,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","score":8.7,"rating":"HIGH"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"< 8.6.2","status":"affected"}],"vendor":"grokability","product":"snipe-it","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"8.6.2"}],"ecosystem":"Packagist","package":"snipe/snipe-it","purl":"pkg:composer/snipe/snipe-it","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"8.6.2"}],"vendor":"snipeitapp","product":"snipe-it","cpe":"cpe:2.3:a:snipeitapp:snipe-it:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/grokability/snipe-it/security/advisories/GHSA-jhph-5q74-pmfx","tags":["exploit","patch","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/grokability/snipe-it/commit/000cea0a622d586366cf60d2240c7c2a4b17c955","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/grokability/snipe-it/releases/tag/v8.6.2","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-55466","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/grokability/snipe-it","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-07-13T18:22:00.999Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-55466","url":"https://www.cve.org/CVERecord?id=CVE-2026-55466","licence":"CVE Terms of Use","modified":"2026-07-13T18:22:07.780Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-jhph-5q74-pmfx","url":"https://github.com/advisories/GHSA-jhph-5q74-pmfx","licence":"CC-BY-4.0","modified":"2026-08-28T18:15:06.823Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-55466","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-55466","licence":"Public domain","modified":"2026-10-25T15:10:00.147Z"}],"updatedAt":"2026-11-25T22:59:27.674Z","epss":{"score":0.00381,"percentile":0.34168,"date":"2026-12-01T12:00:22.000Z"}}