Security Vulnerability Report
中文
CVE-2025-61724 CVSS 5.3 MEDIUM

CVE-2025-61724

Published: 2025-10-29 23:16:20
Last Modified: 2026-01-29 15:30:54

Description

The Reader.ReadResponse function constructs a response string through repeated string concatenation of lines. When the number of lines in a response is large, this can cause excessive CPU consumption.

CVSS Details

CVSS Score
5.3
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Configurations (Affected Products)

cpe:2.3:a:golang:go:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:golang:go:*:*:*:*:*:*:*:* - VULNERABLE
Go < 1.23.x (待确认具体版本)
Go < 1.22.x (待确认具体版本)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
package main import ( "fmt" "strings" ) // Vulnerable function - simulates Reader.ReadResponse func ReadResponseVulnerable(lineCount int) string { result := "" for i := 0; i < lineCount; i++ { result += fmt.Sprintf("line%d: data\n", i) // Inefficient concatenation } return result } // Fixed function - uses strings.Builder func ReadResponseFixed(lineCount int) string { var builder strings.Builder for i := 0; i < lineCount; i++ { builder.WriteString(fmt.Sprintf("line%d: data\n", i)) } return builder.String() } func main() { lineCount := 100000 // Large number of lines fmt.Printf("Testing with %d lines\n", lineCount) // Vulnerable version - high CPU usage resultV := ReadResponseVulnerable(lineCount) fmt.Printf("Vulnerable version completed, length: %d\n", len(resultV)) // Fixed version - efficient resultF := ReadResponseFixed(lineCount) fmt.Printf("Fixed version completed, length: %d\n", len(resultF)) } // Attack scenario: // 1. Attacker controls data source or performs MITM attack // 2. Attacker sends response with 100,000+ lines // 3. Target application calls ReadResponse() // 4. O(n²) string concatenation causes CPU spike // 5. Service becomes unresponsive or crashes

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-61724", "sourceIdentifier": "[email protected]", "published": "2025-10-29T23:16:20.020", "lastModified": "2026-01-29T15:30:53.690", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "The Reader.ReadResponse function constructs a response string through repeated string concatenation of lines. When the number of lines in a response is large, this can cause excessive CPU consumption."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "LOW"}, "exploitabilityScore": 3.9, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-770"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.24.8", "matchCriteriaId": "E1AB9501-4F7D-4E37-BA0A-4E57B082530C"}, {"vulnerable": true, "criteria": "cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*", "versionStartIncluding": "1.25.0", "versionEndExcluding": "1.25.2", "matchCriteriaId": "C196D175-EF20-476C-8C64-1B9F5C50AA2D"}]}]}], "references": [{"url": "https://go.dev/cl/709859", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://go.dev/issue/75716", "source": "[email protected]", "tags": ["Issue Tracking"]}, {"url": "https://groups.google.com/g/golang-announce/c/4Emdl2iQ_bI", "source": "[email protected]", "tags": ["Mailing List", "Release Notes"]}, {"url": "https://pkg.go.dev/vuln/GO-2025-4015", "source": "[email protected]", "tags": ["Vendor Advisory"]}, {"url": "http://www.openwall.com/lists/oss-security/2025/10/08/1", "source": "af854a3a-2127-422b-91ae-364da2661108", "tags": ["Mailing List", "Release Notes", "Third Party Advisory"]}]}}