Skip to main content

Gitea EUVDEUVD-2026-58124

| CVE-2026-58511 LOW
Information Exposure (CWE-200)
2026-07-21 https://github.com/go-gitea/gitea GHSA-3r5c-2xxx-h872
2.7
CVSS 3.1 · Vendor: https://github.com/go-gitea/gitea
View

Attack ChainAIDerived

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

  1. Access
    Obtain Gitea repo admin session token
  2. Delivery
    Call GET /api/v1/repos/{owner}/{repo}/hooks
  3. Exploit
    Extract plaintext AuthorizationHeader from JSON response
  4. Execution
    Authenticate to external service with harvested credential
  5. Impact
    Access or manipulate downstream system

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V14 - Data Protection Data exposure prevention
MITRE ATT&CK

2 techniques across 2 tactics: Collection, Discovery

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires an authenticated Gitea session with at minimum repository admin privileges on the target repository - a non-admin authenticated user cannot access webhook listing endpoints. For broader harvesting, org admin access enables GET /api/v1/orgs/{org}/hooks, and site admin enables GET /api/v1/admin/hooks. The vulnerability is triggered whenever at least one webhook has an authorization header configured (Bearer token, Basic auth, or API key); webhooks without authorization headers are not affected. No special or non-default Gitea configuration is required - any standard installation running a vulnerable version with webhooks using authorization headers is affected. Exploitation is bounded by the value of the third-party credentials stored: if all webhook destinations are low-sensitivity, the real-world impact is limited. The key limiting factor is the requirement for elevated Gitea admin privileges, which meaningfully reduces the attacker population compared to an unauthenticated flaw.

Impact

The CVSS 3.1 score of 2.7 Low is driven primarily by the high privilege requirement (PR:H), which correctly reflects that exploitation demands an authenticated repository admin session. The network attack vector (AV:N) and low complexity (AC:L) mean that once admin credentials are in hand, exploitation is trivial - a single HTTP GET request. No EPSS data was provided in the input, and this vulnerability is not in CISA KEV, indicating no confirmed active exploitation at time of analysis. No public POC has been identified. The real-world risk is elevated in shared or multi-tenant Gitea deployments where multiple admins co-manage repositories, as any one admin can harvest credentials configured by another admin to access external third-party systems. In single-admin or access-controlled deployments, practical exploitability is substantially lower. The Low CVSS score is technically defensible but may underrepresent business impact in environments where webhook secrets authenticate to high-value downstream services such as cloud APIs, deployment pipelines, or security tooling.

Exploit ScenarioDerived

An authenticated Gitea repository admin issues a standard GET /api/v1/repos/{owner}/{repo}/hooks request using their own valid session token. The API response includes the full plaintext Bearer token or API key that a different admin had configured on a webhook to authenticate deliveries to an external CI/CD system. The attacker then uses this harvested credential directly against the external service, bypassing Gitea entirely. No public exploit code exists; exploitation requires only curl or any HTTP client with a valid admin token.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.2% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Jul 22, 2026

Webhook authorization headers in Gitea are decrypted and returned as plaintext in API responses, exposing Bearer tokens, Basic auth credentials, and API keys to any repository admin who queries the webhook listing endpoints. All Gitea installations running versions prior to 1.27.0 are affected, confirmed by GitHub Advisory GHSA-3r5c-2xxx-h872 and verified against commit 19f0169. Although these secrets are encrypted at rest using the server's SecretKey, the ToHook() function strips that protection before serializing the API response - effectively converting a write-only secret into a readable credential. No public exploit has been identified and this vulnerability is not listed in CISA KEV, but the business impact of leaking third-party API keys in multi-admin environments exceeds what the CVSS 2.7 Low score implies.

RemediationAI

Upgrade Gitea to version 1.27.0 or later, which contains the vendor-released patch referenced at https://github.com/go-gitea/gitea/releases/tag/v1.27.0. The fix should replace the plaintext return value in ToHook() with a masked string or a boolean has_authorization_header flag, as suggested in the advisory. If immediate upgrade is not feasible, administrators should rotate all credentials (Bearer tokens, API keys, Basic auth passwords) configured in webhook authorization headers on repositories with more than one admin, as those credentials may already have been exposed. Network-level or WAF controls restricting access to the webhook API endpoints (GET /api/v1/repos/{owner}/{repo}/hooks, GET /api/v1/repos/{owner}/{repo}/hooks/{id}, GET /api/v1/admin/hooks, GET /api/v1/orgs/{org}/hooks, GET /api/v1/user/hooks) can reduce exposure surface, but will impair legitimate webhook management workflows. Limiting repository admin access to the minimum necessary set of users on shared instances is an additional compensating control with no direct functional trade-off.

Affected VersionsENISA

Gitea Open Source Git Server 0 ≤1.26.4

Affected Packages

go code.gitea.io/gitea fix: 1.27.0
go gitea.dev fix: 1.27.0
euvd gitea_open_source_git_server no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 3 packages in go, euvd

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

Technical ContextAI · show details

Gitea stores webhook authorization headers (used to authenticate outbound webhook deliveries to external services such as CI/CD systems and notification platforms) encrypted in the database using AES via the server's SecretKey. The Go function ToHook() at services/webhook/general.go:407-420 is responsible for serializing webhook data into API responses; it calls HeaderAuthorization() at models/webhook/webhook.go:209-216, which invokes secret.DecryptSecret(setting.SecretKey, w.HeaderAuthorizationEncrypted) and returns the plaintext value. That plaintext is then placed directly into the AuthorizationHeader field of the api.Hook struct returned to the API caller. The root cause is CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor) - specifically, the absence of a write-only design pattern for secrets in API serialization. The affected package is pkg:go/code.gitea.io/gitea, confirmed by CPE data. Five distinct API endpoints call ToHook(), covering repository, organization, user, and site-admin webhook contexts.

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

