CVE-2019-17513
Description
Ratpack before 1.7.5 fails to validate HTTP header values for control characters, enabling HTTP Response Splitting when untrusted data is used in headers.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Ratpack before 1.7.5 fails to validate HTTP header values for control characters, enabling HTTP Response Splitting when untrusted data is used in headers.
Root
Cause
Ratpack versions 0.9.1 through 1.7.4 misuse the Netty DefaultHttpHeaders class with header validation disabled, allowing CRLF (carriage return and line feed) characters in response header values [1][3]. This omission means that arbitrary HTTP control characters are not rejected, enabling HTTP Response Splitting attacks.
Exploitation
An attacker can exploit this vulnerability if the application uses untrusted user input (e.g., query parameters, form fields) as the value of an HTTP response header without sanitization [2]. No authentication is required if the vulnerable endpoint is publicly accessible. By injecting CRLF sequences, the attacker can terminate the current response and inject a completely new HTTP response, including arbitrary headers and body content [2][3].
Impact
Successful exploitation allows an attacker to perform cross-user defacement, cache poisoning, cross-site scripting (XSS), and page hijacking [2]. For example, injecting a Content-Type: text/html header followed by a `` tag can execute arbitrary JavaScript in the victim's browser [2].
Mitigation
The vulnerability is fixed in Ratpack version 1.7.5 [4]. Users are strongly advised to upgrade. As a workaround, applications should validate and sanitize any user-supplied data used as response header values, ensuring no CRLF sequences are present [2][4].
AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
io.ratpack:ratpack-coreMaven | < 1.7.5 | 1.7.5 |
Affected products
2- Ratpack/Ratpackdescription
Patches
31 file changed · +1 −1
ratpack.gradle+1 −1 modified@@ -39,7 +39,7 @@ buildscript { } allprojects { - version = "1.7.5-SNAPSHOT" + version = "1.7.5" } ext {
c560a8d10cb8Add test for response header validation
1 file changed · +42 −0
ratpack-core/src/test/groovy/ratpack/http/ResponseHeaderValidationSpec.groovy+42 −0 added@@ -0,0 +1,42 @@ +/* + * Copyright 2019 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ratpack.http + +import ratpack.test.internal.RatpackGroovyDslSpec + +class ResponseHeaderValidationSpec extends RatpackGroovyDslSpec { + + def "invalid header values yield exception"() { + when: + handlers { + all { + try { + header("Test", "value\r\nAnotherHeader: another value") + render "ok" + } catch (e) { + render e.toString() + } + } + } + + then: + def response = get() + response.headers.names == ['content-type', 'content-length'].toSet() + response.body.text == "java.lang.IllegalArgumentException: only ' ' and '\\t' are allowed after '\\n': value\r\nAnotherHeader: another value" + } + +}
efb910d38a96Enable HTTP header validation
1 file changed · +1 −1
ratpack-core/src/main/java/ratpack/server/internal/NettyHandlerAdapter.java+1 −1 modified@@ -156,7 +156,7 @@ private void newRequest(ChannelHandlerContext ctx, HttpRequest nettyRequest) thr channel.attr(CLIENT_CERT_KEY).get() ); - HttpHeaders nettyHeaders = new DefaultHttpHeaders(false); + HttpHeaders nettyHeaders = new DefaultHttpHeaders(); MutableHeaders responseHeaders = new NettyHeadersBackedMutableHeaders(nettyHeaders); AtomicBoolean transmitted = new AtomicBoolean(false);
Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
7- github.com/advisories/GHSA-mvqp-q37c-wf9jghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2019-17513ghsaADVISORY
- github.com/ratpack/ratpack/commit/c560a8d10cb8bdd7a526c1ca2e67c8f224ca23aeghsax_refsource_MISCWEB
- github.com/ratpack/ratpack/commit/efb910d38a96494256f36675ef0e5061097dd77dghsax_refsource_MISCWEB
- github.com/ratpack/ratpack/releases/tag/v1.7.5ghsax_refsource_CONFIRMWEB
- github.com/ratpack/ratpack/security/advisories/GHSA-mvqp-q37c-wf9jghsax_refsource_CONFIRMWEB
- ratpack.io/versions/1.7.5ghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.