Skip to content

rclone: Unbounded HTTP CONNECT Response Headers Can Exhaust rclone Memory

Moderate severity GitHub Reviewed Published Jul 31, 2026 in rclone/rclone • Updated Aug 5, 2026

Package

gomod github.com/rclone/rclone (Go)

Affected versions

<= 1.74.0

Patched versions

1.75.0

Description

1. Summary

The shared HTTP CONNECT helper parses a proxy response with http.ReadResponse over an unrestricted buffered reader. The production helper accepted a valid response containing a 2 MiB header in three consecutive runs. A malicious or compromised configured proxy, or an active on-path actor controlling a plaintext HTTP-proxy hop, can grow memory until the process fails.

The security impact is process-wide exhaustion, not loss of access through the malicious proxy, which the proxy already controls. The victim must configure and use the proxy, so UI is Required and the rating is Medium.

2. Affected Assets & Attack Surface

  • Verified rclone revision: a0c09f1381ae93e2a9a33c529d170186c61ad058 (v1.74.0-240-ga0c09f138)
  • Current-master check: lib/proxy/http.go was unchanged at master commit 961266888fe797390c535386f3b3aa46f4853602 on 2026-07-18
  • Shared helper: lib/proxy/http.go:23-81
  • SFTP use: backend/sftp/ssh_internal.go:25-45
  • FTP use: backend/ftp/ftp.go:465-479
  • Proxy peer: configured malicious/compromised proxy or active on-path actor for a plaintext HTTP proxy
  • TLS boundary: HTTPS proxy connections authenticate the proxy before this response is parsed, so an on-path actor must also defeat TLS

3. Technical Root Cause Analysis

HTTPConnectDial invokes http.ReadResponse(br, req) directly. This call does not inherit http.Transport.MaxResponseHeaderBytes. In the Go implementation used for validation, exported textproto.Reader.ReadMIMEHeader passes math.MaxInt64 limits, and textproto.NewReader explicitly instructs callers to use io.LimitReader or an equivalent bound for denial-of-service resistance. Rclone supplies no bound or total CONNECT-handshake deadline. The helper additionally returns the raw connection, so a safe remediation must preserve any tunnel bytes already buffered after the CONNECT response.

4. Proof-of-Concept & Evidence

  1. Configure the helper to use a test proxy.
  2. Accept rclone's CONNECT request.
  3. Return HTTP/1.1 200 Connection Established with an X-Fill header containing 2 MiB of data.
  4. The actual helper parses and accepts the entire response without a fixed ceiling; this succeeded in all three reruns.

The test establishes unbounded parsing behavior without intentionally exhausting the host.

5. Impact Assessment

Large or concurrent CONNECT responses can terminate the rclone process and interrupt unrelated FTP/SFTP remotes and mounts. Runtime OOM cannot be contained by RC panic recovery. SFTP reaches this parser before SSH server authentication, so target host-key validation does not constrain a malicious proxy; HTTPS proxy authentication does constrain ordinary on-path attackers.

6. Remediation Guidance

  • Enforce a total CONNECT status/header budget before parsing.
  • Add a fixed total handshake deadline as well as idle deadlines.
  • Close the connection on an oversized or malformed response.
  • Return a wrapper that consumes already buffered post-response tunnel bytes before the raw connection.
  • Test large single/multiple headers, slow streaming, and concurrent handshakes.

References

@ncw ncw published to rclone/rclone Jul 31, 2026
Published to the GitHub Advisory Database Aug 5, 2026
Reviewed Aug 5, 2026
Last updated Aug 5, 2026

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(30th percentile)

Weaknesses

Uncontrolled Resource Consumption

The product does not properly control the allocation and maintenance of a limited resource. Learn more on MITRE.

Allocation of Resources Without Limits or Throttling

The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. Learn more on MITRE.

CVE ID

CVE-2026-71310

GHSA ID

GHSA-xhf4-832v-7xcr

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.