Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

GHSA-j48m-h7xq-2xpj: goshs: Share-link ?token=… redemption races past download limit

0
Medium
Published: 07/01/2026 (07/01/2026, 21:59:08 UTC)
Source: GCVE Database
Product: goshs.de/goshs/v2

Description

The goshs Go package (<= v2.0.9) contains a race condition in its share-link token redemption logic. Concurrent requests can bypass the intended download limit by reading the download count without proper synchronization, allowing multiple redemptions of a single-use share link. This flaw arises because the download count is checked under a read lock but incremented later under a write lock, enabling race conditions. The issue allows an attacker with access to a share token to download the shared file multiple times beyond the operator's intended limit.

CVSS v3.1

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Affected software

Goghsa
goshs.de/goshs/v2
Affected versions
<2.1.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/01/2026, 22:49:51 UTC

Technical Analysis

In goshs versions up to 2.0.9, the ShareHandler uses a read lock to check the DownloadLimit and Downloaded count, then releases the lock before serving the file. After serving, it reacquires a write lock to increment the Downloaded count and potentially delete the share link if the limit is reached. This sequence allows concurrent goroutines to observe the same Downloaded count and all pass the limit check, resulting in multiple downloads exceeding the intended cap. The vulnerability is a classic race condition (CWE-362) in concurrent access to shared state. A proof of concept demonstrates that two concurrent requests can both succeed on a single-use token. The suggested fix is to acquire the write lock before serving, increment the counter, and only serve if the limit is not exceeded, refunding the increment if serving fails.

Potential Impact

An attacker or multiple concurrent clients can redeem a share link token more times than the configured download limit, effectively bypassing the single-use or limited-use restriction. This increases the risk of unauthorized data exfiltration if the token is leaked or intercepted, as the intended one-time or limited access control is circumvented. The impact is limited to confidentiality as the integrity and availability are not affected.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The recommended fix is to modify the code to acquire the write lock before serving the file, increment the download count under this lock, and only proceed if the limit is not exceeded. If serving fails, the increment should be refunded. Until a patch is available, users should avoid using the share-link feature with download limits or implement external synchronization to prevent concurrent access. No official fix or patch links are currently provided.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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: 07/01/2026, 22:49:51 UTC

Last updated: 07/01/2026, 23:12:05 UTC

Views: 4

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses