CVE-2018-14642: Information Leak Vulnerability in Undertow

io.undertow:undertow-core Updated 02 Oct 2025

Summary

13/05/2022
Yes i
Moderate
5.3

CVE-2018-14642: Exposure of Sensitive Information to an Unauthorized Actor in Undertow. Affects io.undertow:undertow-core versions < 2.0.19.FINAL. Fixed in 2.0.19.FINAL. How to fix ↓

Also tracked for

The same CVE-2018-14642 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

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

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Undertow is a lightweight web server written in Java that is used to handle HTTP and WebSocket requests. It is commonly used in Java-based web applications. The vulnerability identified as CVE-2018-14642 allows an unauthorized actor to access sensitive information due to an information leak in Undertow. This vulnerability affects versions of the 'io.undertow:undertow-core' package up to and including 2.0.18.FINAL.

Vulnerability Detail

The vulnerability arises from a flaw in the code that handles flushing the buffer in Undertow. If all headers are not written out in the first write() call, the buffer flushing code will write out the full contents of the buffer, which may include data from previous requests. This can lead to the exposure of sensitive information to an unauthorized actor. The severity of this vulnerability is rated as MODERATE with a CVSS score of 5.3. The Common Weakness Enumeration (CWE) ID associated with this vulnerability is CWE-200.

How To Fix

Latest published version: 2.4.4.Final as of 23 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.0.19.FINAL

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

If upgrading to a fixed version is not immediately feasible, a possible workaround is to ensure that all headers are written out in the first write() call. This can be achieved by carefully managing the order and timing of header writes in the code. Here is an example of how to ensure all headers are written in a single call:

HttpServerExchange exchange = ...;
exchange.getResponseHeaders().put(Headers.CONTENT_TYPE, "application/json");
exchange.getResponseHeaders().put(Headers.SERVER, "Undertow");
exchange.getResponseHeaders().put(Headers.CACHE_CONTROL, "no-store");
exchange.getResponseHeaders().put(Headers.PRAGMA, "no-cache");
exchange.getResponseSender().send("Hello, World!");

By setting all the required headers before calling send(), the vulnerability can be mitigated.

Conclusion

In conclusion, the vulnerability identified as CVE-2018-14642 in Undertow can lead to the exposure of sensitive information to unauthorized actors. It is recommended to upgrade to a fixed version of the 'io.undertow:undertow-core' package or apply the suggested workaround. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for io.undertow:undertow-core →

Share this vulnerability

FAQ

Undertow is a lightweight web server written in Java that is commonly used in Java-based web applications. It is designed to handle HTTP and WebSocket requests efficiently.

This vulnerability allows an unauthorized actor to access sensitive information due to an information leak in Undertow. The exposed information may include data from previous requests.

The severity of this vulnerability is rated as MODERATE with a CVSS score of 5.3.

To fix this vulnerability, it is recommended to upgrade to version 2.0.19.FINAL or later of the 'io.undertow:undertow-core' package. Update the package in your project's dependency management system, such as Maven, to ensure the latest secure version is used.

If upgrading to a fixed version is not immediately feasible, a possible workaround is to ensure that all headers are written out in the first write() call. This can be achieved by carefully managing the order and timing of header writes in the code.

Related vulnerabilities

Recent vulnerabilities recorded for io.undertow:undertow-core.

How To Fix

Latest published version: 2.4.4.Final as of 23 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.0.19.FINAL

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