PT-2026-63313 · Gitea+1 · Gitea+1

·

CVE-2026-58511

·

Published

2026-07-21

·

Updated

2026-08-26

CVSS v3.1

2.7

Low

VectorAV:N/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N
Name of the Vulnerable Software and Affected Versions Gitea (affected versions not specified)
Description The ToHook() function in services/webhook/general.go decrypts the HeaderAuthorizationEncrypted field and returns the plaintext authorization header in the API response. This allows repository administrators to read sensitive credentials, such as Bearer tokens, Basic auth credentials, and API keys, set by other administrators. The issue occurs because the function decrypts the secret stored in the database using the server's SecretKey before serializing it into the response, effectively converting a write-only secret into a readable credential.
API Endpoints:
  • '/api/v1/repos/{owner}/{repo}/hooks'
  • '/api/v1/repos/{owner}/{repo}/hooks/{id}'
  • '/api/v1/admin/hooks'
  • '/api/v1/orgs/{org}/hooks'
  • '/api/v1/user/hooks'
Vulnerable Parameters or Variables:
  • HeaderAuthorizationEncrypted
Function Names:
  • ToHook()
  • HeaderAuthorization()
Recommendations At the moment, there is no information about a newer version that contains a fix for this vulnerability. As a temporary workaround, restrict access to the affected API endpoints to minimize the risk of credential exposure.

Exploit

Information Disclosure

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2026-58511
GHSA-3R5C-2XXX-H872
GO-2026-6040
OPENSUSE-SU-2026:21483-1

Affected Products

Gitea
Red Os