Go
CVE-2026-134754
anacrolix torrent has unbounded recursion in the bencode decoder that causes stack-overflow crash and CPU-exhaustion DoS
- Severity
- High 7.1
- Published
- 30 Oct 2026
- Last changed
- 23 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 1.61.1-0.20260911233437-76452a2c8a2f, 1.62.0
- Exploit chance
- 0.5% in the next 30 daysHigher than 41% of CVEs. EPSS by FIRST, 24 Nov 2026
- Attack
- Over the network · No login needed · Needs someone to view a page or file
- Attacker can
- Take it down
- CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N- Also known as
- GHSA-2wrx-84qj-4pcg, GO-2026-6894
- Sources
- CVE Program, OSV.dev and GitHub
Description
anacrolix/torrent's bencode decoder (bencode/) applies no limit on the nesting depth of nested dictionaries and lists. Two distinct denial-of-service mechanisms follow from that single root cause, both reachable from a single crafted .torrent file or from metadata obtained from a peer on a magnet-link/v2 download:
- Stack-overflow process crash. Decoder.readOneValue recurses once per nesting level with no depth bound. A .torrent whose info value is a list nested a few million levels deep (≈8 MB file) drives the recursion past the 1 GiB goroutine-stack limit and the process dies with an unrecoverable fatal error: stack overflow. 2. Quadratic CPU exhaustion. metainfo.FileTree.UnmarshalBencode (BitTorrent v2) re-parses each subtree at every level, making parse time grow ~O(n²). A v2 info dict with a ~30,000-level file tree (≈0.2 MB) takes ~66 s to decode; 60,000 levels exceeds 90 s of decode time.
Affected software
| Software | Affected versions |
|---|---|
github.com/anacrolix/torrentGo · osv:Go:github.com/anacrolix/torrent |
|
About github.com/anacrolix/torrent
Vulnerabilities in github.com/anacrolix/torrent
- In our list
- 3
- Published in the last 12 months
- 3
- Critical, last 12 months
- 0
- High, last 12 months
- 2
- Known exploited
- 0
- CVE-2026-134757anacrolix/torrent before 1.63.0 Improper Certificate Validation via HTTPS Tracker ClientMedium 6.3 22 Nov 2026
- CVE-2026-123096anacrolix/torrent through 1.61.0 Memory Exhaustion via Unbounded HTTP Tracker ResponseHigh 7.1 5 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-134754
- GitHub Advisory Database https://github.com/advisories/GHSA-2wrx-84qj-4pcg