CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2025-12543

Host Header Havoc: Breaking Undertow's Trust Model

Amit Schendel
Amit Schendel
Senior Security Researcher

Feb 21, 2026·5 min read·399 visits

Executive Summary (TL;DR)

Undertow (the engine behind JBoss/WildFly) wasn't validating Host headers properly. It accepted duplicates, illegal ports, and garbage characters. This allows attackers to trick the server into generating malicious links or poisoning downstream caches. Fix is available in 2.3.21.Final.

A critical input validation flaw in the Undertow HTTP server core allows attackers to bypass protocol constraints using malformed Host headers. By failing to enforce RFC 7230, Undertow opens the door to Web Cache Poisoning, SSRF, and Session Hijacking in widely used Java application servers like WildFly and JBoss EAP.

The Hook: Who Needs Standards Anyway?

In the world of HTTP, the Host header is the ID card of a request. It tells the server who you are trying to reach in a crowded room of virtual hosts. RFC 7230 is very specific about this card: you get exactly one, and it must look a certain way.

Undertow, the high-performance non-blocking I/O web server used by Red Hat's heavy hitters (WildFly, JBoss EAP), apparently decided these rules were more like "guidelines."

CVE-2025-12543 isn't a complex buffer overflow or a magical deserialization gadget. It's a fundamental failure to say "No" to bad input. By allowing multiple Host headers, malformed ports (port 90000, anyone?), and garbage characters, Undertow created a playground for ambiguity. And in security, ambiguity is where the exploits live.

The Flaw: A Tale of Two Headers

The core issue lies in io.undertow:undertow-core. When a request comes in, the server parses the headers to decide how to route the traffic and how to construct absolute URLs for redirects or references.

Prior to the fix, Undertow suffered from multiple personality disorder regarding the Host header. It failed to validate three key things:

  1. Multiplicity: It didn't strictly reject requests with multiple Host headers.
  2. Port Sanity: It happily accepted ports larger than 65535.
  3. Syntax: It allowed unbracketed IPv6 addresses and invalid characters in the DNS name.

This matters because modern web architectures are layered. You have CDNs, Load Balancers, Reverse Proxies, and finally the Application Server. If the Load Balancer looks at the first Host header (legitimate) and Undertow looks at the second (malicious), you have a classic HTTP Desync or Cache Poisoning scenario. The front-end thinks it's serving good.com, but the back-end is generating content for evil.com.

The Code: The Smoking Gun

The fix involved introducing a completely new handler, HostHeaderHandler.java, to act as a bouncer. Before this, the validation was virtually non-existent.

Here is a simplified look at the logic that had to be added to stop the madness. Notice the explicit checks that were missing before:

// In HostHeaderHandler.java (The Fix)
String hostHeader = exchange.getRequestHeaders().getFirst(Headers.HOST);
 
// 1. Check for multiple headers
if (exchange.getRequestHeaders().count(Headers.HOST) > 1) {
    // RFC 7230: Must reject with 400
    exchange.setStatusCode(StatusCodes.BAD_REQUEST);
    exchange.endExchange();
    return;
}
 
// 2. Parse and Validate Port
if (colonIndex != -1) {
    String portString = hostHeader.substring(colonIndex + 1);
    try {
        int port = Integer.parseInt(portString);
        // The "Whoops" moment: valid ports are 0-65535
        if (port < 0 || port > 65535) {
             throw new NumberFormatException();
        }
    } catch (NumberFormatException e) {
        exchange.setStatusCode(StatusCodes.BAD_REQUEST);
        return;
    }
}

The fact that this logic had to be added implies that previously, you could send Host: internal-admin:99999 and Undertow would likely just shrug and pass it up the stack to the application, which might crash or, worse, try to use it.

The Exploit: Poisoning the Well

Let's weaponize this. The most practical attack vector here is Web Cache Poisoning.

