{"id":"GHSA-5qhx-gwfj-6jqr","summary":" Gogs user can update repository content with read-only permission","details":"## 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","aliases":["CVE-2026-23632","GO-2026-4450"],"modified":"2026-02-19T20:56:08.241896Z","published":"2026-02-06T18:10:05Z","database_specific":{"github_reviewed_at":"2026-02-06T18:10:05Z","nvd_published_at":"2026-02-06T18:15:56Z","cwe_ids":["CWE-862","CWE-863"],"severity":"MODERATE","github_reviewed":true},"references":[{"type":"WEB","url":"https://github.com/gogs/gogs/security/advisories/GHSA-5qhx-gwfj-6jqr"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-23632"},{"type":"WEB","url":"https://github.com/gogs/gogs/pull/8102/commits/b6afcdb2e8d291e2adaaf6a8b7f88d240606515d"},{"type":"PACKAGE","url":"https://github.com/gogs/gogs"},{"type":"WEB","url":"https://github.com/gogs/gogs/releases/tag/v0.13.4"}],"affected":[{"package":{"name":"gogs.io/gogs","ecosystem":"Go","purl":"pkg:golang/gogs.io/gogs"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.13.4"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/02/GHSA-5qhx-gwfj-6jqr/GHSA-5qhx-gwfj-6jqr.json","last_known_affected_version_range":"\u003c= 0.13.3"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N"}]}