CVE-2025-61724: Excessive CPU Consumption in net/textproto Package's Reader.ReadResponse Function

stdlib Updated 04 Nov 2025

Summary

29/10/2025
Yes i
Unrated
Not published

CVE-2025-61724: Excessive CPU consumption in Reader.ReadResponse in net/textproto. Affects stdlib across 2 version ranges.

< 1.24.8 >= 1.25.0, < 1.25.2

Fixed in 1.24.8 or 1.25.2, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2025-61724 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The net/textproto package in Go's standard library is responsible for handling text-based protocols. It provides functionalities to read and write protocol messages, making it essential for applications that communicate over text-based protocols like HTTP. The package is widely used due to its efficiency and ease of integration into Go applications. However, it is susceptible to performance issues when handling large responses, particularly due to the way the Reader.ReadResponse function constructs response strings.

Vulnerability Detail

The vulnerability arises from the Reader.ReadResponse function, which concatenates response lines using repeated string concatenation. When processing a response with a large number of lines, this method can lead to excessive CPU consumption, potentially degrading application performance or causing denial of service. The issue is particularly critical for applications that rely on processing large text responses, as it can lead to unresponsive behavior or crashes.

How To Fix

Latest published version: go1.25.5 as of 22 Oct 2026

go get stdlib@vgo1.25.5

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 1.24.8 1.24.8
    go get stdlib@v1.24.8
  • >= 1.25.0, < 1.25.2 1.25.2
    go get stdlib@v1.25.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary workaround, consider limiting the size of the responses your application processes or implementing a timeout mechanism to prevent excessive CPU usage. Additionally, you can manually handle the response parsing to avoid using the vulnerable Reader.ReadResponse function until you can update to a patched version.

Conclusion

CVE-2025-61724 presents a significant risk for applications using the net/textproto package in Go's standard library, particularly when handling large text responses. It is crucial to update to the patched versions to mitigate this vulnerability and ensure optimal application performance.

See every vulnerability recorded for stdlib →

Share this vulnerability

FAQ

CVE-2025-61724 is a vulnerability in the net/textproto package of Go's standard library that causes excessive CPU consumption when processing large response strings.

Applications that use the Reader.ReadResponse function to handle large text responses may experience performance degradation or crashes due to high CPU usage.

The vulnerability affects versions prior to 1.24.8 and 1.25.0, specifically versions 1.23.3 and earlier.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

If you cannot update the package right away, implement a workaround by limiting response sizes or using a timeout mechanism to manage CPU usage.

Related vulnerabilities

Recent vulnerabilities recorded for stdlib.

How To Fix

Latest published version: go1.25.5 as of 22 Oct 2026

go get stdlib@vgo1.25.5

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 1.24.8 1.24.8
    go get stdlib@v1.24.8
  • >= 1.25.0, < 1.25.2 1.25.2
    go get stdlib@v1.25.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback