{"id":"GHSA-r2wf-q3x4-hrv9","summary":"Default development error handler in Ratpack is vulnerable to HTML content injection (XSS)","details":"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.\n\nAs a simplistic example:\n```java\nRatpackServer startedServer = RatpackServer.start(server -\u003e {\n    server.handlers(chain -\u003e chain.all(ctx -\u003e {\n        // User supplied query parameter\n        String message = ctx.getRequest().getQueryParams().get(\"message\");\n        // User supplied data appended to the message in an exception\n        throw new RuntimeException(\"An error occurred: \" + message);\n    }));\n});\n```\n\n### Impact\n\n - Cross-Site Scripting\n\n### Patches\n\nThis vulnerability has been patched in Ratpack version 1.7.6.\n\n### Workarounds\n\nIf you are unable to update your version of Ratpack, we recommend the following workarounds and mitigations.\n\n - Ensure that development mode is disabled in production.\n - Don't use real customer data (ie. untrusted user input) in development.\n\n### References\n\n - [Ratpack development mode](https://ratpack.io/manual/current/api/ratpack/server/ServerConfigBuilder.html#development-boolean-)\n - [Code Patch - a3cbb13](https://github.com/ratpack/ratpack/commit/a3cbb13be1527874528c3b99fc33517c0297b6d3)\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n - Open an issue in [ratpack/ratpack](https://github.com/ratpack/ratpack/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc)\n - Ask in our [Slack channel](https://slack-signup.ratpack.io/)\n","aliases":["CVE-2019-10770"],"modified":"2026-03-13T22:11:49.675526Z","published":"2020-01-27T19:28:20Z","database_specific":{"github_reviewed":true,"github_reviewed_at":"2020-01-27T18:23:23Z","nvd_published_at":null,"cwe_ids":["CWE-79"],"severity":"MODERATE"},"references":[{"type":"WEB","url":"https://github.com/ratpack/ratpack/security/advisories/GHSA-r2wf-q3x4-hrv9"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2019-10770"},{"type":"WEB","url":"https://github.com/ratpack/ratpack/commit/a3cbb13be1527874528c3b99fc33517c0297b6d3"},{"type":"WEB","url":"https://snyk.io/vuln/SNYK-JAVA-IORATPACK-534882"}],"affected":[{"package":{"name":"io.ratpack:ratpack-core","ecosystem":"Maven","purl":"pkg:maven/io.ratpack/ratpack-core"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.7.6"}]}],"versions":["0.9.0","0.9.1","0.9.10","0.9.11","0.9.12","0.9.13","0.9.14","0.9.15","0.9.16","0.9.17","0.9.18","0.9.19","0.9.2","0.9.3","0.9.4","0.9.5","0.9.6","0.9.7","0.9.8","0.9.9","1.0.0","1.0.0-rc-1","1.0.0-rc-2","1.0.0-rc-3","1.1.0","1.1.1","1.2.0","1.2.0-RC-1","1.2.0-rc-2","1.3.0","1.3.0-rc-1","1.3.0-rc-2","1.3.1","1.3.2","1.3.3","1.4.0","1.4.0-rc-1","1.4.0-rc-2","1.4.0-rc-3","1.4.1","1.4.2","1.4.3","1.4.4","1.4.5","1.4.6","1.5.0","1.5.1","1.5.2","1.5.3","1.5.4","1.6.0","1.6.0-rc-1","1.6.0-rc-2","1.6.0-rc-3","1.6.0-rc-4","1.6.1","1.7.0","1.7.1","1.7.2","1.7.3","1.7.4","1.7.5"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/01/GHSA-r2wf-q3x4-hrv9/GHSA-r2wf-q3x4-hrv9.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"}]}