Medium

Default development error handler in Ratpack is vulnerable to HTML content injection (XSS)

  • Disclosed: 27.01.2020
  • Updated: 11.10.2026 12:22

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:

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);
    }));
});

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:

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Java / Kotlin (Maven) io.ratpack:ratpack-core < 1.7.6 1.7.6

References

CVSS score 6.1/10
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

  1. 2019: 1
  2. 2020: 1
  3. 2021: 2
  4. 2022: 0
  5. 2023: 0
  6. 2024: 0
  7. 2025: 0
  8. 2026: 0
  1. High · 7.0 CVE-2021-29479 < 1.9.0 1.9.0
  2. Critical · 9.9 CVE-2021-29485 < 1.9.0 1.9.0
  3. Default development error handler in Ratpack is vulnerable to HTML content injection (XSS) this entry
    Medium · 6.1 CVE-2019-10770 < 1.7.6 1.7.6

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.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.