CVE-2022-38179
Description
JetBrains Ktor before 2.1.0 was vulnerable to the Reflect File Download attack
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
JetBrains Ktor before 2.1.0 is vulnerable to Reflect File Download (RFD) attacks due to improper Content-Disposition header encoding.
Vulnerability
Overview CVE-2022-38179 affects JetBrains Ktor versions prior to 2.1.0. The vulnerability is a Reflect File Download (RFD) attack, which occurs when a web application reflects user-supplied input in file download responses without proper sanitization. In Ktor, this was possible because the framework did not properly encode the Content-Disposition filename* parameter, allowing an attacker to inject arbitrary characters and manipulate the download behavior [1][3].
Exploitation
An attacker can exploit this by crafting a malicious URL that causes the Ktor server to respond with a file download containing a filename that includes special characters. When the user clicks the link, the browser may misinterpret the response and execute code locally, depending on the filename extension and user interaction. The attack requires no authentication if the vulnerable endpoint is publicly accessible; it relies on tricking a user into clicking a crafted link [2].
Impact
Successful exploitation can lead to arbitrary code execution on the client's machine. For example, if the response is treated as a downloadable file with a .bat or .cmd extension, the browser might prompt the user to run it, leading to system compromise. This is a significant client-side risk, especially in environments where users have limited awareness of such attacks [2].
Mitigation
The vulnerability is fixed in Ktor version 2.1.0 and later. Users are strongly advised to upgrade to the latest version. The fix involved encoding the filename* parameter according to RFC 5987, ensuring that only allowed attribute characters are used in Content-Disposition headers [3]. No workarounds are documented; upgrading is the recommended action.
AI Insight generated on May 21, 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.ktor:ktorMaven | < 2.1.0 | 2.1.0 |
Affected products
2Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
5- github.com/advisories/GHSA-v866-gwf5-w92fghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2022-38179ghsaADVISORY
- github.com/ktorio/ktor/pull/3110ghsax_refsource_MISCWEB
- www.jetbrains.com/privacy-security/issues-fixedghsaWEB
- www.jetbrains.com/privacy-security/issues-fixed/mitrex_refsource_MISC
News mentions
0No linked articles in our index yet.