CVE-2026-27783
취약성 분석 및 완화

개요

CVE-2026-27783 is a missing repository-unit authorization vulnerability in Gitea affecting three issue-template API endpoints. The flaw allows an authenticated user with limited repository access (e.g., Issues unit only) to read Code-tree files — specifically .gitea/ISSUE_TEMPLATE/* and issue_config.yaml — from private repositories without having Code unit permissions. It affects Gitea versions up to and including 1.26.1, with version 1.26.2 containing the fix. The vulnerability carries a CVSS v3.1 base score of 4.3 (Moderate) (GitHub Advisory, Gitea Security Advisory).

기술적 세부 사항

The root cause is a missing authorization middleware (CWE-862: Missing Authorization) on three API route registrations in routers/api/v1/api.go. The endpoints GET /repos/{owner}/{repo}/issue_templates, GET /repos/{owner}/{repo}/issue_config, and GET /repos/{owner}/{repo}/issue_config/validate use only context.ReferencesGitRepo(), which opens the git repository but performs no permission check, whereas all sibling Code-tree endpoints (e.g., /languages, /licenses, /contents/*) correctly include the reqRepoReader(unit.TypeCode) middleware. The enclosing route group's repoAssignment() check passes for any user with access to any repository unit, so a user granted only the Issues unit can invoke these handlers and receive Code-tree file contents in the JSON response (GitHub Advisory).

영향

An authenticated attacker with access to a private repository through any non-Code unit (e.g., Issues only) can read the contents of .gitea/ISSUE_TEMPLATE/* and issue_config.yaml from the repository's default branch — files that may contain sensitive project configuration, internal workflow details, or metadata not intended for that user. The exposure is limited to these specific configuration files and does not allow arbitrary Code-tree access; integrity and availability are unaffected. This constitutes a unit-level authorization bypass that violates Gitea's permission model for private repositories (GitHub Advisory, Gitea Security Advisory).

착취 단계

  1. Obtain limited access: Acquire a Gitea API token for an account that is a member of an organization team granted access to the target private repository through a non-Code unit (e.g., Issues unit only).
  2. Identify target repository: Determine the owner and repository name of the private repository (e.g., victim-org/private-repo) running Gitea <= 1.26.1.
  3. Send crafted API request: Issue an authenticated HTTP GET request to one of the vulnerable endpoints:
    GET /api/v1/repos/victim-org/private-repo/issue_templates HTTP/1.1
    Host: TARGET
    Authorization: token <your_token>
  4. Receive Code-tree content: The server responds with 200 OK and returns the parsed contents of .gitea/ISSUE_TEMPLATE/* files as JSON, despite the caller lacking Code unit permissions.
  5. Repeat for issue config: Optionally query /api/v1/repos/victim-org/private-repo/issue_config or /issue_config/validate to retrieve issue_config.yaml contents (GitHub Advisory, Gitea Security Advisory).

타협의 징후

  • Network: Unexpected API requests to /api/v1/repos/{owner}/{repo}/issue_templates, /api/v1/repos/{owner}/{repo}/issue_config, or /api/v1/repos/{owner}/{repo}/issue_config/validate from users or tokens not expected to access Code-tree content.
  • Logs: Gitea access logs showing 200 OK responses to the above endpoints for tokens associated with accounts that have only non-Code unit permissions (e.g., Issues-only team members).
  • Logs: Repeated or automated queries to these three endpoints in short succession, potentially indicating enumeration of multiple repositories.

완화 및 해결 방법

Upgrade Gitea to version 1.26.2 or later, which adds the reqRepoReader(unit.TypeCode) middleware to the three affected route registrations, aligning them with all other Code-tree endpoints in the same route group. No configuration-based workaround is available for unpatched versions; the fix must be applied at the code level. Organizations should also audit team permission assignments to ensure the principle of least privilege is enforced, particularly for private repositories containing sensitive issue templates (GitHub Advisory, Gitea Security Advisory).

커뮤니티 반응

The vulnerability was reported by researcher hoangperry and published by Gitea maintainer lunny on June 5, 2026, with the advisory formally published to the GitHub Advisory Database on June 16, 2026. No significant broader media coverage or notable community commentary beyond the official advisory has been identified at this time (GitHub Advisory).

추가 자료


근원이 보고서는 AI를 사용하여 생성되었습니다.

무료 취약성 평가

클라우드 보안 태세를 벤치마킹합니다

9개의 보안 도메인에서 클라우드 보안 관행을 평가하여 위험 수준을 벤치마킹하고 방어의 허점을 식별합니다.

평가 요청

추가 Wiz 리소스

맞춤형 데모 받기

맞춤형 데모 신청하기

"내가 본 최고의 사용자 경험은 클라우드 워크로드에 대한 완전한 가시성을 제공합니다."
데이비드 에슬릭최고정보책임자(CISO)
"Wiz는 클라우드 환경에서 무슨 일이 일어나고 있는지 볼 수 있는 단일 창을 제공합니다."
아담 플레처최고 보안 책임자(CSO)
"우리는 Wiz가 무언가를 중요한 것으로 식별하면 실제로 중요하다는 것을 알고 있습니다."
그렉 포니아토프스키위협 및 취약성 관리 책임자