Lucene search

K
githubGitHub Advisory DatabaseGHSA-R2WF-Q3X4-HRV9
HistoryJan 27, 2020 - 7:28 p.m.

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

2020-01-2719:28:20
CWE-79
GitHub Advisory Database
github.com
50

4.3 Medium

CVSS2

Attack Vector

NETWORK

Attack Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

NONE

Integrity Impact

PARTIAL

Availability Impact

NONE

AV:N/AC:M/Au:N/C:N/I:P/A:N

6.1 Medium

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

REQUIRED

Scope

CHANGED

Confidentiality Impact

LOW

Integrity Impact

LOW

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

0.001 Low

EPSS

Percentile

37.5%

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:

Affected configurations

Vulners
Node
io.ratpack\ratpackMatchcore
CPENameOperatorVersion
io.ratpack:ratpack-corelt1.7.6

4.3 Medium

CVSS2

Attack Vector

NETWORK

Attack Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

NONE

Integrity Impact

PARTIAL

Availability Impact

NONE

AV:N/AC:M/Au:N/C:N/I:P/A:N

6.1 Medium

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

REQUIRED

Scope

CHANGED

Confidentiality Impact

LOW

Integrity Impact

LOW

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

0.001 Low

EPSS

Percentile

37.5%

Related for GHSA-R2WF-Q3X4-HRV9