Skip to main content

Forgejo CVE-2025-68937

CRITICAL
UNIX Symbolic Link (Symlink) Following (CWE-61)
2025-12-26 cve@mitre.org
Critical
Disputed · 9.5 Vendor: mitre
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Create malicious template repo with out-of-repo symlinks
  2. Delivery
    Victim/server generates repository from template
  3. Exploit
    Symlink destination resolved outside repo tree
  4. Execution
    Arbitrary file write to unintended path
  5. Impact
    Obtain server shell access

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling UNIX symlink resolution
Exploitation Conditions

Exploitation requires the Forgejo template-repository feature to be used: the attacker must control or supply a template repository containing symlinks whose destinations point OUTSIDE the repository tree, and a repository-generation operation from that template must occur. Limiting factors: the attack is high-complexity (CVSS AC:H) and depends on a specific precondition being met (AT:P), and realistically an attacker needs the ability to create/host a template repository, which on typical deployments means an authenticated account (contradicting the vector's PR:N unless the instance permits open registration or anonymous template hosting). Instances on patched versions (13.0.2+, or 11.0.7+ for the 11 LTS line) are not affected.

Impact

The official CVSS 4.0 base score of 9.5 (Critical) is driven by high impact to both the vulnerable system and subsequent systems (VC/VI/VA:H and SC/SI/SA:H), reflecting that arbitrary file write via symlink following (CWE-61) can escalate to server shell access. However, two signals temper real-world urgency: AC:H (high attack complexity) and AT:P (a specific precondition must exist/win), meaning exploitation is not trivial or reliably repeatable. No EPSS score, no CISA KEV listing, and no public POC were provided, so there is no evidence of active or widespread exploitation - this reads as a serious-but-not-yet-exploited issue rather than an emergency. A notable discrepancy: the CVSS vector asserts PR:N (unauthenticated), yet the vulnerability hinges on an attacker supplying a malicious TEMPLATE repository containing out-of-repository symlinks, which on most Forgejo deployments requires an authenticated account to create/host - verify whether anonymous or open-registration instances truly allow PR:N exploitation. Also note the input Tag 'Information Disclosure' contradicts the actual vulnerability class (arbitrary file WRITE / potential RCE), which could mislead triage.

Exploit ScenarioDerived

An attacker crafts a template repository whose files include symlinks pointing to destinations outside the repository tree (e.g., system paths or the Forgejo working directory). When a victim or the server instantiates a new repository from this template, Forgejo follows the symlink and writes attacker-influenced content to unintended locations, potentially planting a file that yields server shell access. No public exploit code was identified at time of analysis, and the AC:H/AT:P metrics indicate the attacker must satisfy specific conditions for the write to land successfully.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
No patch listed yet 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 13, 2026

Forgejo before 13.0.2 (and the 11 LTS line before 11.0.7) mishandles out-of-repository symlink destinations when generating repositories from templates, allowing an attacker who can supply or control a template repository to write files to arbitrary server-side paths and potentially escalate to server shell access. The vendor rates this Critical (CVSS 4.0 base 9.5) because both the vulnerable system and subsequent systems are affected (VC/VI/VA:H, SC/SI/SA:H); our independent assessment concurs on high confidentiality, integrity, and availability impact under CVSS:3.1 (AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H) but notes the attack is high-complexity, requires a specific precondition (template creation plus a repository-generation step), and realistically requires an authenticated account - the vector's PR:N only holds if the instance allows open registration or anonymous template hosting. No confirmed active exploitation exists (not listed in CISA KEV) and no public exploit code has been identified at time of analysis; instances already on 13.0.2 or 11.0.7+ are not affected.

RemediationAI

Vendor-released patch: upgrade to Forgejo 13.0.2 or later, or to 11.0.7 or later on the 11 LTS branch; the fixes and their release notes are published at https://codeberg.org/forgejo/forgejo/src/branch/forgejo/release-notes-published/13.0.2.md and https://codeberg.org/forgejo/forgejo/src/branch/forgejo/release-notes-published/11.0.7.md, with the disclosure record at https://codeberg.org/forgejo/security-announcements/issues/43. Until patching is possible, the most effective compensating control is to curtail who can create or supply template repositories: restrict template-repository creation to a small trusted group (a side effect being reduced self-service for legitimate teams), and disable open registration or anonymous hosting of templates if the instance permits them, since the independently assessed vector requires PR:L and the vendor's PR:N rating assumes an unauthenticated actor can introduce a template. Also treat repository-generation from untrusted templates as a privileged operation, and monitor for unexpected writes outside the Forgejo data/repository directories (for example to hooks, configuration, or SSH key files) as a detection backstop, bearing in mind that such monitoring is detective rather than preventive and does not eliminate the exposure.

Affected ProductsAI

Forgejo versions before 13.0.2 are affected, and the 11 LTS branch is affected before 11.0.7 (fixed in 11.0.7 and later). The vulnerability is specifically reachable in deployments where the template repository feature is used and a repository is generated from such a template, since the flaw lies in how out-of-repository symlink destinations are resolved during template-based repository creation. Fixes are documented in the Forgejo release notes for 13.0.2 (https://codeberg.org/forgejo/forgejo/src/branch/forgejo/release-notes-published/13.0.2.md) and 11.0.7 (https://codeberg.org/forgejo/forgejo/src/branch/forgejo/release-notes-published/11.0.7.md), with the coordinated disclosure tracked at https://codeberg.org/forgejo/security-announcements/issues/43 and the corresponding milestones at https://codeberg.org/forgejo/forgejo/milestone/27340 and https://codeberg.org/forgejo/forgejo/milestone/29156. Because Forgejo shares ancestry with Gitea, the Gitea 1.24.7 release post (https://blog.gitea.com/release-of-1.24.7/) is listed as a related reference and operators of either project should review the corresponding upstream advisories; no CPE identifiers were provided in the source data to enumerate exact version strings beyond those families.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The root cause is CWE-61 (UNIX Symbolic Link / Link Following) in Forgejo's template repository handling. Forgejo lets users create repositories from a template repository, and during that generation step the file-copy logic fails to validate symlink destinations that point outside the template's repository tree. Instead of rejecting or confining such links, the process follows them and writes to the resolved target path on the server filesystem, giving an attacker control over the write destination. Arbitrary file write of this kind is a classic pathway to code execution - writing to Git hooks, server configuration, or SSH authorized_keys, for example - which is why the vendor's CVSS 4.0 vector assigns high impact to subsequent systems (SC/SI/SA:H) and why the description warns of possible server shell access. Any deployment of Forgejo prior to 13.0.2, or prior to 11.0.7 on the 11 LTS branch, that permits template repositories is in scope. Notably, NVD also references the Gitea 1.24.7 release blog, reflecting the shared code lineage between Gitea and Forgejo; CPE strings were not supplied in the available data, so exact product CPEs could not be enumerated.

Know when Forgejo gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Sources disagree (Medium–Critical)
Vendor (mitre) PRIMARY 9.5 CRITICAL
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
vuln.today AI 8.5 HIGH

AC:H and PR:L because an attacker needs an account to host a malicious template and must satisfy symlink-timing/path conditions; S:C and I:H/A:H as writes escape the repo onto the host, enabling shell access.

3.1 AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
Red Hat 9.9 MEDIUM

vuln.today treats the vendor’s rating as authoritative. A higher third-party CVSS (e.g. CISA-ADP) is shown for transparency but does not drive the headline severity.

CVSS VectorVendor: mitre

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
High
Subsequent system: Integrity
High
Subsequent system: Availability
High

DescriptionCVE.org

Forgejo before 13.0.2 allows attackers to write to unintended files, and possibly obtain server shell access, because of mishandling of out-of-repository symlink destinations for template repositories. This is also fixed for 11 LTS in 11.0.7 and later.

Executive ViewAI

Why It Matters

Forgejo, the self-hosted Git and collaboration platform many organizations rely on to host source code and CI workflows, contains a critical flaw in how it builds new repositories from templates: anyone who can supply or control a template repository can write files to arbitrary locations on the server, which in the worst case escalates to full server compromise. Because a Forgejo instance typically holds an organization's entire codebase, pipeline credentials, and deployment secrets, a successful attack could expose or corrupt far more than the Git service itself. The attack is currently assessed as difficult to execute - it requires an authenticated account (PR:L) plus a template-creation and repository-generation precondition, and no public exploit identified at time of analysis - but risk rises sharply on instances that permit open registration or anonymous template hosting, where the vector's PR:N condition could effectively hold.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis (the advisory data supplied flags patch status as NOT available, although its version thresholds of 13.0.2 and 11 LTS 11.0.7 imply fixed releases exist - verify directly with the vendor). Interim mitigations: restrict template repository creation and repository generation to trusted administrators only; disable open self-registration and anonymous template hosting so an unauthenticated attacker cannot satisfy the precondition; remove or quarantine untrusted template repositories; run Forgejo under a least-privilege, containerized service account with no write access outside its own data directory and no access to host secrets, mounted credentials, or orchestration sockets, which limits arbitrary file writes from escalating to server shell access; and monitor for file writes outside expected paths plus audit repository-generation events.

Threat Intelligence Overview

EPSS Score
0.5%
Top 59% exploitable
Prevalence
Low
self-hosted git forge, niche though growing open-source adoption
Data Quality
2 sources
Confidence: Low

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.5%
Patch available No
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

49
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +48
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2026-89094 CRITICAL
9.9 Sep 10

Remote code execution in Forgejo before 16.0.4 allows an authenticated user who can supply a template repository to run

CVE-2023-49946 CRITICAL
9.1 Dec 03

In Forgejo before 1.20.5-1, certain endpoints do not check whether an object belongs to a repository for which permissio

CVE-2023-49947 HIGH
7.5 Dec 03

Forgejo before 1.20.5-1 allows 2FA bypass when docker login uses Basic Authentication. Rated high severity (CVSS 7.5), t

CVE-2026-119545 MEDIUM
6.9 Oct 30

Unauthenticated blind server-side request forgery in Forgejo (through 15.0.11, 16.0.0 through 16.0.7, and 17.0.0 through

CVE-2026-119546 MEDIUM
6.8 Oct 30

Forgejo's restore-repo CLI can be induced to read files outside the dump directory - including repository configuration

CVE-2026-82556 LOW POC
2.1 Aug 30

Server-side request forgery in Forgejo up to 15.0.4 allows authenticated users to bypass the repository migration IP all

CVE-2026-59102 LOW POC
2.1 Jul 02

Stored XSS in Forgejo before 15.0.3 allows authenticated users to execute arbitrary JavaScript in other users' browsers

CVE-2026-119547 MEDIUM
5.3 Oct 30

Forgejo through 15.0.11, 16.0.0 through 16.0.7, and 17.0.0 through 17.0.1 lets an authenticated user with a read:user-sc

CVE-2023-49948 MEDIUM
5.3 Dec 03

Forgejo before 1.20.5-1 allows remote attackers to test for the existence of private user accounts by appending .rss (or

CVE-2026-90679 MEDIUM
4.3 Sep 13

Identity spoofing in Forgejo's ActivityPub federation allows a remote attacker who controls any single valid ActivityPub

CVE-2026-89151 LOW
3.5 Sep 11

Restricted API token authorization bypass in Forgejo before 16.0.4 (and before 15.0.8 on the 15.x branch) allows authent

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy