Skip to content

Conversation

@jlowin
Copy link
Owner

@jlowin jlowin commented Oct 14, 2025

The OAuth callback page embedded user-controlled query parameters directly into HTML without escaping, creating a reflected XSS vulnerability. An attacker could inject malicious JavaScript through parameters like error or error_description, which would execute in the victim's browser when the callback page rendered.

This adds html.escape() to all UI utility functions that render user content, ensuring XSS payloads are properly escaped before rendering. The fix applies escaping at the start of each function for clarity and maintainability.

@marvin-context-protocol marvin-context-protocol bot added bug Something isn't working. Reports of errors, unexpected behavior, or broken functionality. client Related to the FastMCP client SDK or client-side functionality. auth Related to authentication (Bearer, JWT, OAuth, WorkOS) for client or server. labels Oct 14, 2025
@jlowin jlowin removed the auth Related to authentication (Bearer, JWT, OAuth, WorkOS) for client or server. label Oct 14, 2025
@jlowin jlowin merged commit 2a20f54 into main Oct 14, 2025
10 checks passed
@jlowin jlowin deleted the xss branch October 14, 2025 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working. Reports of errors, unexpected behavior, or broken functionality. client Related to the FastMCP client SDK or client-side functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants