You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+75-43
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
+
> **SECURITY WARNING:** This `graphql-playground-html` and [all of it's middleware dependents](#impacted-packages) in this repository **had a severe XSS Reflection attack vulnerability to unsanitized user input** until version `graphql-playground-html@1.6.20`. Impacted are any and all **user-defined** input to `renderPlaygroundPage()`, `koaPlayground()`,`expressPlayground()`, `koaPlayground()`, or `lambdaPlayground()`. If you used static values, such as `graphql-playground-electron` does in [it's webpack config](https://github.com/prisma-labs/graphql-playground/blob/master/packages/graphql-playground-electron/webpack.config.build.js#L16), you were not vulnerable to the attack. [More Details](./SECURITY.md)
- ⚙ GraphQL Config support with multiple Projects & Endpoints
26
28
- 🚥 Apollo Tracing support
27
29
30
+
## Security Details
31
+
32
+
**NOTE: only _unsanitized user input_ to the functions in these packages is vulnerable** to the recently reported XSS Reflection attack.
33
+
34
+
### Impact
35
+
36
+
The only reason this vulnerability exists is because we are using template strings in `renderPlaygroundPage()` with potentially user defined variables. This allows an attacker to inject html and javascript into a page on execution.
37
+
38
+
Common examples may be user-defined path parameters, query string, unsanitized UI provided values in database, etc that are used to build template strings or passed directly to a `renderPlaygroundPage()` or the matching middleware function equivalent.
39
+
40
+
### Impacted Packages
41
+
42
+
**All versions of these packages are impacted until the ones specified below**, which are now safe for user defined input:
-`graphql-playground-electron` has always been **☔ safe** from XSS attacks! This is because configuration is statically defined [it's webpack config](https://github.com/prisma-labs/graphql-playground/blob/master/packages/graphql-playground-electron/webpack.config.build.js#L16)
50
+
-`graphql-playground-react` is safe because it does not use `renderPlaygroundPage()` anywhere, and thus is not susceptible to template string XSS reflection attacks.
51
+
52
+
### More Information
53
+
54
+
See the [security docs](./SECURITY.md) for more details on how your implementation might be impacted by this vulnerability. It contains safe examples, unsafe examples, workarounds, and more details.
55
+
28
56
## FAQ
29
57
30
58
### How is this different from [GraphiQL](https://github.com/graphql/graphiql)?
the origin of the vulnerability is in `renderPlaygroundPage`, found in `graphql-playground-html`
6
+
7
+
### Impact
8
+
9
+
When using
10
+
11
+
-`renderPlaygroundPage()`,
12
+
-`koaPlayground()`
13
+
-`expressPlayground()`
14
+
-`koaPlayground()`
15
+
-`lambdaPlayground()`
16
+
- any downstream dependents that use these functions
17
+
18
+
without sanitization of user input, your application is vulnerable to an XSS Reflecton Attack. This is a serious vulnerability that could allow for exfiltration of data or user credentials, or to disrupt systems.
19
+
20
+
### Impacted Packages
21
+
22
+
**All versions of these packages are impacted until those specified below**, which are now safe for user defined input:
Copy file name to clipboardExpand all lines: packages/graphql-playground-html/README.md
+2
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
# graphql-playground-html
2
2
3
+
> **SECURITY WARNING:** This package and all of it's dependendents had a severe XSS Reflection attack vulnerability until version `1.6.20` of this package. You must sanitize any and all user input values to `renderPlaygroundPage()` values. If you used static values in your middlewares, including ours, you were not vulnerable to the attack.
4
+
3
5
This package is being used by the GraphQL Playground middlewares.
4
6
5
7
For local development, you can `yarn link` this package, then use `yarn link graphql-playground-html` in the
0 commit comments