VYPR
Unrated severityNVD Advisory· Published Dec 14, 2023· Updated May 21, 2025

SQUID-2023:10 Denial of Service in HTTP Request parsing

CVE-2023-50269

Description

Squid is a caching proxy for the Web. Due to an Uncontrolled Recursion bug in versions 2.6 through 2.7.STABLE9, versions 3.1 through 5.9, and versions 6.0.1 through 6.5, Squid may be vulnerable to a Denial of Service attack against HTTP Request parsing. This problem allows a remote client to perform Denial of Service attack by sending a large X-Forwarded-For header when the follow_x_forwarded_for feature is configured. This bug is fixed by Squid version 6.6. In addition, patches addressing this problem for the stable releases can be found in Squid's patch archives.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Affected products

23

Patches

Vulnerability mechanics

Root cause

"Unbounded indirect recursion in clientFollowXForwardedForCheck() when processing X-Forwarded-For header elements with follow_x_forwarded_for enabled."

Attack vector

A remote client sends an HTTP request containing an excessively large `X-Forwarded-For` header (thousands of addresses) to a Squid proxy that has the `follow_x_forwarded_for` directive configured. Each address in the header triggers an immediate `nonBlockingCheck()` callback, causing unbounded indirect recursion in `clientFollowXForwardedForCheck()`. This recursion exhausts the Squid process call stack, resulting in a Denial of Service (DoS) [ref_id=1][ref_id=2].

Affected code

The vulnerability resides in `src/client_side_request.cc` in the `clientFollowXForwardedForCheck()` function. When the `follow_x_forwarded_for` feature is enabled, each X-Forwarded-For element triggers a recursive call via `nonBlockingCheck()`, with no bound on recursion depth. The patch introduces a hop counter (`currentXffHopNumber`) and a hard limit (`SQUID_X_FORWARDED_FOR_HOP_MAX`, default 64) in `src/ClientRequestContext.h` to break the recursion [ref_id=1][ref_id=2].

What the fix does

The patch introduces a per-request hop counter (`currentXffHopNumber`) and a compile-time limit (`SQUID_X_FORWARDED_FOR_HOP_MAX`, default 64). Before each recursive call to `nonBlockingCheck()`, the counter is incremented and compared against the limit. Once the limit is reached, Squid logs a critical error and falls through to resume normal processing instead of recursing further, preventing stack exhaustion [ref_id=1][ref_id=2].

Preconditions

  • configThe follow_x_forwarded_for directive must be configured in Squid's configuration.
  • networkThe attacker must be able to send HTTP requests to the Squid proxy.
  • inputThe X-Forwarded-For header must contain more than 64 addresses (or the configured SQUID_X_FORWARDED_FOR_HOP_MAX limit).

Generated on Jun 12, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

7

News mentions

0

No linked articles in our index yet.