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

GHSA-RJVX-X5H2-6PX5

Gitea: API Fork Endpoint Authorization Bypass Allows Organization Members to Bypass Repository Creation Restrictions

Parche disponible
Descargar PNG JSON
CVSS
—
medium
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche2 versionesPrimer parche a -94 d de la divulgación
Exposición123 dDesde la divulgación, 21 jul 2026, 3:26 p. m.
Detección118 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 la severidad declarada por GHSA (media) y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Si haces parches mensuales, ya estás cubierto.Paso a paso, como subiendo al Cotopaxi.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Parche v1.26.0
Monitoreo
Detectada
18 abr 26
21 jul 26
27 jul 26
17 nov 26
22 nov 26
18 abr 26
12 jun 26
5 ago 26
28 sept 26
22 nov 26
FechaFaseEventoDetalle
Remediación Parche v1.26.0 code.gitea.io/gitea · -94 d desde divulgación
Divulgación Publicada GHSA-RJVX-X5H2-6PX5 divulgada
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Resumen
Descripción del advisory
GitHub
Summary

The API endpoint used to fork repositories into organizations performs a weaker authorization check than the corresponding web UI and other repository creation endpoints.

When a repository is forked into an organization through the API, the endpoint only verifies that the user is an organization member (`IsOrgMember()`), but does not verify whether the user is allowed to create repositories in that organization (`CanCreateOrgRepo()`).

As a result, organization members belonging to teams with `can_create_org_repo=false` can still create repositories inside the organization by using the fork API.

Details

Affected endpoint:

POST /api/v1/repos/{owner}/{repo}/forks

In `routers/api/v1/repo/fork.go`, the endpoint performs the following authorization check:

if !ctx.Doer.IsAdmin {
    isMember, err := org.IsOrgMember(ctx, ctx.Doer.ID)
    if !isMember {
        ctx.APIError(http.StatusForbidden, ...)
        return
    }
}

The equivalent web UI implementation uses the stronger permission check:

isAllowedToFork, err := organization.OrgFromUser(ctxUser).
    CanCreateOrgRepo(ctx, ctx.Doer.ID)

The same `CanCreateOrgRepo()` authorization check is also used by:

  • CreateOrgRepo API endpoint
  • GenerateRepository API endpoint

The fork endpoint appears to be the only repository creation path that relies solely on organization membership.

Proof of Concept

Tested on Gitea 1.23.7.

  1. Create an organization.
  2. Create a team with `can_create_org_repo=false`.
  3. Add a test user to that team.
  4. Verify that normal repository creation is denied:
POST /api/v1/orgs/target-org/repos

Result:

403 Forbidden
  1. Fork a repository into the organization:
POST /api/v1/repos/admin/public-repo/forks
Content-Type: application/json

{
  "organization": "target-org"
}

Result:

202 Accepted

The repository is successfully created despite repository creation permissions being disabled.

Impact

Users who are organization members but are intentionally prevented from creating repositories can bypass that restriction through the API.

This allows unauthorized repository creation inside the organization and may expose additional attack surface depending on the organization's Actions, runner, and workflow configuration.

The vulnerability represents an authorization bypass because API behavior is less restrictive than both the web UI and other repository creation endpoints.

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

Versiones

Rangos afectados

Afectada Corregida Última
code.gitea.io/gitea< 1.26.0
1.26.0
v1.26.4
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
gocode.gitea.io/gitea
Corregida v1.26.0 -94 d v1.26.4 no afectada
Versiones corregidas1.26.0v1.26.0
Explotación

Arsenal público

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

Referencias
Otrahttps://github.com/go-gitea/gitea/security/advisories/GHSA-rjvx-x5h2-6px5
Otrahttps://github.com/go-gitea/gitea/pull/36950
Otrahttps://github.com/go-gitea/gitea/commit/686d10b7f0c26baf91171124b382cbcdfa7bf025
Otrahttps://github.com/go-gitea/gitea
Otrahttps://github.com/go-gitea/gitea/releases/tag/v1.26.0

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