Conversation
PR SummaryMedium Risk Overview This is implemented by accepting Written by Cursor Bugbot for commit 726032a. This will update automatically on new commits. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| .endpoint(&endpoint) | ||
| .subscription_endpoint(&subscription_endpoint) | ||
| .title("Fuel Graphql Playground") | ||
| .finish(); |
There was a problem hiding this comment.
Reflected XSS via unsanitized query string in HTML
Medium Severity
User-controlled raw query string from RawQuery is appended to the endpoint and passed directly into GraphiQLSource::build().endpoint(), which embeds it in a JavaScript context via a handlebars template. The Rust handlebars crate's default HTML escaping does not escape single quotes ('). Since the GraphiQL template likely uses single-quoted JavaScript string literals for the endpoint value, an attacker can craft a URL like /v1/playground?';alert(document.cookie);// to inject arbitrary JavaScript. Single quotes are valid in URL query components per RFC 3986 and are not percent-encoded by browsers, so the raw ' reaches the server and gets embedded in the HTML output without sanitization.
| let endpoint = format!("{}{}", endpoint, qs); | ||
| let subscription_endpoint = format!("{}{}", subscription_endpoint, qs); | ||
|
|
||
| // let html = GRAPHQL_PLAYGROUND_HTML.get_or_init(|| { |
There was a problem hiding this comment.


Linked Issues/PRs
#3140
Description
Still WIP because this
OnceLockmeant to improve performance. Might be worth the cost, but still can reconsider the approachChecklist
Before requesting review
After merging, notify other teams
[Add or remove entries as needed]