Skip to content

CVE-2026-45232: Verified Repro With Script Download

CVE-2026-45232: rsync: off-by-one out-of-bounds stack write in establish proxy connection

CVE-2026-45232 is verified against rsync · c. Affected versions: < 3.4.3. Fixed in 3.4.3. Vulnerability class: OOB Write. This low reproduction includes runnable sandbox proof, artifacts, and a plain-text agent view under REPRO-2026-00141.

REPRO-2026-00141 rsync · c OOB Write May 22, 2026 CVE entry ↗ .txt
Severity
LOW
CVSS
3.1
Reproduced in
29m 29s
Tool calls
144
Spend
$1.02
01 · Overview

What Is CVE-2026-45232?

CVE-2026-45232 is a low-severity off-by-one out-of-bounds stack write (CWE-193 / CWE-787) in rsync's establish_proxy_connection(), triggered when connecting through a malicious HTTP proxy. Pruva reproduced it (reproduction REPRO-2026-00141).

02 · Severity & CVSS

CVE-2026-45232 Severity & CVSS Score

CVE-2026-45232 is rated low severity, with a CVSS base score of 3.1 out of 10.

LOW threat level
3.1 / 10 CVSS base
Weakness CWE-193 (Off-by-one Error) / CWE-787 (Out-of-Bounds Write)

Low — limited impact or hard to exploit. Address in the normal cycle.

03 · Affected Versions

Affected rsync Versions

rsync · c versions < 3.4.3 are affected.

How to Reproduce CVE-2026-45232

$ pruva-verify REPRO-2026-00141
or curl -O https://pruva.dev/api/v1/reproductions/REPRO-2026-00141/artifacts/reproduction_steps.sh && chmod +x reproduction_steps.sh && ./reproduction_steps.sh
Run in a VM or disposable container. This exploits a real vulnerability.
06 · Proof of Reproduction

Proof of Reproduction for CVE-2026-45232

Reproduced by Pruva's autonomous agents — 144 tool calls over 29 min. Full root-cause analysis and the complete transcript are below.

How the agent worked 498 events · 144 tool calls · 29 min
29 minDuration
144Tool calls
116Reasoning steps
498Events
2Dead-ends
Agent activity over 29 min
Support
30
Repro
174
Variant
290
0:0029:29

Root Cause and Exploit Chain for CVE-2026-45232

Summary

CVE-2026-45232 is an off-by-one out-of-bounds stack write vulnerability in the rsync utility. The bug resides in establish_proxy_connection() within socket.c. When rsync connects through an HTTP proxy (configured via RSYNC_PROXY), it reads the proxy's CONNECT response into a 1024-byte stack buffer. If the proxy returns an overlong response (1023+ bytes without a newline terminator), post-loop null-termination logic writes one byte past the buffer's end, corrupting adjacent stack memory.

Impact

  • Package: rsync (C CLI tool)
  • Affected versions: < 3.4.2
  • Fixed version: 3.4.3
  • Risk level: Low (NVD CVSS 3.1 base 3.1)
  • Consequences: A malicious or MITM'd HTTP proxy can trigger a single-byte stack overwrite, potentially leading to a crash or undefined behavior. The overwritten byte is always a null terminator (\0), and the attacker does not control the offset, limiting exploitability.

Root Cause

In socket.c, establish_proxy_connection() declares a stack buffer char buffer[1024] and reads the proxy response one byte at a time into buffer[0] through buffer[1022]. The loop condition is cp < &buffer[sizeof buffer - 1].

If no newline arrives before the buffer is filled, cp is left at &buffer[1023] (the last valid index). The post-loop code then executes:

if (*cp != '\n')
    cp++;
*cp-- = '\0';

Because *cp was never written by the loop (it contains stale stack data), the if is usually true, so cp++ advances past the array to &buffer[1024]. The subsequent *cp = '\0' writes one byte out of bounds.

Fix commit: a5fc5ebe7a8ef1aa72f6e344599f97fd4427ecba ("socket: reject over-long proxy response line")

The fix:

  1. Increases the buffer size to PROXY_BUF_SIZE + 1 (1025 bytes) for safe null-termination
  2. Adds an explicit check: if cp == &buffer[PROXY_BUF_SIZE - 1], reject with "proxy response line too long" instead of writing past the buffer
  3. Correctly null-terminates within bounds for shorter responses

