{"id":"EUVD-2026-60950","revision":null,"records":[{"revision":"085b404c72034484a6a76a41f6df5d48","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-50139","aliases":[],"title":"goshs: Share-link ?token=… redemption races past download limit","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.","state":0,"publishedAt":"2026-08-18T15:01:36.9+00:00","modifiedAt":"2026-08-19T14:34:47.743+00:00","affected":[{"ecosystem":"Vendor product","name":"goshs","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"patrickhener\",\n                    \"product\": \"goshs\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 2.1.0\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"severity":"MEDIUM"}],"references":["https://github.com/goshs-labs/goshs/security/advisories/GHSA-j48m-h7xq-2xpj"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-50139","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-50139","identifiers":["CVE-2026-50139"]},"retained":false,"historicalAffected":[]},{"revision":"c6c5d74ffe1b46ca895749ead842c5b5","observedAt":"2026-11-08T01:58:20.969+00:00","statement":{"source":"euvd","id":"EUVD-2026-60950","aliases":["CVE-2026-50139","GHSA-j48m-h7xq-2xpj"],"title":"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 requ…","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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"severity":null}],"references":["https://github.com/goshs-labs/goshs/security/advisories/GHSA-j48m-h7xq-2xpj"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-60950","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Aug 18, 2026, 3:01:36 PM","dateUpdated":"Aug 19, 2026, 2:34:47 PM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-60950","identifiers":["EUVD-2026-60950","CVE-2026-50139","GHSA-j48m-h7xq-2xpj"]},"retained":false,"historicalAffected":[]},{"revision":"c6f863c62ab6415e9f2cefc389cbcad1","observedAt":"2026-10-25T12:17:38.331+00:00","statement":{"source":"nvd","id":"CVE-2026-50139","aliases":[],"title":"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 requ…","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.","state":0,"publishedAt":"2026-08-18T15:16:54.733+00:00","modifiedAt":"2026-10-22T22:10:00.25+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"severity":"MEDIUM"}],"references":["https://github.com/goshs-labs/goshs/security/advisories/GHSA-j48m-h7xq-2xpj"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-50139","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-362"],"productCriteria":[],"sourceDates":{"published":"2026-08-18T15:16:54.733","lastModified":"2026-10-22T22:10:00.250"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-50139","identifiers":["CVE-2026-50139"]},"retained":false,"historicalAffected":[]},{"revision":"e7130a0b5f9d403ba0e5cdbb59467fcb","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-j48m-h7xq-2xpj","aliases":["CVE-2026-50139","GO-2026-5881"],"title":"goshs: Share-link ?token=… redemption races past download limit","description":"# Share-link `?token=…` redemption races past download limit\n\n**Ecosystem:** Go\n**Package:** `goshs.de/goshs/v2` (`github.com/patrickhener/goshs`)\n**Affected:** `<= v2.0.9` (every release that shipped the share-link feature)\n\n## Summary\n\n`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.\n\n## Details\n\n[`httpserver/handler.go:968-1018`](https://github.com/patrickhener/goshs/blob/v2.0.9/httpserver/handler.go#L968-L1018):\n\n```go\nfs.sharedLinksMu.RLock()\nentry, ok := fs.SharedLinks[token]\nfs.sharedLinksMu.RUnlock()                       // <-- released here\n\nif entry.DownloadLimit > 0 || entry.DownloadLimit == -1 {\n    // ...serve file...                          // <-- whole transfer happens unlocked\n}\n\nfs.sharedLinksMu.Lock()                          // <-- re-acquired only now\ncurrent.Downloaded++\nif current.Downloaded >= current.DownloadLimit { delete(fs.SharedLinks, token) }\nfs.sharedLinksMu.Unlock()\n```\n\nBetween line 978 (`RUnlock`) and line 1008 (`Lock`), any number of goroutines can interleave and each observes the same pre-increment limit.\n\n## Proof of concept\n\n```bash\ngoshs -p 18000 -d /tmp/r -b admin:pw &\necho data > /tmp/r/f.txt\n\n# operator issues a one-shot share\nSHARE=$(curl -su admin:pw \"http://localhost:18000/f.txt?share&limit=1\")\nTK=$(echo \"$SHARE\" | sed -n 's/.*token=\\([^\"]*\\)\".*/\\1/p')\n\n# attacker races two redemptions\ncurl -so /dev/null -w \"%{http_code}\\n\" \"http://localhost:18000/?token=$TK\" & \\\ncurl -so /dev/null -w \"%{http_code}\\n\" \"http://localhost:18000/?token=$TK\" & \\\nwait\n# observed: 200 / 200 (both succeed) -> limit=1 redeemed twice\n```\n\nReproduced 5/5 times in a row on a 2026-era M-series Mac during verification.\n\n## Impact\n\nA \"single-use\" share intended to deliver a one-shot secret can be redeemed N times by N concurrent clients. Combined with any token-leak vector (mail forwarding, browser history, intercepted link, etc.) this multiplies the exfiltration window.\n\n## Suggested fix\n\nReserve under the write lock *before* serving — refund only if the serve fails:\n\n```go\nfs.sharedLinksMu.Lock()\nentry, ok := fs.SharedLinks[token]\nif !ok || time.Now().After(entry.Expires) ||\n   (entry.DownloadLimit != -1 && entry.Downloaded >= entry.DownloadLimit) {\n    fs.sharedLinksMu.Unlock(); http.NotFound(w, r); return\n}\nentry.Downloaded++\nif entry.DownloadLimit != -1 && entry.Downloaded >= entry.DownloadLimit {\n    delete(fs.SharedLinks, token)\n} else {\n    fs.SharedLinks[token] = entry\n}\nfs.sharedLinksMu.Unlock()\n// ...serve...\n```\n\nAdd a regression test that races two requests against a `limit=1` token and asserts exactly one `200`.\n\nReporter: Nishant Verma. Reproduced against `goshs v2.0.9` (commit `8fc1e91`) on 2026-05-27.","state":0,"publishedAt":"2026-07-01T21:59:08+00:00","modifiedAt":"2026-07-07T16:11:27.2231368+00:00","affected":[{"ecosystem":"Go","name":"goshs.de/goshs/v2","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"2.1.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/patrickhener/goshs/security/advisories/GHSA-j48m-h7xq-2xpj","https://github.com/patrickhener/goshs"],"sourceUrl":"https://github.com/advisories/GHSA-j48m-h7xq-2xpj","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-j48m-h7xq-2xpj","identifiers":["GHSA-j48m-h7xq-2xpj","CVE-2026-50139","GO-2026-5881"]},"retained":false,"historicalAffected":[]},{"revision":"912b21d1ff8f410ea2d1a1646f4496d1","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2026-5881","aliases":["CVE-2026-50139","GHSA-j48m-h7xq-2xpj"],"title":"goshs: Share-link ?token=… redemption races past download limit in goshs.de/goshs","description":"goshs: Share-link ?token=… redemption races past download limit in goshs.de/goshs","state":0,"publishedAt":"2026-07-07T15:26:37+00:00","modifiedAt":"2026-07-07T16:00:42.7367403+00:00","affected":[{"ecosystem":"Go","name":"goshs.de/goshs","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"goshs.de/goshs/v2","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"2.1.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/patrickhener/goshs/security/advisories/GHSA-j48m-h7xq-2xpj"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-5881","license":"OSV · upstream source license applies","key":"osv:GO-2026-5881","identifiers":["GO-2026-5881","CVE-2026-50139","GHSA-j48m-h7xq-2xpj"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-08T07:06:42.2208240+00:00","complete":true,"records":1769,"lastAttemptAt":"2026-11-08T07:06:42.220824+00:00","lastSuccessAt":"2026-11-08T07:06:42.3839308+00:00","error":null,"lastVerifiedAt":"2026-11-08T07:06:42.3839321+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-eaa64dac63caa79c8d4905619258c41c51b39e461b996124e1a21b5e85e7e738-1167b7290e843ce2b7ccffc299ffe73e10a65833db7c7e05840c0f2de122f77a","complete":true,"records":421096,"lastAttemptAt":"2026-11-08T07:06:41.7244391+00:00","lastSuccessAt":"2026-11-08T07:06:41.6928813+00:00","error":null,"lastVerifiedAt":"2026-11-08T07:06:41.7244391+00:00","snapshotPublishedAt":"2026-11-08T06:27:58+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-ce0df89a405747cda5b7c61ae0b48fb2","complete":true,"records":13633,"lastAttemptAt":"2026-11-08T07:07:08.1374238+00:00","lastSuccessAt":"2026-11-08T05:08:40.263+00:00","error":null,"lastVerifiedAt":"2026-11-08T05:08:40.263+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13685,"expectedIdentifiers":13685,"failedIdentifiers":0},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-08T07:06:42.2208240+00:00","complete":true,"records":1096,"lastAttemptAt":"2026-11-08T07:06:42.220824+00:00","lastSuccessAt":"2026-11-08T07:06:42.3846752+00:00","error":null,"lastVerifiedAt":"2026-11-08T07:06:42.3846753+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-e34772fb6aa347ef91ff9834fc6c39c0","complete":true,"records":13645,"lastAttemptAt":"2026-11-08T07:07:07.5391052+00:00","lastSuccessAt":"2026-11-08T07:07:07.536+00:00","error":null,"lastVerifiedAt":"2026-11-08T07:07:07.536+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13685,"expectedIdentifiers":13685,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-0eb4d6dde62dffacd040ad992d4fd5a65cd7d0dc5f5f4cfa8b41967fc6f9ca5f","complete":true,"records":9914,"lastAttemptAt":"2026-11-08T07:06:42.0654366+00:00","lastSuccessAt":"2026-11-06T20:10:36.6450506+00:00","error":null,"lastVerifiedAt":"2026-11-08T07:06:42.0654366+00:00","snapshotPublishedAt":"2026-11-06T20:02:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-fde804134ecdda0ddd5ff5c26ee1fff5a6fa659311f7ef2e51c6ad54964db0e2","complete":true,"records":1971,"lastAttemptAt":"2026-11-08T07:06:41.8609231+00:00","lastSuccessAt":"2026-11-06T19:03:17.0399903+00:00","error":null,"lastVerifiedAt":"2026-11-08T07:06:41.8609231+00:00","snapshotPublishedAt":"2026-11-06T18:17:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-335633e78a15c9cde10a6025895b5617717087fb945489ae7e15d377bacf34a9","complete":true,"records":3055,"lastAttemptAt":"2026-11-08T07:06:42.179579+00:00","lastSuccessAt":"2026-11-06T16:03:00.7615789+00:00","error":null,"lastVerifiedAt":"2026-11-08T07:06:42.179579+00:00","snapshotPublishedAt":"2026-11-06T16:02:48+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-40ad6183a951565ace1520a9b4d631e1d0bfb1d4bf7c5574c375032559f3ff53","complete":true,"records":231292,"lastAttemptAt":"2026-11-08T07:06:41.9639328+00:00","lastSuccessAt":"2026-11-07T10:29:00.4821259+00:00","error":null,"lastVerifiedAt":"2026-11-08T07:06:41.9639328+00:00","snapshotPublishedAt":"2026-11-07T09:32:47+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}