Vendor (https://github.com/go-gitea/gitea) PRIMARY 2.7 LOW
AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N
vuln.today AI 2.7 LOW

Requires repo admin authentication (PR:H) over network (AV:N); only webhook authorization header values disclosed, not broader system secrets (C:L).

3.1 AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:H/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/go-gitea/gitea).

CVSS VectorVendor: https://github.com/go-gitea/gitea

Attack Vector
Network
Attack Complexity
Low
Privileges Required
High
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

DescriptionCVE.org

Summary

The ToHook() function in services/webhook/general.go decrypts the webhook's HeaderAuthorizationEncrypted field and returns the plaintext authorization header in the API response. Any repository admin can read the full plaintext value of webhook authorization headers (Bearer tokens, Basic auth credentials, API keys) set by other admins.

The authorization header is stored encrypted in the database using the server's SecretKey, but ToHook() decrypts it before serializing it into the API response - converting a write-only secret into a readable credential.

Vulnerable Code

File: services/webhook/general.go:407-420

go
func ToHook(repoLink string, w *webhook_model.Webhook) (*api.Hook, error) {
    // ...
    authorizationHeader, err := w.HeaderAuthorization()  // DECRYPTS from DB
    if err != nil {
        return nil, err
    }
    return &api.Hook{
        // ...
        AuthorizationHeader: authorizationHeader,  // PLAINTEXT in response
        // ...
    }, nil
}

Decryption function: models/webhook/webhook.go:209-216

go
func (w Webhook) HeaderAuthorization() (string, error) {
    if w.HeaderAuthorizationEncrypted == "" {
        return "", nil
    }
    return secret.DecryptSecret(setting.SecretKey, w.HeaderAuthorizationEncrypted)
}

Affected Endpoints

All call ToHook():

  • GET /api/v1/repos/{owner}/{repo}/hooks (requires repo admin)
  • GET /api/v1/repos/{owner}/{repo}/hooks/{id} (requires repo admin)
  • GET /api/v1/admin/hooks (requires site admin)
  • GET /api/v1/orgs/{org}/hooks (requires org admin)
  • GET /api/v1/user/hooks (requires authenticated user)

Steps to Reproduce

  1. Admin A creates a webhook with a sensitive authorization header.
  2. Admin B (different repo admin) lists webhooks via GET /api/v1/repos/{owner}/{repo}/hooks.
  3. The API response includes the full plaintext authorization header set by Admin A.

Impact

  • Cross-admin secret exposure on shared repositories
  • Credential harvesting if a repo admin's Gitea token is stolen
  • External service compromise via leaked Bearer tokens and API keys
  • Undermines the intentional encryption-at-rest protection

Suggested Fix

The authorization header should be write-only. Return a masked/redacted version or a boolean has_authorization_header flag instead.

References

  • Vulnerable function: services/webhook/general.go:392-425
  • Decryption function: models/webhook/webhook.go:209-216
  • Verified against commit 19f0169

Threat Intelligence Overview

EPSS Score
0.2%
Top 87% exploitable
Prevalence
Medium
Popular self-hosted Git platform across OSS and enterprise teams.
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
5 sources
Confidence: Medium

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 LOW
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
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
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Low

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +14
PoC: +20
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.

More in Gitea

View all
CVE-2026-60004 CRITICAL POC
9.8

Remote code execution in Gitea (self-hosted Git service) via a code-injection flaw (CWE-94) allows attackers to run arbi

CVE-2026-27771 HIGH POC
8.2 Jul 03

Broken access control in Gitea's Composer package registry (versions up to and including 1.26.1) lets remote attackers r

CVE-2022-30781 HIGH POC
7.5 May 16

Gitea before 1.16.7 does not escape git fetch remote. Rated high severity (CVSS 7.5), this vulnerability is remotely exp

CVE-2020-14144 HIGH POC
7.2 Oct 16

The git hook feature in Gitea 1.1.0 through 1.12.5 might allow for authenticated remote code execution in customer envir

CVE-2024-6886 CRITICAL POC
10.0 Aug 06

Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in Gitea Gitea

CVE-2026-72867 CRITICAL POC
9.9 Aug 10

Authenticated command injection in Dokploy (self-hostable PaaS) versions 0.29.3 through 0.29.12 lets a low-privileged us

CVE-2026-20896 CRITICAL POC
9.8 Jul 03

Reverse-proxy authentication bypass in the official Gitea Docker image (versions up to and including 1.26.2) allows any

CVE-2026-59774 CRITICAL POC
9.8

Path traversal in Gitea's Org-mode (`.org`) markup renderer allows an attacker who can get Org-mode content rendered by

CVE-2026-58053 CRITICAL POC
9.4 Jun 28

Container escape in Gitea act_runner (Docker backend, through act 0.262.0) lets an authenticated user with workflow-exec

CVE-2019-11229 HIGH POC
8.8 Apr 15

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

CVE-2026-57894 HIGH POC
8.5 Jul 21

Server-side request forgery and internal repository exfiltration in Gitea before 1.27.0 lets a low-privileged authentica

CVE-2026-24791 HIGH POC
8.1 Jun 17

Authorization bypass in Gitea versions 1.22.3 through 1.26.1 allows holders of `public-only` access tokens or OAuth gran

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