Gitea: Webhook Authorization Header Returned in Plaintext via API (CVE-2026-58511)
Gitea versions prior to 1.27.0 contain a vulnerability where the webhook authorization header, which is stored encrypted in the database, is decrypted and returned in plaintext via certain API endpoints. This allows any repository admin to view sensitive authorization headers (such as Bearer tokens, Basic auth credentials, and API keys) set by other admins. The issue affects multiple API endpoints that return webhook details and requires repository or site admin privileges to access. The vulnerability undermines the encryption-at-rest protection by exposing secrets in API responses.
AI Analysis
Technical Summary
In Gitea versions before 1.27.0, the function ToHook() decrypts the webhook's HeaderAuthorizationEncrypted field and includes the plaintext authorization header in API responses. This behavior exposes sensitive authorization headers to any repository admin who queries webhook information via endpoints like GET /api/v1/repos/{owner}/{repo}/hooks. Although the authorization header is encrypted in storage using the server's SecretKey, the API response reveals the decrypted value, effectively converting a write-only secret into a readable credential. This affects multiple endpoints requiring admin privileges and risks cross-admin secret exposure and potential external service compromise.
Potential Impact
The vulnerability allows repository administrators to access plaintext webhook authorization headers set by other admins, exposing sensitive credentials such as Bearer tokens, Basic authentication credentials, and API keys. This can lead to credential harvesting if an admin's Gitea token is compromised and may result in unauthorized access to external services integrated via webhooks. The exposure undermines the intended encryption-at-rest protection of these secrets, increasing the risk of secret leakage within shared repositories.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The suggested fix is to make the authorization header write-only by returning a masked or redacted version or a boolean flag indicating the presence of an authorization header instead of the plaintext value. Until an official fix is available, restrict repository admin access to trusted users and avoid sharing sensitive authorization headers in webhooks.
Gitea: Webhook Authorization Header Returned in Plaintext via API (CVE-2026-58511)
Description
Gitea versions prior to 1.27.0 contain a vulnerability where the webhook authorization header, which is stored encrypted in the database, is decrypted and returned in plaintext via certain API endpoints. This allows any repository admin to view sensitive authorization headers (such as Bearer tokens, Basic auth credentials, and API keys) set by other admins. The issue affects multiple API endpoints that return webhook details and requires repository or site admin privileges to access. The vulnerability undermines the encryption-at-rest protection by exposing secrets in API responses.
CVSS v3.1
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
In Gitea versions before 1.27.0, the function ToHook() decrypts the webhook's HeaderAuthorizationEncrypted field and includes the plaintext authorization header in API responses. This behavior exposes sensitive authorization headers to any repository admin who queries webhook information via endpoints like GET /api/v1/repos/{owner}/{repo}/hooks. Although the authorization header is encrypted in storage using the server's SecretKey, the API response reveals the decrypted value, effectively converting a write-only secret into a readable credential. This affects multiple endpoints requiring admin privileges and risks cross-admin secret exposure and potential external service compromise.
Potential Impact
The vulnerability allows repository administrators to access plaintext webhook authorization headers set by other admins, exposing sensitive credentials such as Bearer tokens, Basic authentication credentials, and API keys. This can lead to credential harvesting if an admin's Gitea token is compromised and may result in unauthorized access to external services integrated via webhooks. The exposure undermines the intended encryption-at-rest protection of these secrets, increasing the risk of secret leakage within shared repositories.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The suggested fix is to make the authorization header write-only by returning a masked or redacted version or a boolean flag indicating the presence of an authorization header instead of the plaintext value. Until an official fix is available, restrict repository admin access to trusted users and avoid sharing sensitive authorization headers in webhooks.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-3r5c-2xxx-h872
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-58511"]
- Ecosystems
- ["Go"]
- Database Specific Severity
- LOW
- Cvss Version
- 3.1
Threat ID: 6a600aa29c2644c7f8fdfcb5
Added to database: 07/22/2026, 00:11:14 UTC
Last enriched: 07/22/2026, 00:38:43 UTC
Last updated: 07/22/2026, 03:46:49 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.