Severity by source
AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:L
Network-accessible API requires repository administrator (PR:H); panic yields partial availability impact (A:L) with no confidentiality or integrity consequence.
Primary rating from Vendor (https://github.com/go-gitea/gitea).
CVSS VectorVendor: https://github.com/go-gitea/gitea
Lifecycle Timeline
2DescriptionCVE.org
Summary
The AddTime API handler continues execution after an error returned by GetUserByName().
When a repository administrator specifies a non-existent user name, an error response is generated but execution does not stop. Subsequent code dereferences a nil user pointer, resulting in a runtime panic.
Details
Affected endpoint:
POST /api/v1/repos/{owner}/{repo}/issues/{index}/timesAffected file:
routers/api/v1/repo/issue_tracked_time.goRelevant code:
user, err = user_model.GetUserByName(ctx, form.User)
if err != nil {
ctx.APIErrorInternal(err)
// missing return
}Execution continues to:
trackedTime, err := issues_model.AddTime(
ctx,
user,
issue,
form.Time,
created,
)When GetUserByName() fails, user is nil.
The subsequent call dereferences the nil pointer and triggers a runtime panic.
Proof of Concept
Using a repository administrator account:
POST /api/v1/repos/owner/repo/issues/1/times
Content-Type: application/json
{
"time": 3600,
"user_name": "nonexistent_user_xyz"
}Result:
HTTP 500
runtime error: invalid memory address or nil pointer dereferenceThe stack trace indicates execution reaches the AddTime code path with a nil user object.
Impact
An authenticated repository administrator can repeatedly trigger server-side panics through the affected endpoint.
Depending on deployment configuration and panic recovery behavior, this may result in request failures, stack trace disclosure, excessive log generation, or degraded service availability.
Suggested Fix
Add a return statement after the error response:
user, err = user_model.GetUserByName(ctx, form.User)
if err != nil {
ctx.APIErrorInternal(err)
return
}AnalysisAI
Null pointer dereference in Gitea's AddTime API (versions prior to 1.27.0) allows an authenticated repository administrator to crash the server by specifying a non-existent username in a time-tracking request. The root cause is a missing return statement in routers/api/v1/repo/issue_tracked_time.go after GetUserByName() returns an error, causing AddTime() to dereference a nil user pointer and trigger a Go runtime panic. No active exploitation is confirmed (not in CISA KEV), but a proof-of-concept is embedded in the GHSA advisory, making the issue trivially reproducible by any repository administrator.
Technical ContextAI
Gitea is a self-hosted Git service written in Go, identified by CPE pkg:go/code.gitea.io_gitea. The vulnerable code resides in routers/api/v1/repo/issue_tracked_time.go, which handles the REST endpoint POST /api/v1/repos/{owner}/{repo}/issues/{index}/times for logging tracked time against issues. CWE-476 (Null Pointer Dereference) is the root cause class: after user_model.GetUserByName() fails and writes an API error response, the missing return allows the Go runtime to continue executing with a nil user pointer passed directly into issues_model.AddTime(). Go's runtime detects the nil dereference and panics; depending on whether the application registers a recovery middleware, this may manifest as a single 500 response or propagate further into the goroutine scheduler.
RemediationAI
Upgrade to Gitea v1.27.0 or later, which introduces the missing return statement in routers/api/v1/repo/issue_tracked_time.go immediately after the ctx.APIErrorInternal(err) call, confirmed by the release at https://github.com/go-gitea/gitea/releases/tag/v1.27.0 and advisory GHSA-m932-crvm-gcp5. As a pre-patch compensating control, restrict the repository administrator role to the minimum necessary set of trusted users, since only accounts holding this role can trigger the panic - this reduces attack surface without requiring downtime. Additionally, deploying a reverse proxy with rate limiting on POST /api/v1/repos/*/issues/*/times can dampen repeated panic attempts and limit log pollution; note that rate limiting does not prevent a single panic trigger per request cycle.
Same weakness CWE-476 – NULL Pointer Dereference
View allSame technique Denial Of Service
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-58139
GHSA-m932-crvm-gcp5