Command execution in Gitea through repository auto-initialization
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA.
Summary
Gitea before 28.4.0 accepts pushes to a new repository before its auto-init step has finished, and builds the initial commit in a checkout of existing repository contents. A user allowed to create repositories can push a crafted tree during that window so that writing the README follows a symbolic link and overwrites a server-side git hook. The hook then runs commands as the Gitea system user.
Written with Claude Haiku 5.5 from the sources below · 2026-11-16
Description from the CNA
A repository created with auto-init accepted pushes before its initialization had finished, and the initial commit was built in a checkout of whatever the repository already contained. A user who is allowed to create repositories could push a crafted tree during that window so that writing the README followed a symbolic link and overwrote a server-side git hook, which runs commands as the Gitea system user. The initial commit is now built in a freshly initialized directory, and a new repository only becomes ready, and accepts pushes, once its initialization is complete.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
Upgrade Gitea to version 28.4.0. This release builds the initial commit in a freshly initialized directory and accepts pushes only after repository initialization completes.
Written with Claude Haiku 5.5 from the sources below · 2026-11-16
- Fix · CNA Gitea (Gitea) Fixed in 28.4.0
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Release ·
Gitea 28.4.0
19 records Highest priority Priority LOW 19 LOW
Other records, highest priority first
- TI-2026-91985 Protected file pattern bypass in Gitea with quoted file namesPriority LOW 36
- TI-2026-91982 Gitea missing attempt limit for TOTP passcodesPriority LOW 34
- TI-2026-91989 Gitea exposes pending pull request reviews created through the APIPriority LOW 29
Timeline
- 2026-11-15 Threatist record created from CVE-2026-125423
- 2026-11-16 CVSS score added · CISA ADP
- 2026-11-16 CISA SSVC decision points changed
References
More Gitea vulnerabilities
- TI-2026-42785 Remote code execution in Gitea diffpatch API through Git hooks KEVCVSS 3.1CRITICAL 9.8
- TI-2026-42033 Improper authorization on OAuth sign-in callback silently re-enables administrator-disabled accounts CVSS 3.1CRITICAL 9.8
- TI-2026-40842 Privilege Escalation via Access Token Scope Escalation in API CVSS 3.1CRITICAL 9.8
- TI-2026-16922 Gitea Docker image trusts spoofable reverse-proxy headers by default CVSS 3.1CRITICAL 9.8
- TI-2026-42043 Team-repository linking endpoint bypasses the RepoAdminChangeTeamAccess organization setting CVSS 3.1CRITICAL 9.1
- TI-2026-40381 OIDC userinfo Endpoint Returns Identity Claims Without Enforcing API Token Scopes CVSS 3.1CRITICAL 9.1
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences