Default development error handler in Ratpack is vulnerable to HTML content injection (XSS)
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') (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:
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);
}));
});
Impact
- Cross-Site Scripting
Patches
This vulnerability has been patched in Ratpack version 1.7.6.
Workarounds
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.
References
For more information
If you have any questions or comments about this advisory:
- Open an issue in ratpack/ratpack
- Ask in our Slack channel
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Java / Kotlin (Maven) | io.ratpack:ratpack-core | < 1.7.6 | 1.7.6 |
References
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N- Weakness (CWE)
CWE-79- Platform
- Java / Kotlin (Maven)
- Package
io.ratpack:ratpack-core- Disclosed
- 27.01.2020
- Updated
- 11.10.2026 12:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-r2wf-q3x4-hrv9 - CC BY 4.0
Vulnerability history: io.ratpack:ratpack-core
All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 4
- First → latest
- 10.2019 07.2021
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 1
- High 2
- Medium 1
Disclosures per year
- 2019: 1
- 2020: 1
- 2021: 2
- 2022: 0
- 2023: 0
- 2024: 0
- 2025: 0
- 2026: 0
-
Default development error handler in Ratpack is vulnerable to HTML content injection (XSS) this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.