All vulnerabilities

Servers and applications

CVE-2026-23632

Update repository content via API with read-only permission

Severity
Medium 6.5
Published
6 Feb 2026
Last changed
17 Jun 2026
Added to UpHeron
1 Nov 2026
Fixed in
0.13.4
Exploit chance
0.3% in the next 30 daysHigher than 24% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Missing authorization (CWE-862)Incorrect authorization (CWE-863)
Attack
Over the network · Needs a user account · No user action needed
Attacker can
Change data
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
Also known as
GHSA-5qhx-gwfj-6jqr
Sources
NVD, Project advisories (GitHub)

Description

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
  • Execution of git push

As a result, a token with read-only permission can be used to modify repository contents.

  • Possession of a valid access token
  • Read permission on the target repository (public repository or collaborator with read access)
  • The attacker accesses the target repository with a read-only token
  • The attacker sends a PUT /contents request to update an arbitrary file
  • The server creates a commit and performs a git push on behalf of the attacker
  • Source code tampering
  • Injection of backdoors
  • Compromise of release artifacts and distributed packages
From gogs/gogs's security advisory.

Affected software

SoftwareAffected versions
GogsServers and applications · cpe:a:gogs:gogs
  • Every version before 0.13.4
GogsServers and applications · github:gogs/gogs
  • Every version before 0.13.4

About Gogs

free forge based on Git written in Go

From Wikidata, CC0 1.0.
Docker Hub pulls
94,040,857Docker Hub, 15 Nov 2026
GitHub stars
47,939GitHub, 15 Nov 2026
Forks
5,082GitHub, 15 Nov 2026
Latest release
v0.14.4GitHub, 15 Nov 2026
Released
12 Nov 2026GitHub
Developer
FLOSS contributorWikidata
License
Expat licenseWikidata
Written in
Go, Cascading Style Sheets, JavaScriptWikidata
First released
11 Feb 2014Wikidata
First published on GitHub
12 Feb 2014GitHub

References

  • NVD https://nvd.nist.gov/vuln/detail/CVE-2026-23632
  • CVE.org https://www.cve.org/CVERecord?id=CVE-2026-23632
  • GitHub Advisory Database https://github.com/advisories/GHSA-5qhx-gwfj-6jqr
  • github.com https://github.com/gogs/gogs/security/advisories/GHSA-5qhx-gwfj-6jqr