Critical Vulnerability in Squid Proxy Enables Remote Code Execution

A significant security flaw has been identified in the Squid Web Proxy Cache, a widely used caching and forwarding HTTP web proxy. This vulnerability, cataloged as CVE-2025-54574, arises from improper buffer management during the processing of Uniform Resource Names (URNs). This flaw permits remote attackers to execute arbitrary code on affected systems, posing a substantial risk to organizations relying on Squid for web traffic management.

Technical Details of the Vulnerability

The core issue lies in Squid’s handling of URN responses. Specifically, when Squid processes URN Trivial-HTTP responses, it fails to manage memory buffers correctly, leading to a heap buffer overflow. This overflow can be exploited by malicious remote servers to deliver up to 4KB of Squid’s allocated heap memory to an attacker. Such memory exposure is critical, as it may contain sensitive information like authentication tokens, user credentials, or other confidential data residing in the proxy’s memory space.

Beyond mere data exposure, the buffer overflow condition opens avenues for remote code execution. Attackers can craft specific URN responses to exploit this flaw, potentially gaining control over the affected Squid proxy servers. This control could be leveraged to intercept, modify, or redirect web traffic, leading to further security breaches within the organization’s network.

Affected Versions and Scope

The vulnerability impacts a broad range of Squid versions:

– All Squid 4.x versions up to 4.17
– All Squid 5.x versions up to 5.9
– All Squid 6.x versions up to 6.3

Additionally, legacy versions prior to Squid 4.14 have not been tested but are presumed vulnerable. This extensive range of affected versions underscores the widespread nature of the risk, affecting numerous organizations that utilize Squid for web proxy services.

Risk Assessment

The severity of this vulnerability is underscored by its CVSS 3.1 score of 9.3, classifying it as critical. Several factors contribute to this high-risk rating:

– Remote Exploitability: Attackers can exploit this vulnerability remotely without requiring authentication or user interaction, making it particularly dangerous.
– Potential for Remote Code Execution: The flaw allows for the execution of arbitrary code, which can lead to full system compromise.
– Data Exposure: The heap buffer overflow can expose sensitive information stored in memory, leading to potential data breaches.

Given these factors, organizations using affected versions of Squid are at significant risk and should take immediate action to mitigate potential exploits.

Mitigation Strategies

To address this critical vulnerability, organizations should implement the following measures:

1. Immediate Workaround: Disabling URN Access

As an immediate protective measure, administrators can disable URN access by modifying Squid’s configuration. This involves creating an Access Control List (ACL) to deny URN protocol requests:

“`
acl URN proto URN
http_access deny URN
“`

Implementing this configuration change effectively blocks URN protocol requests, preventing exploitation of the vulnerable code path. While this workaround mitigates the immediate risk, it may impact services relying on URN processing, so administrators should assess the potential operational impact.

2. Updating to Patched Version

The Squid development team has released version 6.4, which addresses this vulnerability. The specific fix is documented in commit a27bf4b84da23594150c7a86a23435df0b35b988. System administrators are strongly encouraged to update to Squid 6.4 or apply vendor-specific patches corresponding to their distribution. Updating to the patched version eliminates the vulnerability and restores the secure operation of the proxy service.

Recommendations for System Administrators

– Assess Impact: Evaluate the potential impact of disabling URN access on your organization’s services and determine if this workaround is feasible in the short term.
– Plan for Update: Schedule and perform the update to Squid 6.4 as a priority to ensure long-term security.
– Monitor Systems: Implement monitoring to detect any attempts to exploit this vulnerability, even after applying mitigations, to ensure the effectiveness of the measures taken.

Conclusion

The discovery of CVE-2025-54574 in Squid Web Proxy Cache highlights the critical importance of proactive vulnerability management and timely software updates. Organizations must remain vigilant, regularly updating their systems and applying necessary patches to protect against emerging threats. By promptly addressing this vulnerability through the recommended mitigation strategies, organizations can safeguard their networks and maintain the integrity of their web proxy services.