CVE-2019-19703: URL Redirection to Untrusted Site in Ktor

io.ktor:ktor-client-core Updated 02 Oct 2025

Summary

12/02/2020
Yes i
Moderate
6.1

CVE-2019-19703: URL Redirection to Untrusted Site (Open Redirect) in Ktor. Affects io.ktor:ktor-client-core versions < 1.3.0. Fixed in 1.3.0. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Ktor is a framework for building asynchronous servers and clients in connected systems using Kotlin programming language. It provides a set of APIs for creating web applications, HTTP clients, and more. The Ktor client library, specifically the 'ktor-client-core' package, is affected by a URL redirection vulnerability.

Vulnerability Detail

The vulnerability, identified as CVE-2019-19703, allows an attacker to redirect a user to an untrusted website by manipulating the HTTP Authorization header. This can lead to various attacks, such as phishing, where the user is tricked into visiting a malicious site that appears legitimate. The vulnerability exists in Ktor versions up to 1.2.6.

How To Fix

Minimum fixed version

1.3.0

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

As a temporary workaround, you can manually validate and sanitize the redirect URL before performing the redirection. This can be done by checking if the URL belongs to a trusted domain or using a whitelist of allowed redirect URLs. Here's an example in Kotlin:

fun isRedirectUrlSafe(url: String): Boolean {
    val trustedDomains = listOf("example.com", "trusteddomain.com")
    val parsedUrl = URL(url)
    return trustedDomains.contains(parsedUrl.host)
}

Before redirecting, you can call the isRedirectUrlSafe function to ensure the URL is safe to redirect to.

Conclusion

In conclusion, the URL redirection vulnerability in Ktor's 'ktor-client-core' package (CVE-2019-19703) can be mitigated by upgrading to version 1.3.0 or later. It is recommended to promptly update the affected package in your project to ensure the security of your application. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for io.ktor:ktor-client-core →

Share this vulnerability

FAQ

Ktor is a framework for building asynchronous servers and clients in connected systems using Kotlin programming language. It provides a set of APIs for creating web applications, HTTP clients, and more.

The 'ktor-client-core' package is a component of the Ktor framework that provides functionality for making HTTP requests as a client. It is used to interact with external APIs, web services, and other HTTP-based resources.

URL redirection is a technique used to redirect a user from one web page to another. It is commonly used for various purposes, such as redirecting users to a different page after login or redirecting from HTTP to HTTPS.

The URL redirection vulnerability in Ktor can be exploited by attackers to redirect users to malicious websites. This can lead to phishing attacks, where users are tricked into entering sensitive information on fake websites that appear legitimate. It can also be used for other types of attacks, such as spreading malware or conducting further targeted attacks.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities in software, using just the pom.xml file as input.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

1.3.0

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