Imagine a JBoss EAP server sitting behind a caching reverse proxy (like Varnish or Akamai). The proxy uses the Host header as part of the cache key.

Step 1: The attacker sends a request with a malformed port that the Proxy ignores or sanitizes, but Undertow accepts.

GET /reset-password HTTP/1.1
Host: target.com
Host: evil.com

Step 2: The Proxy sees target.com. It doesn't have a cached copy, so it forwards the request.

Step 3: Undertow receives the request. Due to the flaw, it might process the second header evil.com as the valid authority for generating links.

Step 4: The application generates a password reset link using the server's view of the Host: https://evil.com/reset-token?user=admin

Step 5: The Proxy receives this response. Since it thinks the request was for target.com, it caches this malicious response.

Step 6: A legitimate user visits target.com/reset-password. The Proxy serves the cached content. The user clicks the link and sends their reset token directly to the attacker.

The Impact: Why the CVSS 9.6?

You might be thinking, "It's just a header, relax." But the CVSS 9.6 (Critical) reflects the reality of how deeply the Host header is trusted in Java ecosystems.

1. SSRF (Server-Side Request Forgery): If the application uses request.getServerName() to build internal service calls, an attacker can redirect internal traffic to arbitrary hosts.

2. Data Leakage: As shown in the exploit above, password reset tokens and session IDs are frequently leaked via Location headers in 302 redirects generated by the container.

3. Access Control Bypass: Many internal apps use host-based checking to allow administrative access (e.g., "Only allow requests from localhost or admin.internal"). By manipulating the header, an attacker can spoof these trusted origins.

This isn't just a bug; it's a foundational trust failure in the HTTP processing pipeline.

The Fix: Closing the Door

Red Hat and the Undertow team have released patches that enforce strict RFC compliance. If you are running WildFly, JBoss EAP, or standalone Undertow, you need to update immediately.

Fixed Versions:

  • Undertow 2.3.21.Final
  • Undertow 2.2.39.Final

