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.
Severity (CVSS)
| Base score | 5.9 |
|---|---|
| Severity | Medium |
| Version | CVSS 3.1 |
| Vector | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| Provided by | CNA |
Weaknesses
- CWE-362 — CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Affected products
| Vendor | Product | Versions |
|---|---|---|
| patrickhener | goshs | < 2.1.0 |
References
- https://github.com/goshs-labs/goshs/security/advisories/GHSA-j48m-h7xq-2xpj (x_refsource_CONFIRM)
Generated from the official CVE List on 19 Aug 2026 07:05 UTC.