{"id":"CVE-2020-6858","aliases":["CVE-2020-6858","GHSA-6v7p-v754-j89v"],"related":[],"kind":"vulnerability","state":"published","title":"HTTP Response Splitting in Styx","summary":"Hotels Styx through 1.0.0.beta8 allows HTTP response splitting due to CRLF Injection. This is exploitable if untrusted user input can appear in a response header.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Hotels Styx through 1.0.0.beta8 allows HTTP response splitting due to CRLF Injection. This is exploitable if untrusted user input can appear in a response header.","source":"cvelist"},{"lang":"en","text":"# Vulnerability\nStyx is vulnerable to CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers (&#39;HTTP Response Splitting&#39;).\n\n# Vulnerable Component\nThe vulnerable component is the `com.hotels.styx.api.HttpHeaders.Builder` due to disabling the HTTP Header validation built into Netty in these locations:\n\nhttps://github.com/HotelsDotCom/styx/blob/e1d578e9b9c38df9cd19c21dc2eb9b949d85b558/components/api/src/main/java/com/hotels/styx/api/HttpHeaders.java#L145\n\nhttps://github.com/HotelsDotCom/styx/blob/e1d578e9b9c38df9cd19c21dc2eb9b949d85b558/components/api/src/main/java/com/hotels/styx/api/HttpHeaders.java#L145\n\n`new DefaultHttpHeaders(false)` disables the built-in validation in Netty. Either use the default constructor or `new DefaultHttpHeaders(true`  instead.\n\nAdditionally, another vulnerable component is the StyxToNettyResponseTranslator due to also disabling the HTTP Header validation built into netty in this location.\n\nhttps://github.com/HotelsDotCom/styx/blob/8d60e5493e65d0d536afc0b350dcb02d24e0f7a7/components/server/src/main/java/com/hotels/styx/server/netty/connectors/StyxToNettyResponseTranslator.java#L30\n\n `DefaultHttpResponse nettyResponse = new DefaultHttpResponse(version, httpResponseStatus, false); `\n`new DefaultHttpResponse(version, httpResponseStatus, false);` disables the built-in validation in Netty. Please use the constructor `new DefaultHttpResponse(version, httpResponseStatus, true);`\n\n# Proof of Concept\nThe following test plugin proves that there is no header validation occurring.\n\n```java\n    static class VulnerablePlugin implements Plugin {\n\n        @Override\n        public Eventual&lt;LiveHttpResponse&gt; intercept(LiveHttpRequest request, Chain chain) {\n            String header = request.queryParam(&quot;header-value&quot;).get();\n            LiveHttpRequest newRequest = request.newBuilder()\n                .header(&quot;myRequestHeader&quot;, header)\n                .build();\n            return chain.proceed(newRequest).map(response -&gt;\n                response.newBuilder().header(&quot;myResponseHeader&quot;, header).build()\n            ) ;\n        }\n\n    }\n\n    @Test\n    public void simpleHeaderInjectionVulnerabilityPOC() {\n        Plugin vulnerablePlugin = new VulnerablePlugin();\n        // a simple way to mock the downstream system\n        HttpInterceptor.Chain chain = request -&gt; {\n            assertThat(request.header(&quot;myRequestHeader&quot;).orElse(null), is(&quot;test\\r\\nAnother: CRLF_Injection&quot;));\n            return Eventual.of(response(OK).build());\n        };\n\n        // an example request you expect your plugin to receive\n        String encodedGet = URLEncoder.encode(&quot;test\\r\\nAnother: CRLF_Injection&quot;);\n        LiveHttpRequest request = get(&quot;/foo?header-value=&quot; + encodedGet)\n            .build();\n\n        // since this is a test, we want to wait for the response\n        LiveHttpResponse response = Mono.from(vulnerablePlugin.intercept(request, chain)).block();\n\n        assertThat(response.header(&quot;myResponseHeader&quot;).orElse(null), is(&quot;test\\r\\nAnother: CRLF_Injection&quot;));\n    }\n```\nAdditionally, if you run this LiveHttpResponse from this test through the `StyxToNettyResponseTranslator::toNettyResponse`, ideally, it would have caused an exception to be thrown. In its current state, it does not.\n\n# Similar Vulnerabilities\nThere have been reports of similar vulnerabilities in other popular libraries.\n\nGHSA-35fr-h7jr-hh86 -&gt; CVE-2019-16771\nGHSA-mvqp-q37c-wf9j -&gt; CVE-2019-17513\n\n\n# Finding\nThis vulnerability was found due to this query that [Jonathan Leitschuh](https://twitter.com/jlleitschuh) contributed to the Semmle QL project.\nhttps://lgtm.com/rules/1510696449842/alerts/","format":"markdown","source":"ghsa"},{"lang":"es","text":"Hotels Styx versiones hasta 1.0.0.beta8, permite una división de la respuesta HTTP debido a una inyección CRLF. Esto es explotable si una entrada de usuario no confiable puede aparecer en un encabezado de respuesta.","source":"nvd"}],"published":"2020-03-03T15:32:03.000Z","modified":"2026-07-08T06:00:59.240Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-74"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.0.0-rc1"}],"ecosystem":"Maven","package":"com.hotels.styx:styx-api","purl":"pkg:maven/com.hotels.styx/styx-api","source":"ghsa"},{"ranges":[{"status":"affected","lastAffected":"0.7.10"},{"status":"affected","version":"1.0.0"},{"status":"affected","version":"1.0.0"},{"status":"affected","version":"1.0.0"},{"status":"affected","version":"1.0.0"},{"status":"affected","version":"1.0.0"},{"status":"affected","version":"1.0.0"},{"status":"affected","version":"1.0.0"},{"status":"affected","version":"1.0.0"}],"vendor":"hotels","product":"styx","cpe":"cpe:2.3:a:hotels:styx:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://twitter.com/JLLeitschuh","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/HotelsDotCom/styx/security/advisories/GHSA-6v7p-v754-j89v","tags":["exploit","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-6858","tags":["advisory"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2020-6858","url":"https://www.cve.org/CVERecord?id=CVE-2020-6858","licence":"CVE Terms of Use","modified":"2024-08-04T09:11:05.162Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6v7p-v754-j89v","url":"https://github.com/advisories/GHSA-6v7p-v754-j89v","licence":"CC-BY-4.0","modified":"2026-07-08T06:00:59.240Z"},{"source":"nvd","name":"NVD","id":"CVE-2020-6858","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-6858","licence":"Public domain","modified":"2026-06-17T03:23:55.943Z"}],"updatedAt":"2026-11-25T22:57:51.230Z","epss":{"score":0.01162,"percentile":0.68147,"date":"2026-12-02T12:00:21.000Z"}}