Media

Snipe-IT vulnerable to stored XSS via inline-served attachment

  • Publicada: 28.08.2026
  • Actualizado: 11.10.2026 10:22

Impact

A 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.

Details

Vulnerable code — sanitizer keyed on finfo MIME app/Http/Requests/UploadFileRequest.php:46-53

php
$extension = $file->getClientOriginalExtension();
$file_name = $name_prefix.'-'.str_random(8).'-'.str_slug(...).'.'.$file->guessExtension();
...
if ($file->getMimeType() === 'image/svg+xml') {
    $uploaded_file = $this->handleSVG($file);   // svg-sanitize fires
} else {
    $uploaded_file = file_get_contents($file);   // stored RAW — no sanitization
}

Vulnerable code — inline serve, no allowSafeInline() app/Http/Controllers/UploadedFilesController.php:103

php
if (request('inline') == 'true') {
    $headers = ['Content-Disposition' => 'inline'];
    return Storage::download($path.$log->filename, $log->filename, $headers);
}

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.

POC

  1. From a fresh install, as a user with only assets.view + assets.files targeting any existing asset created by admin
  2. click on the asset created by admin and upload files.
  3. create a XML file with the following payload and upload it.
xml
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head><script>alert(document.cookie)</script></head>
<body>hi</body>
</html>
  1. Noticed that it did not receive any error and the file was uploaded.
  2. Now, can just get the URL and view it. (need to add the inline=true). image.png

Notice 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.

Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Paquete de Composer snipe/snipe-it < 8.6.2 8.6.2

Referencias

Puntuación CVSS 8.7/10
Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
Debilidad (CWE)
CWE-79
Plataforma
Composer
Paquete
snipe/snipe-it
Publicada
28.08.2026
Actualizado
11.10.2026 10:22

Fuentes y licencias

OSV / GitHub Advisory Database - GHSA-jhph-5q74-pmfx - CC BY 4.0

Historial de vulnerabilidades: snipe/snipe-it

Todas las vulnerabilidades publicadas de este paquete (Paquete de Composer), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.

Todas (81) en el archivo
Entradas en total
81
Primera → última
10.2021 09.2026
Sin corrección
6
Explotada en ataques
0

Distribución por gravedad

  • Crítica 1
  • Alta 23
  • Media 53
  • Baja 4

Divulgaciones por año

  1. 2021: 10
  2. 2022: 20
  3. 2023: 2
  4. 2024: 3
  5. 2025: 6
  6. 2026: 40
Gravedad:
  1. Alta CVE-2026-63493 < 8.7.0 8.7.0
  2. Alta · 6.5 CVE-2026-55843 < 8.6.0 8.6.0
  3. Snipe-IT vulnerable to stored XSS via inline-served attachment esta entrada
    Media · 8.7 CVE-2026-55466 < 8.6.2 8.6.2
  4. Alta · 7.1 CVE-2026-55460 < 8.6.2 8.6.2
  5. Alta CVE-2026-55643 < 8.6.3 8.6.3
  6. Alta · 8.5 CVE-2026-54329 < 8.6.2 8.6.2
  7. Crítica · 9.8 CVE-2026-37709 < 8.4.1 8.4.1
  8. Alta · 8.8 CVE-2026-44832 < 8.4.1 8.4.1
  9. Alta · 8.7 CVE-2024-51093 <= 7.0.13 sin corrección
  10. Alta · 7.2 CVE-2024-48987 < 7.0.10 7.0.10
  11. Alta · 8.8 CVE-2023-5511 < 6.2.3 6.2.3
  12. Alta · 8.8 CVE-2022-23064 >= 3.0-alpha, < 5.3.8 5.3.8
  13. Alta · 7.4 CVE-2022-1155 >= 6.0.0-RC-1, < 6.0.0-RC-6, < 5.4.2 6.0.0-RC-6, 5.4.2
  14. Alta · 8.8 CVE-2022-0611 < 5.3.11 5.3.11
  15. Alta · 8.8 CVE-2021-4130 < 5.3.6 5.3.6
  16. Alta · 7.2 CVE-2021-4075 < 6.0.0-GM 6.0.0-GM
  17. Alta · 8.0 CVE-2021-3961 < 5.3.2 5.3.2

Identifica las vulnerabilidades de tu aplicación

Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.