{"id":"CVE-2026-23632","aliases":["CVE-2026-23632","GHSA-5qhx-gwfj-6jqr","GO-2026-4450"],"related":[],"kind":"vulnerability","state":"published","title":"Gogs user can update repository content with read-only permission","summary":"Gogs is an open source self-hosted Git service. In version 0.13.3 and prior, the endpoint \"PUT /repos/:owner/:repo/contents/*\" does not require write permissions and allows access with read permission only via repoAssignment(). After passing the permission check, PutContents() invokes UpdateRepoFile(), which results in commit creation and the execution of git push. As a result, a token with read-only permission can be used to modify repository contents. This issue has been patched in versions 0.13.4 and 0.14.0+dev.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Gogs is an open source self-hosted Git service. In version 0.13.3 and prior, the endpoint \"PUT /repos/:owner/:repo/contents/*\" does not require write permissions and allows access with read permission only via repoAssignment(). After passing the permission check, PutContents() invokes UpdateRepoFile(), which results in commit creation and the execution of git push. As a result, a token with read-only permission can be used to modify repository contents. This issue has been patched in versions 0.13.4 and 0.14.0+dev.","source":"cvelist"},{"lang":"en","text":"## Vulnerability Description\n\nThe endpoint\n`PUT /repos/:owner/:repo/contents/*`\ndoes not require write permissions and allows access with **read permission only** via `repoAssignment()`.\n\nAfter passing the permission check, `PutContents()` invokes `UpdateRepoFile()`, which results in:\n\n* Commit creation\n* Execution of `git push`\n\nAs a result, a token with **read-only permission** can be used to modify repository contents.\n\n---\n\n## Attack Prerequisites\n\n* Possession of a valid access token\n* Read permission on the target repository\n  (public repository or collaborator with read access)\n\n---\n\n## Attack Scenario\n\n1. The attacker accesses the target repository with a read-only token\n2. The attacker sends a `PUT /contents` request to update an arbitrary file\n3. The server creates a commit and performs a git push on behalf of the attacker\n\n---\n\n## Potential Impact\n\n* Source code tampering\n* Injection of backdoors\n* Compromise of release artifacts and distributed packages","format":"markdown","source":"ghsa"},{"lang":"en","text":"Gogs user can update repository content with read-only permission in gogs.io/gogs.\n\nNOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.\n\n(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)\n\nThe additional affected modules and versions are: gogs.io/gogs before v0.13.4.","format":"markdown","source":"go"},{"lang":"es","text":"Gogs es un servicio Git autoalojado de código abierto. En la versión 0.13.3 y anteriores, el endpoint 'PUT /repos/:owner/:repo/contents/*' no requiere permisos de escritura y permite el acceso solo con permiso de lectura a través de repoAssignment(). Después de pasar la verificación de permisos, PutContents() invoca a UpdateRepoFile(), lo que resulta en la creación de un commit y la ejecución de git push. Como resultado, un token con permiso de solo lectura puede ser utilizado para modificar el contenido del repositorio. Este problema ha sido parcheado en las versiones 0.13.4 y 0.14.0+dev.","source":"nvd"}],"published":"2026-02-06T17:43:45.757Z","modified":"2026-06-17T10:21:52.207Z","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:H/A:N","score":6.5,"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:H/A:N","score":6.5,"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:H/A:N","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-862","CWE-863"],"affected":[{"ranges":[{"version":"< 0.14.0+dev","status":"affected"},{"version":"< 0.13.4","status":"affected"}],"vendor":"gogs","product":"gogs","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.13.4"}],"ecosystem":"Go","package":"gogs.io/gogs","purl":"pkg:golang/gogs.io/gogs","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"gogs.io/gogs","purl":"pkg:golang/gogs.io/gogs","source":"go"},{"ranges":[{"status":"affected","fixed":"0.13.4"}],"vendor":"gogs","product":"gogs","cpe":"cpe:2.3:a:gogs:gogs:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/gogs/gogs/security/advisories/GHSA-5qhx-gwfj-6jqr","tags":["advisory","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-23632","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/gogs/gogs/pull/8102/commits/b6afcdb2e8d291e2adaaf6a8b7f88d240606515d","tags":["web"],"sources":["ghsa","go"]},{"url":"https://github.com/gogs/gogs","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/gogs/gogs/releases/tag/v0.13.4","tags":["web"],"sources":["ghsa","go"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-02-06T18:54:08.202Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-23632","url":"https://www.cve.org/CVERecord?id=CVE-2026-23632","licence":"CVE Terms of Use","modified":"2026-02-06T18:54:15.180Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5qhx-gwfj-6jqr","url":"https://github.com/advisories/GHSA-5qhx-gwfj-6jqr","licence":"CC-BY-4.0","modified":"2026-02-19T20:41:20.559Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-4450","url":"https://pkg.go.dev/vuln/GO-2026-4450","licence":"CC-BY-4.0","modified":"2026-02-19T20:41:20.559Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-23632","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-23632","licence":"Public domain","modified":"2026-06-17T10:21:52.207Z"}],"updatedAt":"2026-11-25T22:59:13.558Z","epss":{"score":0.00313,"percentile":0.26091,"date":"2026-12-01T12:00:22.000Z"}}