GHSA-R2WF-Q3X4-HRV9
Vulnerability from github – Published: 2020-01-27 19:28 – Updated: 2021-08-19 16:44
VLAI?
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') (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
Severity ?
6.1 (Medium)
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "io.ratpack:ratpack-core"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.7.6"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2019-10770"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": true,
"github_reviewed_at": "2020-01-27T18:23:23Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"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 (\u0027Cross-site Scripting\u0027)](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\u0027t 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",
"id": "GHSA-r2wf-q3x4-hrv9",
"modified": "2021-08-19T16:44:56Z",
"published": "2020-01-27T19:28:20Z",
"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"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
],
"summary": "Default development error handler in Ratpack is vulnerable to HTML content injection (XSS)"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…