# CVE-2026-50139: goshs: Share-link ?token=… redemption races past download limit

- Severity: Medium 5.9 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.27%, higher than 21% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-07-01T21:59:08.000Z
- Modified: 2026-10-22T22:10:00.250Z
- Also known as: GHSA-j48m-h7xq-2xpj, GO-2026-5881
- Weaknesses: CWE-362
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- patrickhener goshs: < 2.1.0
- goshs.de/goshs/v2 (Go): before 2.1.0
- goshs.de/goshs (Go): all versions

## Every score

- GitHub_M: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`

## References

- <https://github.com/goshs-labs/goshs/security/advisories/GHSA-j48m-h7xq-2xpj> (exploit)
- <https://github.com/patrickhener/goshs/security/advisories/GHSA-j48m-h7xq-2xpj> (advisory, web)
- <https://github.com/patrickhener/goshs> (package)

## Sources

- CVE List: [CVE-2026-50139](https://www.cve.org/CVERecord?id=CVE-2026-50139), CVE Terms of Use, modified 2026-08-19
- GitHub Advisory Database: [GHSA-j48m-h7xq-2xpj](https://github.com/advisories/GHSA-j48m-h7xq-2xpj), CC-BY-4.0, modified 2026-07-07
- Go Vulnerability Database: [GO-2026-5881](https://pkg.go.dev/vuln/GO-2026-5881), CC-BY-4.0, modified 2026-07-07
- NVD: [CVE-2026-50139](https://nvd.nist.gov/vuln/detail/CVE-2026-50139), Public domain, modified 2026-10-22

---

Page: https://cve.day/CVE-2026-50139 · Whole record: https://cve.day/CVE-2026-50139.json · Rebuilt by cve.day 2026-11-25T22:59:33.474Z
