{"vuln_id":"CVE-2026-119298","aliases":["GHSA-x89h-7h96-v88f"],"description":"croc: Overwrite-confirmation bypass via a crafted \"croc-stdin-\" filename on receive","published_at":"2026-11-09T22:40:12Z","modified_at":"2026-11-23T20:41:36.549298Z","first_seen_at":"2026-11-23T21:06:31.525515Z","severity":"medium","severity_source":"native","cvss_score":4.2,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:L","cwe":["CWE-73"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.00302,"epss_percentile":0.23247,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-119298"},"matched_alias":null,"items":[{"id":16646,"source":{"id":"osv","name":"OSV.dev"},"title":"GO-2026-6958: croc: Overwrite-confirmation bypass via a crafted \"croc-stdin-\" filename on receive in github.com/schollz/croc","summary":"croc: Overwrite-confirmation bypass via a crafted \"croc-stdin-\" filename on receive in github.com/schollz/croc\n\nAffected: Go:github.com/schollz/croc, Go:github.com/schollz/croc/v10, Go:github.com/schollz/croc/v11, Go:github.com/schollz/croc/v6, Go:github.com/schollz/croc/v8, Go:github.com/schollz/croc/v9\n\nFixed in: 11.5.2\n\nReferences:\nhttps://github.com/schollz/croc/security/advisories/GHSA-x89h-7h96-v88f\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-119298\nhttps://github.com/schollz/croc/commit/25fe49b6f14db99f517e902cfef76299ad0a95a3\nhttps://github.com/schollz/croc/pull/1327\nhttps://github.com/schollz/croc/releases/tag/v11.5.2","url":"https://osv.dev/vulnerability/GO-2026-6958","published_at":"2026-11-23T20:02:42Z","updated_at":"2026-11-23T20:30:13.348651Z","fetched_at":"2026-11-23T21:06:31.109640Z","severity":"medium","cvss_score":4.2,"epss":0.00302,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"github.com/schollz/croc","vuln_id":"CVE-2026-119298","vuln_ids":["CVE-2026-119298","GHSA-X89H-7H96-V88F","GO-2026-6958"],"tags":["osv","go","fix-available"],"cluster_id":14707,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/16646","html":"https://vulnwatch.ve1ve2.com/item/16646"}},{"id":16556,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-x89h-7h96-v88f: croc: Overwrite-confirmation bypass via a crafted \"croc-stdin-\" filename on receive","summary":"croc: Overwrite-confirmation bypass via a crafted \"croc-stdin-\" filename on receive ## Summary croc is an end-to-end encrypted peer-to-peer file transfer tool. On the receiving side, the confirmation that normally protects an existing file from being overwritten or resumed is skipped whenever the received file's name starts with `croc-stdin-`, regardless of whether the incoming transfer is actually a text transfer. A sender can therefore name a file `croc-stdin-` and silently overwrite, truncate, or replace an existing file of that name in the receiver's working directory - including removing the existing file and substituting a symlink - without the `Overwrite?` prompt that the standard path requires. The exemption was introduced to keep croc's internal text-transfer artifacts from triggering prompts, but it is keyed on the filename prefix rather than on the transfer type, so any ordinary file transfer can claim the exemption. ## Vulnerability Details Affected code at commit `b6f27da9401f2c3647c1adb6b77a46bb8c0923d2` (HEAD, v11.5.1+1): The receive-side file-readiness loop in `src/croc/croc.go` decides whether to prompt before overwriting or resuming an existing destination file. The decision is made around line 3413: ```go isStdinName := strings.HasPrefix(path.Base(fileInfo.Name), \"croc-stdin-\") ... if destinationExists && !c.Options.Overwrite && !c.Options.Rename && !isStdinName { resumable := fileInfo.Size > 0 && fileInfo.Symlink == \"\" && recipientFileInfo.Mode().IsRegular() overwrite, promptErr := askReceiveOverwrite(c.clientContext(), fileInfo, resumable) if promptErr != nil { return promptErr } if !overwrite { continue } } ``` `isStdinName` is derived purely from the received file's basename. The prompt is suppressed for any such name, even when `c.Options.SendingText` is false and the transfer is an ordinary file transfer whose name the sender chose. When the prompt is skipped and the transfer declares `fileInfo.Size == 0` or a symlink (`fileInfo.Symlink != \"\"`), the loop calls `createEmptyFileAndFinish()` (src/croc/croc.go:3245), which - before creating the new entry - removes any existing file at the destination: ```go if fileInfo.Symlink != \"\" { if err = validateReceiveSymlinkTarget(fileInfo.FolderRemote, fileInfo.Symlink); err != nil { return } log.Debug(\"creating symlink\") // remove symlink if it exists if _, errExists := root.Lstat(pathToFile); errExists == nil { if err = root.Remove(pathToFile); err != nil { return err } } err = root.Symlink(fileInfo.Symlink, pathToFile) ... } ``` For a normal (non-`croc-stdin-`) name, the overwrite prompt runs first, so the remove/replace step only happens with the user's explicit `y`. For a `croc-stdin-` name the entire prompt is bypassed: an existing `croc-stdin-*` file is deleted and replaced with the attacker's symlink (or, for `Size == 0`, truncated to an empty file) with no confirmation. For a non-empty regular-file transfer with a `croc-stdin- Affected: Go:github.com/schollz/croc, Go:github.com/schollz/croc/v10, Go:github.com/schollz/croc/v11, Go:github.com/schollz/croc/v6, Go:github.com/schollz/croc/v8, Go:github.com/schollz/croc/v9 Fixed in: 11.5.2 References: https://github.com/schollz/croc/security/advisories/GHSA-x89h-7h96-v88f https://nvd.nist.gov/vuln/detail/CVE-2026-119298 https://github.com/schollz/croc/pull/1327 https://github.com/schollz/croc/commit/25fe49b6f14db99f517e902cfef76299ad0a95a3 https://github.com/schollz/croc https://github.com/schollz/croc/releases/tag/v11.5.2","url":"https://osv.dev/vulnerability/GHSA-x89h-7h96-v88f","published_at":"2026-11-09T22:40:12Z","updated_at":"2026-11-23T20:41:36.549298Z","fetched_at":"2026-11-23T21:06:31.109560Z","severity":"medium","cvss_score":4.2,"epss":0.00302,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"github.com/schollz/croc","vuln_id":"CVE-2026-119298","vuln_ids":["CVE-2026-119298","GHSA-X89H-7H96-V88F","GO-2026-6958"],"tags":["osv","go","fix-available"],"cluster_id":14706,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/16556","html":"https://vulnwatch.ve1ve2.com/item/16556"}}]}