CVE-2020-6858: HTTP Response Splitting in Styx

com.hotels.styx:styx-api Updated 02 Oct 2025

Summary

03/03/2020
Yes i
Moderate
6.5

CVE-2020-6858: HTTP Response Splitting in Styx. Affects com.hotels.styx:styx-api versions < 1.0.0-rc1. Fixed in 1.0.0-rc1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Styx is an open-source library that provides an API for building HTTP servers and clients. It is commonly used in Java applications to handle HTTP requests and responses. The vulnerable component in Styx is the com.hotels.styx.api.HttpHeaders.Builder class, which disables the built-in HTTP header validation in Netty. This vulnerability allows for HTTP response splitting attacks, where an attacker can inject arbitrary headers into the response, potentially leading to various security issues.

Vulnerability Detail

The vulnerability in Styx arises from the improper neutralization of CRLF sequences in HTTP headers, also known as 'HTTP Response Splitting' (CWE-113). By disabling the built-in header validation in Netty, an attacker can manipulate the response headers and potentially perform attacks such as cross-site scripting (XSS), session hijacking, or cache poisoning. The vulnerable code locations in Styx are the HttpHeaders.Builder class and the StyxToNettyResponseTranslator class. The impact of this vulnerability can range from information disclosure to full compromise of the application or its users.

How To Fix

Minimum fixed version

1.0.0-rc1

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

A possible workaround for this vulnerability is to manually validate and sanitize the headers before sending the response. This can be done by implementing custom logic to check for any CRLF sequences or other malicious characters in the headers. Here is an example of how this can be done in Java:

private void validateHeaders(DefaultHttpResponse response) {
    HttpHeaders headers = response.headers();
    for (String name : headers.names()) {
        String value = headers.get(name);
        if (value.contains("\r") || value.contains("\n")) {
            throw new IllegalArgumentException("Invalid header value: " + value);
        }
    }
}

By validating the headers manually, the risk of HTTP response splitting can be reduced.

Conclusion

The HTTP Response Splitting vulnerability in Styx can have serious security implications, allowing attackers to manipulate response headers and potentially compromise the application or its users. It is crucial to apply the recommended fix by enabling the built-in header validation in Netty. Regularly monitoring for vulnerabilities in open-source libraries, such as Styx, is essential to ensure the security of your applications. For further support on vulnerability remediation and monitoring, you can reach out to DevNack.com.

See every vulnerability recorded for com.hotels.styx:styx-api →

Share this vulnerability

FAQ

Styx is an open-source library for building HTTP servers and clients in Java. It provides an API for handling HTTP requests and responses.

HTTP Response Splitting is a vulnerability that allows an attacker to inject arbitrary headers into an HTTP response. This can lead to various security issues, such as cross-site scripting (XSS) or session hijacking.

The impact of this vulnerability can range from information disclosure to full compromise of the application or its users. It depends on how the manipulated headers are used and the security context of the application.

To fix this vulnerability, you need to update the code in Styx to enable the built-in header validation in Netty. Refer to the 'how_to_fix' section for detailed instructions.

Yes, a possible workaround is to manually validate and sanitize the headers before sending the response. Refer to the 'workaround' section for an example implementation.

How To Fix

Minimum fixed version

1.0.0-rc1

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback