/

CVE-2026-55466

Severity:

HIGH RISK

(8.7)

Stored XSS (CWE-79) via Inline File Attachments in Snipe-IT

CVE-2026-55466

Analyzed

Vulnerability type

Category:

Cross-Site Scripting (Stored XSS)

CWE:

CWE-79

Impact:

Arbitrary JavaScript Execution in User Browsers

Severity:

HIGH RISK

(8.7)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Snipe-IT contains a stored cross-site scripting vulnerability where uploaded files can be served inline without sufficient sanitization or content-type restrictions.

A low-privilege user can upload active XML-based content that is later rendered in a victim's browser under the same origin, allowing arbitrary JavaScript execution when the attachment is viewed.

Affected context

This vulnerability arises in Snipe-IT deployments that allow authenticated users to upload attachments which are later served inline from the same Snipe-IT origin.

It specifically affects scenarios where UploadFileRequest does not fully sanitize non-SVG XML/XHTML files, and UploadedFilesController returns these files inline without enforcing a strict safe-inline policy.

The risk is most pronounced when users routinely open attachments directly in their browser from within the Snipe-IT interface.

Exploit preconditions

  • Attack surface: Web interface for file uploads and inline viewing of attachments.
  • Required access: Authenticated low-privilege user with permission to upload attachments.
  • Trigger point: A victim user opens or previews the malicious attachment delivered inline from the Snipe-IT instance.
  • Why exploitation is possible: SVG sanitization is only applied based on a specific MIME type check, and other active XML/XHTML content is served inline without passing through a safety gate such as StorageHelper::allowSafeInline(), enabling script execution under the application's origin.

Why this happens

The core issue is a stored cross-site scripting flaw where user-supplied file content is treated as passive data but can be interpreted as active web content by the browser.

UploadFileRequest ties SVG sanitization to the MIME type reported by PHP finfo, leaving other XML/XHTML payloads unsanitized.

UploadedFilesController then serves attachments inline, without a centralized safety check to distinguish safe, purely static content from active, script-capable markup.

This pattern maps to CWE-79: Improper Neutralization of Input During Web Page Generation, in this case via uploaded files that are later rendered in a browser context.

Potential impact

  • Execution of arbitrary JavaScript in the context of the Snipe-IT origin.
  • Theft of active user session tokens or other sensitive in-page data.
  • Unauthorized actions performed on behalf of the victim (e.g., changing settings or manipulating assets) via CSRF-like behavior within the same origin.
  • Deployment of persistent browser-based malware or malicious redirects for users who view the attachment.

General mitigation guidance

Effective mitigation focuses on treating all user-uploaded files as untrusted, especially when they may be rendered inline.

Recommended defensive patterns include:

  • Strictly limiting which content types may be served inline and defaulting other types to forced download.
  • Centralizing inline-delivery checks through a helper or policy function that enforces a whitelist of safe MIME types and disallows script-capable formats.
  • Normalizing and validating MIME types using multiple signals (server-side detection, file extension, and, where applicable, magic bytes) rather than trusting a single source.
  • Applying robust sanitization to any content that might be interpreted as HTML, SVG, XML, or XHTML before it is ever rendered in a browser.
  • Reducing privileges of uploaded content by disabling inline rendering in contexts where it is not strictly necessary.

How teams detect issues like this

Organizations can detect similar vulnerabilities by:

  • Reviewing controller and storage-layer code paths that serve user-uploaded files, checking for inline rendering and lack of centralized safety checks.
  • Using static analysis to flag instances where user-controlled files or data are returned with Content-Type headers that trigger HTML/XML/SVG rendering.
  • Adding automated tests that attempt to upload benign XSS test payloads in various file types (e.g., SVG, XHTML, XML) and verifying they are not executed when viewed.
  • Incorporating security-focused code review checklists that explicitly ask whether uploaded files can be rendered inline and under what constraints.

Sources

SourceLink
github.comgithub.com/grokability/snipe-it/commit/000cea0a622d586366cf60d2240c7c2a4b17c955
github.comgithub.com/grokability/snipe-it/releases/tag/v8.6.2
github.comgithub.com/grokability/snipe-it/security/advisories/GHSA-jhph-5q74-pmfx

Frequently asked

questions

Yes, if the Snipe-IT instance is accessible over the internet and an attacker can obtain low-privilege credentials or compromise an existing user account with upload rights, they can exploit it by having a victim view a malicious attachment.

No. The vulnerability can be triggered by any authenticated user who has permission to upload attachments; administrators become high-value victims rather than necessary preconditions.

The safest approach is to centralize and enforce a strict policy for serving uploaded files, only allowing a minimal set of non-active content types to be rendered inline and defaulting all other uploads to download-only behavior, combined with robust sanitization of any content that might still be interpreted as markup.

Preventive measures include adopting a defense-in-depth strategy for file uploads: treat all uploads as untrusted, implement MIME-type and extension whitelisting, apply content sanitization where necessary, avoid inline rendering of active formats, and include these checks in automated tests and security-focused code reviews.

Find out what's already
exploitable in your codebase.