---
id: CVE-2026-50139
title: goshs is a SimpleHTTPServer written in Go
summary: >-
  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 r…
severity: medium
cvss: 5.9
cvssVector: 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N'
cwe:
  - CWE-362
vendor: goshs
product: goshs.de/goshs/v2
affected:
  - goshs.de/goshs/v2 <= 2.0.9
patched:
  - goshs.de/goshs/v2 2.1.0
published: '2026-08-18'
updated: '2026-09-18'
sourceUpdated: '2026-09-18T20:09:01.757'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-50139'
references:
  - url: >-
      https://github.com/goshs-labs/goshs/security/advisories/GHSA-j48m-h7xq-2xpj
    label: security-advisories@github.com
  - url: >-
      https://github.com/goshs-labs/goshs/security/advisories/GHSA-j48m-h7xq-2xpj
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
  - url: >-
      https://github.com/patrickhener/goshs/security/advisories/GHSA-j48m-h7xq-2xpj
  - url: 'https://github.com/advisories/GHSA-j48m-h7xq-2xpj'
tags:
  - nvd
  - ghsa
  - go
epss: 0.00256
epssPercentile: 0.15478
ecosystem: go
ingestedAt: '2026-07-01T22:17:35.208Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Package advisory (CVE-2026-50139)

Affected packages:

- `goshs.de/goshs/v2 <= 2.0.9`

Patched in:

- `goshs.de/goshs/v2 2.1.0`

Source: https://github.com/advisories/GHSA-j48m-h7xq-2xpj
