/

CVE-2026-63197

Severity:

HIGH RISK

(7.3)

Stored Cross-Site Scripting (CWE-79) in traQ Files

CVE-2026-63197

Received

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Attacker-controlled JavaScript execution in a victim's browser

Severity:

HIGH RISK

(7.3)

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

traQ instances using local storage can serve uploaded SVG or HTML files for direct rendering in a browser. If an attacker who can upload files gets another user to open a crafted file URL, JavaScript may run in that user's browser.

traQ instances using local storage can serve uploaded SVG or HTML files for direct rendering in a browser. If an attacker who can upload files gets another user to open a crafted file URL, JavaScript may run in that user's browser.

Affected context

The issue affects traQ instances configured with TRAQ_STORAGE_TYPE=local and versions prior to 3.28.3. It occurs when the /files/{fileId} endpoint returns user-uploaded SVG or HTML content in a way that allows the browser to render it as active content.

The issue affects traQ instances configured with TRAQ_STORAGE_TYPE=local and versions prior to 3.28.3. It occurs when the /files/{fileId} endpoint returns user-uploaded SVG or HTML content in a way that allows the browser to render it as active content.

Exploit preconditions

  • Attack surface: The /files/{fileId} file-retrieval endpoint on a traQ instance using local storage
  • Required access: The attacker must be able to upload a file
  • Trigger point: A victim opens the URL for the uploaded file
  • Why exploitation is possible: The file is rendered as active SVG or HTML content in the victim's browser, allowing embedded JavaScript to execute
  • Attack surface: The /files/{fileId} file-retrieval endpoint on a traQ instance using local storage
  • Required access: The attacker must be able to upload a file
  • Trigger point: A victim opens the URL for the uploaded file
  • Why exploitation is possible: The file is rendered as active SVG or HTML content in the victim's browser, allowing embedded JavaScript to execute

Why this happens

The application serves user-controlled SVG or HTML in a browser-renderable context without sufficiently preventing active content from running. This is a stored cross-site scripting flaw mapped to CWE-79, where untrusted input is included in content that a browser interprets as executable script or markup.

The application serves user-controlled SVG or HTML in a browser-renderable context without sufficiently preventing active content from running. This is a stored cross-site scripting flaw mapped to CWE-79, where untrusted input is included in content that a browser interprets as executable script or markup.

Potential impact

  • Attacker-controlled JavaScript could run in a victim's browser in the context of the traQ site.
  • The script may be able to access information available to that browser context or perform actions as the victim, subject to browser and application controls.
  • User trust in links to uploaded files could be abused to expose other users to malicious content.
  • Attacker-controlled JavaScript could run in a victim's browser in the context of the traQ site.
  • The script may be able to access information available to that browser context or perform actions as the victim, subject to browser and application controls.
  • User trust in links to uploaded files could be abused to expose other users to malicious content.

General mitigation guidance

Defensive patterns focus on preventing uploaded content from executing in the application's trusted browser context:

  • Serve user-uploaded files as downloads rather than rendering active formats inline where practical.
  • Use restrictive content types and browser security headers, including policies that limit script execution.
  • Sanitize or reject active content when such formats are not required.
  • Serve user content from an isolated origin that does not share application credentials.
  • Limit upload privileges and apply least privilege to storage and file-serving components.

Defensive patterns focus on preventing uploaded content from executing in the application's trusted browser context:

  • Serve user-uploaded files as downloads rather than rendering active formats inline where practical.
  • Use restrictive content types and browser security headers, including policies that limit script execution.
  • Sanitize or reject active content when such formats are not required.
  • Serve user content from an isolated origin that does not share application credentials.
  • Limit upload privileges and apply least privilege to storage and file-serving components.

How teams detect issues like this

  • Review file-serving code for user-controlled content returned with browser-renderable content types or inline disposition.
  • Use static analysis and code review to identify upload and retrieval paths that do not enforce content handling policies.
  • Test upload and retrieval behavior with representative active file formats in a controlled environment.
  • Enforce policies for approved file types, response headers, and isolated origins; automated security review tools may help flag risky patterns.
  • Review file-serving code for user-controlled content returned with browser-renderable content types or inline disposition.
  • Use static analysis and code review to identify upload and retrieval paths that do not enforce content handling policies.
  • Test upload and retrieval behavior with representative active file formats in a controlled environment.
  • Enforce policies for approved file types, response headers, and isolated origins; automated security review tools may help flag risky patterns.

Sources

SourceLink
github.comgithub.com/traPtitech/traQ/commit/3db29e7771661f6418d88d186d8ff7817f5d6b6e
github.comgithub.com/traPtitech/traQ/releases/tag/v3.28.3
github.comgithub.com/traPtitech/traQ/security/advisories/GHSA-p74g-f95m-7fx7

Frequently asked

questions

An attacker needs the ability to upload a crafted file to an affected traQ instance.

No. The described scenario requires another user to open the uploaded file's URL.

Avoid rendering untrusted active content in the application's trusted origin. Prefer downloads, restrictive response policies, or an isolated origin.

Apply file-type and content-handling policies, review upload and retrieval flows, and test that uploaded content cannot execute scripts in a user's application context.

An attacker needs the ability to upload a crafted file to an affected traQ instance.

No. The described scenario requires another user to open the uploaded file's URL.

Avoid rendering untrusted active content in the application's trusted origin. Prefer downloads, restrictive response policies, or an isolated origin.

Apply file-type and content-handling policies, review upload and retrieval flows, and test that uploaded content cannot execute scripts in a user's application context.

Find out what's already
exploitable in your codebase.