HIGH 7.5

CVE-2026-55203: HAProxy Integer Overflow in FastCGI Parser (CVSS 7.5)

HAProxy versions up to 3.4.0 contain an integer overflow bug in how it parses FastCGI protocol frames from backend servers. When a malicious or compromised FastCGI backend sends specially crafted messages with maximum content length (65535 bytes) plus padding, an internal counter wraps around to zero, causing HAProxy to misinterpret where the next message begins. This can lead to request routing errors, response smuggling attacks, or memory corruption. The flaw requires an attacker to control or compromise a FastCGI backend server connected to the HAProxy instance.

Source data · NVD / CISA · public domain

CVSS
3.1 · 7.5 HIGH · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:N
Weaknesses (CWE)
CWE-190
Affected products
1 configuration(s)
Published / Modified
2026-06-18 / 2026-07-14

NVD description (verbatim)

HAProxy through 3.4.0, fixed in commit 5985276, contains an integer overflow vulnerability in the fcgi_conn structure's drl field that allows buffer misparse as new FCGI record headers. When contentLength is 65535 and paddingLength is 1 or more, the drl field wraps to 0, causing incorrect record consumption and allowing malicious FastCGI backends to desynchronize the FCGI framing parser, potentially causing request routing errors, response smuggling, or memory safety issues.

2 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability resides in the fcgi_conn structure's drl (data remaining length) field. When processing FCGI record headers, if contentLength equals 65535 and paddingLength is 1 or greater, integer arithmetic causes drl to overflow and wrap to 0. This causes the parser to incorrectly consume or skip FCGI frame boundaries, leading to desynchronization between the client-facing and backend-facing protocol state machines. An attacker-controlled FastCGI backend can exploit this to violate FCGI framing semantics, potentially causing request smuggling, routing confusion, or heap corruption if downstream code assumes certain buffer properties.

Business impact

Organizations relying on HAProxy as a reverse proxy or load balancer for FastCGI applications face potential service disruption and data integrity risks. If an attacker compromises a backend FastCGI service or can inject malicious responses, they can trigger response smuggling (delivering unintended responses to other clients), route requests to wrong destinations, or crash HAProxy workers. In defense-in-depth scenarios where the FastCGI backend is already untrusted or exposed to supply-chain risk, this vulnerability provides a direct attack vector into the proxy layer itself.

Affected systems

HAProxy versions 3.4.0 and earlier are vulnerable. The fix is available in commit 5985276. Organizations using HAProxy to proxy or load-balance FastCGI-based applications (common in PHP, Python, and other CGI environments) should prioritize verification and patching. Systems where HAProxy frontends untrusted or external FastCGI backends are at highest risk.

Exploitability

Exploitation requires the attacker to either control a FastCGI backend service or compromise one that HAProxy routes to. Public exploit code is not widely available, and the vulnerability requires precise crafting of FCGI frames to trigger. The CVSS vector reflects network-adjacent attack surface (AV:N), high complexity (AC:H), and no authentication required. Practical exploitation depends on backend compromise, which raises the bar but is plausible in compromised supply chains or misconfigured environments where backends are exposed.

Remediation

Upgrade HAProxy to a patched version containing commit 5985276 or later. Verify the specific patch version number against the official HAProxy release notes or vendor advisory. In the interim, restrict network access to FastCGI backend services—ensure only trusted HAProxy instances can connect to backends, and monitor FastCGI traffic for malformed frames. If HAProxy is exposed to untrusted backends, isolation and network segmentation are critical mitigating controls.

Patch guidance

Check the HAProxy release notes or security advisories for the patched version corresponding to commit 5985276. Update HAProxy across all load-balancing and reverse-proxy infrastructure. Test the upgrade in a staging environment first, particularly if you run custom HAProxy modules or have complex FastCGI routing logic. Verify that your FastCGI backend connections remain functional post-patch.

Detection guidance

Monitor HAProxy error logs for FCGI protocol errors, unexpected connection resets, or request routing anomalies. Look for signs of desynchronized FCGI frames (e.g., misaligned record boundaries, content-length mismatches). Network-based detection is difficult without deep packet inspection of FCGI traffic. Application-level detection should focus on unexpected request routing or response origin mismatches. If you have WAF or intrusion detection in front of HAProxy, look for backoff signatures or patterns of malformed FCGI headers from backend sources.

Why prioritize this

This vulnerability earns HIGH severity because it can enable request smuggling and response hijacking in a core infrastructure component (the proxy layer), affecting all downstream applications. Although it requires backend compromise to exploit, that scenario is increasingly plausible given supply-chain and container security risks. Organizations running HAProxy with FastCGI should prioritize patching within their standard patch cycle, particularly if backends are sourced from third parties or run untrusted code.

Risk score, explained

CVSS 7.5 reflects a network-reachable attack vector with high impact on integrity (response smuggling, routing manipulation) and low impact on confidentiality. The attack complexity is high because it requires backend compromise and precise FCGI framing. Scope is changed, meaning the vulnerability affects resources beyond the vulnerable component itself (other clients' requests and responses). The score does not account for breach likelihood if FastCGI backends are already secured; in high-trust environments, effective risk is lower, but in supply-chain or multi-tenant scenarios, it justifies timely patching.

Frequently asked questions

Do I need to patch if my FastCGI backends are internal and fully trusted?

While internal backends reduce attack surface, patching is still recommended as a defense-in-depth measure. Insider threats, supply-chain compromise of libraries running on backends, and misconfiguration errors can introduce untrusted code into the backend. Prioritize patching if any FastCGI backend touches external input or runs third-party dependencies.

Can this vulnerability be exploited from the client side (non-backend)?

No. The vulnerability requires the ability to send malformed FCGI protocol frames to HAProxy, which only FastCGI backends can do. Regular HTTP clients cannot trigger this bug. It is a backend-to-proxy attack, not a client-to-proxy attack.

What happens if the integer overflow is triggered? Will HAProxy crash?

Not necessarily immediately. The overflow causes the drl field to wrap to 0, which leads to incorrect frame boundary calculation. Depending on what follows in the FCGI stream, this can cause request routing errors, response smuggling, or memory corruption. The impact manifests as logic errors and data corruption rather than guaranteed denial of service.

How do I verify I have the patched version?

Check your HAProxy version with `haproxy -v` and cross-reference it against the official HAProxy release notes or security advisory. Look for mention of commit 5985276 or this CVE in the patch notes. If in doubt, contact HAProxy support or your vendor to confirm the fix is included.

This analysis is provided for informational purposes and reflects the CVE description and public vulnerability data as of the publish date. Organizations should verify patch version numbers and availability against official vendor advisories before planning remediation. SEC.co does not warrant the accuracy of third-party vendor statements or release timelines. Always test patches in a staging environment before production deployment. This vulnerability requires backend compromise; assess your FastCGI backend security posture independently. Source: NVD (public-domain), retrieved 2026-07-27. Analysis generated by SEC.co (claude-haiku-4-5).