If patching is administratively impossible right now (we've all been there), your best defense is a Web Application Firewall (WAF).

Configure your WAF to:

  1. Drop requests with more than one Host header.
  2. Reject Host headers containing characters other than alphanumerics, hyphens, dots, and colons.
  3. Validate that the port number is numeric and <= 65535.

Don't rely on the app server to save you; clearly, it wasn't designed to.

Official Patches

Red HatRed Hat Security Advisory for CVE-2025-12543
GitHubPull Request #1857 containing the fix source code

Fix Analysis (1)

Technical Appendix

CVSS Score
9.6/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:L
EPSS Probability
0.08%
Top 77% most exploited

Affected Systems

Red Hat JBoss Enterprise Application Platform (EAP) 7.xRed Hat JBoss Enterprise Application Platform (EAP) 8.1WildFly (Undertow < 2.3.21)Red Hat Enterprise Linux 8, 9, 10Red Hat build of Apache CamelRed Hat Data Grid 8Red Hat Fuse 7Red Hat Single Sign-On 7

Affected Versions Detail

Product
Affected Versions
Fixed Version
Undertow
Red Hat / JBoss
< 2.2.39.Final2.2.39.Final
Undertow
Red Hat / JBoss
2.3.0 - 2.3.20.Final2.3.21.Final
AttributeDetail
CWECWE-20 (Improper Input Validation)
CVSS9.6 (Critical)
Attack VectorNetwork
ImpactCache Poisoning, SSRF, Session Hijacking
EPSS0.076%
Exploit StatusPOC Available (Unit Tests)

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1557Adversary-in-the-Middle
Credential Access
T1133External Remote Services
Persistence
CWE-20
Improper Input Validation

The product receives input or data, but does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.

Known Exploits & Detection

InternalProof of concept unit tests included in the remediation PR showing multi-host header rejection.

Vulnerability Timeline

Internal report filed in Red Hat Bugzilla
2025-10-31
Fix development started (PR #1857)
2025-11-04
CVE-2025-12543 publicly assigned
2026-01-07
Security Advisories Released (RHSA-2026:0383)
2026-01-08

References & Sources

  • [1]Red Hat CVE Database
  • [2]RFC 7230: Host Header Specification

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 2 hours ago•GHSA-JHJP-4C2Q-XMX4
8.1

GHSA-JHJP-4C2Q-XMX4: Falco k8saudit Plugin Ruleset Bypass via initContainers and ephemeralContainers

A security feature bypass vulnerability in the Falco k8saudit plugin (and its cloud-specific variants) allowed privileged workloads to run undetected. This bypass occurred because the plugin's default extraction logic and rules only evaluated standard containers, completely omitting initContainers and ephemeralContainers.

Amit Schendel
Amit Schendel
3 views•6 min read
•about 3 hours ago•CVE-2026-61630
4.2

CVE-2026-61630: Time-Based One-Time Password (TOTP) Reuse/Replay in nginx-ignition

nginx-ignition is a web-based user interface for managing the Nginx web server. In versions 2.33.0 through 2.35.0, the application is vulnerable to an improper authentication flaw (CWE-287) in its Multi-Factor Authentication (MFA) implementation. The stateless validation of Time-Based One-Time Passwords (TOTP) allows an attacker to reuse a captured, active verification code multiple times within the standard 30-second validity window, successfully bypassing secondary authentication checks if primary credentials are known.

Amit Schendel
Amit Schendel
5 views•5 min read
•about 4 hours ago•CVE-2026-61629
7.5

CVE-2026-61629: CPU Amplification Denial of Service via ParseAcceptLanguage Underscore Bypass

A vulnerability exists in the i18n middleware of nginx-ignition, enabling CPU amplification attacks. By transmitting a crafted Accept-Language header containing malformed tags separated by underscores, an unauthenticated remote attacker can bypass the length-guard threshold of the underlying Go parsing library. Normalization of underscores to hyphens occurs after the initial validation checks, forcing the parser into expensive quadratic-time loops that consume 100% of available CPU resources. This leads to a complete denial of service for the administrative API and potentially degrades the availability of the hosting system. This vulnerability has been resolved in version 2.40.1.

Alon Barad
Alon Barad
5 views•7 min read
•about 5 hours ago•CVE-2026-61628
8.1

CVE-2026-61628: Unauthenticated Admin Account Creation via Onboarding Race Condition in Nginx Ignition

Nginx Ignition prior to version 2.41.1 contains a Time-of-Check to Time-of-Use (TOCTOU) race condition in its unauthenticated onboarding API endpoint. This flaw allows remote, unauthenticated attackers to register an administrative account by sending concurrent HTTP requests during the initial system configuration phase, bypassing the check meant to restrict onboarding to a single initial administrator.

Amit Schendel
Amit Schendel
7 views•6 min read
•about 11 hours ago•CVE-2026-61687
7.1

CVE-2026-61687: OAuth State Validation Bypass and Login CSRF in Hatchet

A logic error in Hatchet's OAuth state validation mechanism allows unauthenticated remote attackers to bypass state parameter verification. By submitting an empty state parameter, attackers can exploit an equality collision with cleared session keys, facilitating Login Cross-Site Request Forgery (Login CSRF) or Session Fixation.

Amit Schendel
Amit Schendel
9 views•10 min read
•2 days ago•CVE-2026-58197
8.8

CVE-2026-58197: Host Escape and Lateral Movement via Insecure Container Network Defaults in ToolHive

A high-severity access control vulnerability in ToolHive CLI before v0.30.1 and ToolHive Studio before v0.38.0 allows local containerized MCP servers to bypass network isolation. This enables malicious workloads to establish TCP/IP connections to administrative and control plane endpoints exposed on the host loopback interface.

Amit Schendel
Amit Schendel
12 views•8 min read