OSV 1.4.0 · github-reviewed · 修改于 2021-08-20 00:44
发布时间
2020-01-28 03:28
GitHub 审查时间
2020-01-28 02:23
NVD 发布时间
—
源文件
advisories/github-reviewed/2020/01/GHSA-r2wf-q3x4-hrv9/GHSA-r2wf-q3x4-hrv9.json
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);
}));
});
This vulnerability has been patched in Ratpack version 1.7.6.
If you are unable to update your version of Ratpack, we recommend the following workarounds and mitigations.
If you have any questions or comments about this advisory: