CVE-2026-50139 goshs: Share-link ?token=… redemption races past download limit
Concurrent requests bypass download limits in goshs due to a race condition, allowing attackers to exceed configured caps.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-50139?
CVE-2026-50139 is a medium-severity vulnerability in patrickhener goshs, published on 18 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
goshs is a SimpleHTTPServer written in Go. Prior to version 2.1.0, `ShareHandler` reads the share token's `DownloadLimit` under `RLock`, releases the lock, serves the file, then re-acquires the lock to increment the counter. Concurrent requests all read the same `Downloaded`/`DownloadLimit` snapshot, all pass the check, and all are served — exceeding the operator's intended cap. Version 2.1.0 patches the issue.
Weakness: CWE-362
Which versions are affected by CVE-2026-50139?
4 open source packages ship an affected version, including goshs.de/goshs/v2 and goshs.de/goshs.
| Package | Affected | Fixed in |
|---|---|---|
goshs.de/goshs/v2 Go | All versions | 2.1.0 |
goshs.de/goshs/v2 Go | All versions | 2.1.0 |
goshs.de/goshs/v2 Go | All versions | 2.1.0 |
goshs.de/goshs Go | All versions | None |
How do I fix CVE-2026-50139?
Upgrade goshs.de/goshs/v2 to 2.1.0 or later.
Is CVE-2026-50139 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-50139 exists.
Sources
Also known as GHSA-j48m-h7xq-2xpj, GO-2026-5881.