QID 981602
QID 981602: Java (maven) Security Update for io.ratpack:ratpack-core (GHSA-r2wf-q3x4-hrv9)
Versions of Ratpack from 0.9.10 through 1.7.5 are vulnerable to [CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')](https://cwe.mitre.org/data/definitions/79.html) (aka. XSS) in the development error handler. An attacker can utilize this to perform XSS when an exception message contains untrusted data.
As a simplistic example:
```java
RatpackServer startedServer = RatpackServer.start(server -> {
server.handlers(chain -> chain.all(ctx -> {
// User supplied query parameter
String message = ctx.getRequest().getQueryParams().get("message");
// User supplied data appended to the message in an exception
throw new RuntimeException("An error occurred: " + message);
}));
});
```
- Cross-Site Scripting
If you are unable to update your version of Ratpack, we recommend the following workarounds and mitigations.
- Ensure that development mode is disabled in production.
- Don't use real customer data (ie. untrusted user input) in development.
- GHSA-r2wf-q3x4-hrv9 -
github.com/advisories/GHSA-r2wf-q3x4-hrv9
CVEs related to QID 981602
| Advisory ID | Software | Component | Link |
|---|---|---|---|
| GHSA-r2wf-q3x4-hrv9 | io.ratpack:ratpack-core |
|