CVE-2026-50139: CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') in patrickhener goshs
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.
AI Analysis
Technical Summary
The goshs Go package versions before 2.1.0 contain a race condition (CWE-362) in the share-link token redemption mechanism. The download count is read under a read lock but incremented later under a write lock, which allows concurrent requests to bypass the download limit by exploiting the timing gap between these operations. This enables multiple redemptions of a single-use share link, violating intended access controls. The vulnerability has a CVSS 3.1 score of 5.9 (medium severity) with network attack vector, high attack complexity, no privileges required, no user interaction, and high confidentiality impact but no integrity or availability impact. A patch is available to fix this issue.
Potential Impact
An attacker who obtains a share token can download the associated file multiple times, bypassing the intended single-use download limit. This leads to unauthorized data disclosure beyond the operator's intended restrictions. There is no impact on data integrity or availability.
Mitigation Recommendations
A patch is available for this vulnerability. Users should upgrade goshs to version 2.1.0 or later where the race condition in the share-link token redemption logic is fixed. No additional mitigation steps are indicated.
CVE-2026-50139: CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') in patrickhener goshs
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.
CVSS v3.1
Score 5.9medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The goshs Go package versions before 2.1.0 contain a race condition (CWE-362) in the share-link token redemption mechanism. The download count is read under a read lock but incremented later under a write lock, which allows concurrent requests to bypass the download limit by exploiting the timing gap between these operations. This enables multiple redemptions of a single-use share link, violating intended access controls. The vulnerability has a CVSS 3.1 score of 5.9 (medium severity) with network attack vector, high attack complexity, no privileges required, no user interaction, and high confidentiality impact but no integrity or availability impact. A patch is available to fix this issue.
Potential Impact
An attacker who obtains a share token can download the associated file multiple times, bypassing the intended single-use download limit. This leads to unauthorized data disclosure beyond the operator's intended restrictions. There is no impact on data integrity or availability.
Mitigation Recommendations
A patch is available for this vulnerability. Users should upgrade goshs to version 2.1.0 or later where the race condition in the share-link token redemption logic is fixed. No additional mitigation steps are indicated.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-j48m-h7xq-2xpj
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-50139"]
- Ecosystems
- ["Go"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6a45998227e9c797194186cf
Added to database: 07/01/2026, 22:49:38 UTC
Last enriched: 08/19/2026, 11:16:38 UTC
Last updated: 09/14/2026, 19:00:25 UTC
Views: 122
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.