Reproduction Steps

  1. repro/reproduction_steps.sh clones the rsync repository, checks out v3.4.2 (vulnerable) and v3.4.3 (fixed), and builds both with AddressSanitizer (-fsanitize=address).
  2. It starts a minimal Python TCP mock proxy that binds to a local ephemeral port, accepts one connection, reads the CONNECT request headers, and sends exactly 1023 bytes of 'X' with no newline terminator.
  3. It runs rsync via RSYNC_PROXY=127.0.0.1:<port> against each build.
  4. Expected behavior:
    • v3.4.2 (vulnerable): AddressSanitizer reports stack-buffer-overflow at establish_proxy_connection (socket.c:95), and rsync aborts.
    • v3.4.3 (fixed): rsync prints "proxy response line too long" and exits with error code 10 (non-zero but no crash).

Evidence

  • Log files:
    • logs/rsync_v3.4.2_proxy.log — ASan output for the vulnerable build
    • logs/rsync_v3.4.3_proxy.log — stderr for the fixed build
  • ASan excerpt (vulnerable build):
    ==7440==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f747c600940
    WRITE of size 1 at 0x7f747c600940 thread T0
        #0 establish_proxy_connection /tmp/.../rsync/socket.c:95
        ...
    Memory access at offset 2368 overflows this variable
        [1344, 2368) 'buffer' (line 55)
    
  • Fixed build excerpt:
    proxy response line too long
    rsync error: error in socket IO (code 10) at clientserver.c(141) [Receiver=3.4.3]
    
  • Runtime manifest: repro/runtime_manifest.json records build versions, exit codes, ASan excerpt, payload size (1023 bytes), and confirmation flags.

Recommendations / Next Steps

  1. Upgrade to rsync >= 3.4.3 to obtain the bounds-check fix.
  2. Network controls: Restrict proxy configurations (RSYNC_PROXY) to trusted infrastructure to reduce exposure to malicious proxies.
  3. Testing: The upstream test testsuite/proxy-response-line-too-long.test should be included in CI to prevent regression.
  4. Build hardening: Compile with -fstack-protector-strong and ASan in QA pipelines to detect similar stack overwrites early.

Additional Notes

  • Idempotency: The reproduction script was run twice consecutively; both runs produced identical ASan crashes on v3.4.2 and clean rejection on v3.4.3.
  • Payload specifics: 1023 bytes of 'X' without a newline is the exact boundary that triggers the off-by-one. A shorter payload does not trigger the bug; a newline-terminated payload exits the read loop early.
  • Build environment: Tested on x86_64-pc-linux-gnu with GCC and AddressSanitizer. The bug is architecture-agnostic, but ASan makes the one-byte overwrite reliably observable.

CVE-2026-45232 Reproduction Transcript

The agent's step-by-step process — every tool call, every handoff, the moment the exploit fired.

Full session Replay every step — scrub the timeline or play it back.

Event 1/40
0:001:09
0:00
session startedaccounts/fireworks/models/kimi-k2p6 · cve-2026-45232 · cve-2026
0:03
0:05
web search
0:06
0:08
0:10
web search
0:11
0:14
0:15
web search
0:17
0:18
0:23
0:25
web search
0:57
0:57
extract_facts
no facts extracted
0:58
0:58
0:58
supportrepro
1:02
1:08
1:09

Artifacts and Evidence for CVE-2026-45232

Scripts, logs, diffs, and output captured during the reproduction.

No artifacts available

08 · How to Fix

How to Fix CVE-2026-45232

Upgrade rsync · c to 3.4.3 or later.

Coming soon

Step-by-step mitigation and hardening guidance for CVE-2026-45232 — configuration checks, workarounds where no patch exists, and how to verify you're protected — is on the way.

10 · FAQ

FAQ: CVE-2026-45232

How does the rsync proxy-response overflow attack work?

A malicious or MITM'd HTTP proxy (configured via RSYNC_PROXY) returns an overlong CONNECT response with no newline terminator before the 1024-byte buffer fills; rsync's post-loop null-termination logic then writes a single stray null byte one position past the stack buffer, corrupting adjacent stack memory. The attacker does not control the offset or the byte value, which limits exploitability to a crash/undefined-behavior primitive.

Which rsync versions are affected by CVE-2026-45232, and where is it fixed?

rsync versions before 3.4.3 are affected; it is fixed in 3.4.3.

How severe is CVE-2026-45232?

It is rated low severity (NVD CVSS 3.1 base 3.1) - the overwritten byte is always a null terminator at a fixed offset, so impact is limited to a possible crash rather than attacker-controlled code execution.

How can I reproduce CVE-2026-45232?

Download the verified script from this page and run it in an isolated environment against rsync <3.4.3 configured with RSYNC_PROXY; it stands up a malicious proxy that returns an overlong CONNECT response without a newline and shows the one-byte stack overwrite in establish_proxy_connection(), then confirms 3.4.3 does not overflow.
11 · References

References for CVE-2026-45232

Authoritative sources for CVE-2026-45232 — official vulnerability databases and the upstream advisory. Pruva's reproduction verifies the issue firsthand; these are the primary records to corroborate it.