CVE-2026-52797
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedGogs is an open source self-hosted Git service. Prior to 0.14.0, as an authorized user, an intruder can dictate the value which is passed to the git diff command which, together with bypassing the filtering of the passed value, allows the user to bypass the target directory and write the result of the comparison to any arbitrary path. This vulnerability is fixed in 0.14.0.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceThis is a path traversal vulnerability in Gogs prior to version 0.14.0 where authenticated users can manipulate input passed to the git diff command, bypassing filtering to write comparison results to arbitrary file system paths instead of the intended target directory.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- Low
- User interaction
- None
- Scope
- Changed
- Confidentiality
- None
- Integrity
- Low
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Confirm Gogs installation and locate binaryRun 'gogs --version' from the Gogs binary location, or check the admin dashboard under 'Site Administration' for the installed version number.Affected if The version shown is below 0.14.0 (e.g., 0.13.x, 0.12.x, etc.)
-
Verify git diff functionality is accessibleLog into Gogs as any user and navigate to a repository, then access the comparison view (e.g., compare two branches or commits via the URL pattern /{user}/{repo}/compare/{base}...{head}) or the diff view for a commit.Affected if The git diff/comparison feature is available and functional in the Gogs instance.
-
Check if external user registration or guest access is enabledIn the Gogs admin panel, go to 'Authentication' and 'Site Settings' to review whether user self-registration is enabled, or if there are any existing user accounts besides the admin.Affected if Any non-admin user accounts exist, or self-registration allows new users to register, meaning an attacker could obtain authenticated access.
-
Review git hook or upload configurationExamine the Gogs configuration file (custom/conf/app.ini) for any settings related to repository hooks, git upload, or diff processing that may indicate exposure to the vulnerable code path.Affected if The configuration allows standard git operations without additional restrictions on diff parameters.
You are affected if your Gogs version is below 0.14.0 and the git diff/comparison feature is accessible to authenticated users, which is the default configuration.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedUpgrade Gogs to version 0.14.0 or later which contains the patch that properly validates and filters git diff input paths to prevent directory traversal.
Gogs 0.14.0
- 1. Backup your current Gogs installation and data directory before upgrading
- 2. Identify your current Gogs version by checking the admin dashboard or running the binary with version flag
- 3. Download Gogs version 0.14.0 or later from the official GitHub repository (https://github.com/gogs/gogs/releases)
- 4. Stop the Gogs service on your server
- 5. Replace the existing Gogs binary with the new version 0.14.0 binary
- 6. Ensure file permissions are correctly set on the new binary
- 7. Start the Gogs service
- 8. Verify the upgrade was successful by checking the admin dashboard shows version 0.14.0 or later
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation1.0 h
- Implementation2.0 h
- Testing1.0 h
- Review / QA1.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,424.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-52797 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-52797 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data