Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain valid OAuth2 access token
-
ExploitSubmit token via refresh_token grant
-
ExecutionGitea issues new access and refresh tokens
-
ImpactMaintain persistent access beyond original expiry
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Authentication mechanism validation
MITRE ATT&CK
2 techniques across 2 tactics: Defense Evasion, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Attacker must already possess an unexpired, valid OAuth2 access token issued for the same OAuth2 application and grant on a Gitea instance at version ≤28.0.0 with the OAuth2 provider in use. The flaw is that the token endpoint accepted any such valid access token under the refresh_token grant without checking it was actually a refresh token. Key limiting factor: there is NO path to exploitation without a pre-existing valid access token - this extends/persists already-granted access rather than granting new access, and does not by itself let an unauthenticated outsider in. No user interaction is required. |
| Impact | Signals conflict sharply here. The published CVSS is 9.1 Critical (AV:N/AC:L/PR:N/UI:N/C:H/I:H), and SSVC rates Technical Impact as 'total' and Automatable as 'yes' - which on paper argues for urgency. However, SSVC Exploitation is 'none', there is no CISA KEV listing, no public exploit code is identified, and EPSS is only 0.17% (6th percentile), indicating very low near-term exploitation probability. More importantly, the CVSS PR:N rating appears to overstate real-world attacker preconditions: per the description, exploitation requires the attacker to ALREADY hold a valid, unexpired OAuth2 access token for the same application and grant. This is not a path to initial compromise - it is a token-persistence/lifetime-extension flaw that undermines token expiry and revocation after a token has already leaked. Net assessment: this is a legitimate authentication/session-management defect worth patching on a normal cycle, but it is not a drop-everything, internet-facing pre-auth RCE despite the 9.1 label. Treat as medium-priority unless you have evidence of leaked OAuth2 tokens. |
| Exploit ScenarioDerived | An attacker who has obtained a valid but soon-to-expire OAuth2 access token (e.g. leaked from logs, a compromised client, or intercepted) submits it to Gitea's token endpoint using the refresh_token grant type. Because the endpoint validated the signature and grant but not the token's kind, Gitea issues a fresh access token and a new refresh token, letting the attacker retain access indefinitely past the original token's lifetime and survive expiry. No public exploit code is identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 07, 2026
OAuth2 token-endpoint misuse in Gitea 28.0.0 and earlier allows anyone holding a valid, unexpired OAuth2 access token to submit it under the refresh_token grant and receive a brand-new access token plus refresh token, effectively extending access past the credential's original expiry. Exploitation requires a pre-existing valid access token issued for the same OAuth2 application and grant, so this is a persistence/escalation-of-lifetime flaw rather than an entry point for an unauthenticated outsider; the assessed vector is CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N (NVD rates it 9.1 with PR:N). Multi-source signals conflict: NVD's score and CISA's SSVC rating of total technical impact are severe, while EPSS is only 0.17% (6th percentile) and SSVC lists exploitation as none - no public exploit code has been identified at time of analysis and the issue is not in CISA KEV.
RemediationAI
Upgrade to Gitea 28.1.0 or later (vendor-released patch: 28.1.0), available from https://github.com/go-gitea/gitea/releases/tag/v28.1.0 with details at https://blog.gitea.com/release-of-28.1.0/ and the advisory https://github.com/go-gitea/gitea/security/advisories/GHSA-469m-x4mw-38r3. Because the flaw only extends the life of credentials that already exist, an upgrade alone does not undo tokens an attacker may have refreshed: after patching, revoke and rotate all OAuth2 access and refresh tokens issued by the instance (deleting and re-authorizing the affected OAuth2 applications achieves this) and audit token-endpoint activity for refresh_token grant requests, especially from IPs or clients that never legitimately held a refresh token. The trade-off is that rotation invalidates every downstream integration and forces re-consent, so schedule it as a coordinated window. As a temporary compensating control where patching must be deferred, reduce access-token lifetime to the minimum the environment tolerates so a stolen token's usable window shrinks, and disable the OAuth2 provider entirely if no OAuth2 clients depend on it - noting that doing so breaks all OAuth2-based logins and integrations on the instance.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Gitea ships an OAuth2 provider whose token endpoint implements the RFC 6749 refresh-token flow. Internally, tokens carry a 'kind' discriminator (oauth2_provider.KindRefreshToken) alongside their grant; the vulnerable handler validated the token's signature and its associated grant but never confirmed that the presented token was actually of the refresh-token kind. The upstream fix is a single guard in routers/web/auth/oauth2_provider.go - 'if err != nil || token.Kind != oauth2_provider.KindRefreshToken' - which closes the type-confusion path that let an access token masquerade as a refresh token. The root cause class is CWE-287 (Improper Authentication): a credential was accepted for a use it was not issued for. The referenced pull requests bundle this OAuth2 fix with unrelated hardening (LFS raw-file header handling, issue-attachment scoping, push-mirror permission checks, feed visibility, release/tag deletion, ForcePrivate handling), so operators should not assume every hunk in PR 39501/39507 maps to this CVE. No CPE strings were supplied by the sources, but EUVD scopes the flaw to Gitea 0 through 28.0.0, with 28.1.0 as the first fixed release.
Know when Gitea 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)AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Exploitation requires possession of a valid OAuth2 access token (a bearer credential), so PR:L rather than the published PR:N; network vector and low complexity hold, and token-scope access drives C:H/I:H.
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: 88ee5874-cf24-4952-aea0-31affedb7ff2
Lifecycle Timeline
3DescriptionCVE.org
Gitea's OAuth2 token endpoint verified the signature and grant of a token submitted with the refresh_token grant type, but not that the token was a refresh token. An unexpired access token for the same OAuth2 application and grant could be exchanged for a new access token and refresh token. Whoever holds such an access token could keep access beyond the token's original lifetime.
Technical POC Analysis
Bug class: CWE-287 Improper Authentication.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
Gitea 28.0.0 and earlier is affected by a critical OAuth2 token-lifetime flaw that can let an existing token holder obtain new access and refresh tokens and extend access beyond the credential's original expiry. Organizations using affected Gitea instances for source code, CI/CD, or OAuth2-integrated services should treat this as a high-priority exposure because it can undermine token-expiry controls and prolong unauthorized access. No public exploit identified at time of analysis, and no vendor-released patch identified at time of analysis; leadership should prioritize immediate credential containment and vendor-watch while limiting OAuth2 grant exposure.
No vendor-released patch identified at time of analysis. Interim mitigations: audit and revoke/rotate all existing OAuth2 access and refresh tokens for Gitea 28.0.0 and earlier; restrict OAuth2 application registration and refresh_token grant use to trusted administrators and integrations; shorten OAuth2 token lifetimes and scopes; monitor authentication and OAuth2 logs for anomalous refresh_token grant issuance or post-expiry token use; consider disabling refresh_token grant for affected applications until a vendor patch is available.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Remote code execution in Gitea (self-hosted Git service) via a code-injection flaw (CWE-94) allows attackers to run arbi
Broken access control in Gitea's Composer package registry (versions up to and including 1.26.1) lets remote attackers r
Gitea before 1.16.7 does not escape git fetch remote. Rated high severity (CVSS 7.5), this vulnerability is remotely exp
The git hook feature in Gitea 1.1.0 through 1.12.5 might allow for authenticated remote code execution in customer envir
Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in Gitea Gitea
Authenticated command injection in Dokploy (self-hostable PaaS) versions 0.29.3 through 0.29.12 lets a low-privileged us
Reverse-proxy authentication bypass in the official Gitea Docker image (versions up to and including 1.26.2) allows any
Path traversal in Gitea's Org-mode (`.org`) markup renderer allows an attacker who can get Org-mode content rendered by
Container escape in Gitea act_runner (Docker backend, through act 0.262.0) lets an authenticated user with workflow-exec
models/repo_mirror.go in Gitea before 1.7.6 and 1.8.x before 1.8-RC3 mishandles mirror repo URL settings, leading to rem
Server-side request forgery and internal repository exfiltration in Gitea before 1.27.0 lets a low-privileged authentica
Authorization bypass in Gitea versions 1.22.3 through 1.26.1 allows holders of `public-only` access tokens or OAuth gran
EUVD-2026-94061
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB