CVE-2021-39241
HAProxy vulnerability analysis and mitigation

Overview

CVE-2021-39241 is a security vulnerability discovered in HAProxy versions 2.0 before 2.0.24, 2.2 before 2.2.16, 2.3 before 2.3.13, and 2.4 before 2.4.3. The vulnerability allows an HTTP method name to contain a space followed by the name of a protected resource, which could lead to security bypass (HAProxy Announce).

Technical details

The vulnerability exists in HAProxy's HTTP/2 implementation where the ':method' field can contain spaces. When a space is included in the method, it's possible to build an invalid HTTP/1 request on the backend side, which some lenient servers might interpret as valid. This results in a discrepancy between the request seen by HAProxy and the server, potentially allowing attackers to circumvent switching rules (HAProxy Announce).

Impact

The vulnerability could allow attackers to bypass implemented security restrictions and routing rules. For example, a request intended for one server farm could potentially be routed to a different server if the backend server fails to properly validate the input. This could lead to unauthorized access to protected resources (Red Hat CVE).

Mitigation and workarounds

Several mitigation strategies are available: 1) Reject invalid characters in the method by adding a filtering rule: 'http-request reject if { method -m reg A-Z0-9 }'. 2) For version 2.0, disable HTX internal representation using 'no option http-use-htx'. 3) Disable HTTP/2 communication entirely by setting 'tune.h2.max-concurrent-streams 0' in the global section (HAProxy Announce).

Community reactions

The vulnerability was addressed promptly by major Linux distributions. Red Hat rated this update as having a security impact of Moderate and included fixes in their OpenShift Container Platform updates (Red Hat Advisory). Fedora also released security updates to address this vulnerability in their distributions (Fedora Update).

Additional resources


SourceThis report was generated using AI

Related HAProxy vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-11230HIGH7.5
  • HAProxyHAProxy
  • haproxy
NoYesNov 19, 2025
CVE-2025-4953HIGH7.4
  • PodmanPodman
  • conmon
NoYesSep 16, 2025
CVE-2025-32464MEDIUM6.8
  • HAProxyHAProxy
  • haproxy-3.0
NoYesApr 09, 2025
CVE-2025-59303MEDIUM6.4
  • HAProxyHAProxy
  • haproxy
NoNoOct 08, 2025
CVE-2024-53008MEDIUM5.3
  • HAProxyHAProxy
  • haproxy-debugsource
NoYesNov 28, 2024

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management