/

CVE-2026-105798

Severity:

HIGH RISK

(8.7)

Stored XSS (CWE-79) in SimpleChat Group Document Uploads

CVE-2026-105798

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Session-Context Script Execution and Data Exposure

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

SimpleChat contains a stored cross-site scripting vulnerability in group document filenames, which are later inserted into inline Share event handlers without safely preserving JavaScript string boundaries. An authenticated group Owner, Admin, or DocumentManager may store script that executes when another group member clicks Share, potentially exposing data and actions available through the victim's session.

SimpleChat contains a stored cross-site scripting vulnerability in group document filenames, which are later inserted into inline Share event handlers without safely preserving JavaScript string boundaries. An authenticated group Owner, Admin, or DocumentManager may store script that executes when another group member clicks Share, potentially exposing data and actions available through the victim's session.

Affected context

The issue occurs in group workspace document handling when:

  • An uploaded document filename is controlled by an authenticated group management role
  • The filename is persisted and later rendered by group_workspaces.html
  • The rendered value is interpolated into an inline Share event handler
  • Escaping does not remain safe through HTML decoding and subsequent JavaScript evaluation

Exploitation generally requires another group member to interact with the affected Share control.

The issue occurs in group workspace document handling when:

  • An uploaded document filename is controlled by an authenticated group management role
  • The filename is persisted and later rendered by group_workspaces.html
  • The rendered value is interpolated into an inline Share event handler
  • Escaping does not remain safe through HTML decoding and subsequent JavaScript evaluation

Exploitation generally requires another group member to interact with the affected Share control.

Exploit preconditions

  • Attack surface: Group document upload and group workspace rendering
  • Required access: Authenticated membership with Owner, Admin, or DocumentManager privileges
  • Trigger point: A group member clicks the Share control containing the stored filename
  • Why exploitation is possible: Attacker-controlled filename data can terminate the inline handler's JavaScript string after the applied escaping is interpreted by the browser
  • Attack surface: Group document upload and group workspace rendering
  • Required access: Authenticated membership with Owner, Admin, or DocumentManager privileges
  • Trigger point: A group member clicks the Share control containing the stored filename
  • Why exploitation is possible: Attacker-controlled filename data can terminate the inline handler's JavaScript string after the applied escaping is interpreted by the browser

Why this happens

The underlying bug is a context-confusion error in output encoding. A document filename is treated as data but is inserted into an inline JavaScript handler, where HTML escaping alone does not provide safe JavaScript-string encoding; browser entity decoding can restore characters before script evaluation. This behavior maps to CWE-79: Improper Neutralization of Input During Web Page Generation, specifically stored cross-site scripting caused by placing persistent attacker-controlled data into an executable client-side context.

The underlying bug is a context-confusion error in output encoding. A document filename is treated as data but is inserted into an inline JavaScript handler, where HTML escaping alone does not provide safe JavaScript-string encoding; browser entity decoding can restore characters before script evaluation. This behavior maps to CWE-79: Improper Neutralization of Input During Web Page Generation, specifically stored cross-site scripting caused by placing persistent attacker-controlled data into an executable client-side context.

Potential impact

  • Script execution in the SimpleChat origin
  • Access to data visible to the victim within the application
  • Actions performed with the victim's session and permissions
  • Modification of group content or application state
  • Exposure of sensitive workspace information
  • Abuse of trusted group-member interactions
  • Script execution in the SimpleChat origin
  • Access to data visible to the victim within the application
  • Actions performed with the victim's session and permissions
  • Modification of group content or application state
  • Exposure of sensitive workspace information
  • Abuse of trusted group-member interactions

General mitigation guidance

Mitigation should focus on preventing user-controlled values from entering executable inline JavaScript contexts.

Common defensive patterns include:

  • Using framework event binding or trusted DOM APIs instead of inline event handlers
  • Keeping document filenames as data attributes or structured values, then treating them as data in client-side code
  • Applying context-specific JavaScript-string encoding when a value must cross a JavaScript boundary
  • Preferably using safe DOM text and property assignment rather than HTML interpolation
  • Enforcing a restrictive Content Security Policy that limits inline script execution
  • Validating filenames with an allowlist for business requirements without relying on validation as the primary XSS defense
  • Limiting group-management permissions and protecting sensitive actions with server-side authorization checks

Mitigation should focus on preventing user-controlled values from entering executable inline JavaScript contexts.

Common defensive patterns include:

  • Using framework event binding or trusted DOM APIs instead of inline event handlers
  • Keeping document filenames as data attributes or structured values, then treating them as data in client-side code
  • Applying context-specific JavaScript-string encoding when a value must cross a JavaScript boundary
  • Preferably using safe DOM text and property assignment rather than HTML interpolation
  • Enforcing a restrictive Content Security Policy that limits inline script execution
  • Validating filenames with an allowlist for business requirements without relying on validation as the primary XSS defense
  • Limiting group-management permissions and protecting sensitive actions with server-side authorization checks

How teams detect issues like this

Detection can combine:

  • Static analysis rules for user-controlled values interpolated into inline event handlers
  • Code review checks for template output embedded in JavaScript, HTML attributes, or other executable contexts
  • Tests using filenames containing quotes, entity-like sequences, and delimiter characters across rendering paths
  • Dynamic application testing that verifies stored filenames remain inert when rendered and interacted with
  • Content Security Policy reporting to identify unexpected inline script execution
  • Repository policy checks that prohibit inline handlers and require context-aware output encoding

Automated code review and security scanning tools may help identify dangerous data-flow paths, but findings should be validated against the browser's parsing and decoding behavior.

Detection can combine:

  • Static analysis rules for user-controlled values interpolated into inline event handlers
  • Code review checks for template output embedded in JavaScript, HTML attributes, or other executable contexts
  • Tests using filenames containing quotes, entity-like sequences, and delimiter characters across rendering paths
  • Dynamic application testing that verifies stored filenames remain inert when rendered and interacted with
  • Content Security Policy reporting to identify unexpected inline script execution
  • Repository policy checks that prohibit inline handlers and require context-aware output encoding

Automated code review and security scanning tools may help identify dangerous data-flow paths, but findings should be validated against the browser's parsing and decoding behavior.

Sources

SourceLink
github.comgithub.com/microsoft/simplechat/commit/537a259eb048b8f6d1c94193fa0c9683ab0bace9
github.comgithub.com/microsoft/simplechat/security/advisories/GHSA-qwcw-r653-j8c6

Frequently asked

questions

An authenticated group Owner, Admin, or DocumentManager can potentially store the malicious filename. A separate group member generally must click the affected Share control for the payload to execute.

No. The attacker needs the ability to manage or upload group documents, while the victim needs to view the group workspace and activate the relevant Share interaction.

Keep untrusted filenames out of inline JavaScript handlers. Bind events through trusted application code and use encoding appropriate to the exact output context whenever values are rendered.

Adopt context-aware output encoding, avoid inline script construction, enforce restrictive browser security policies, and test persistent user-controlled fields through their complete storage, rendering, and interaction flows.

An authenticated group Owner, Admin, or DocumentManager can potentially store the malicious filename. A separate group member generally must click the affected Share control for the payload to execute.

No. The attacker needs the ability to manage or upload group documents, while the victim needs to view the group workspace and activate the relevant Share interaction.

Keep untrusted filenames out of inline JavaScript handlers. Bind events through trusted application code and use encoding appropriate to the exact output context whenever values are rendered.

Adopt context-aware output encoding, avoid inline script construction, enforce restrictive browser security policies, and test persistent user-controlled fields through their complete storage, rendering, and interaction flows.

Find out what's already
exploitable in your codebase.