GHSA-m932-crvm-gcp5: Gitea: Null Pointer Dereference in AddTime API Causes Authenticated Denial of Service
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}/times
Affected file:
routers/api/v1/repo/issue_tracked_time.go
Relevant 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 dereference
The 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
}
Details
Original advisory: https://github.com/advisories/GHSA-m932-crvm-gcp5
Referenced CVEs
| CVE | CSIRTS overview | External |
|---|---|---|
| CVE-2026-55984 | coverage & exploitation status | NVD · CVE.org |
Same CVEs, other sources
How other CERTs, PSIRTs and databases cover the vulnerabilities in this advisory.
- high[NEW] [high] Gitea: Multiple vulnerabilitiescert-bund
More from GitHub Security Advisories
- mediumGHSA-jr6p-8pjj-mfx6: Capsule has an incomplete fix of CVE-2026-22872: TenantResource RawItems and Generators s…2026-07-31
- mediumGHSA-68cj-mvg9-rgm2: Capsule: CapsuleConfiguration NodeMetadata regex fields lack webhook validation, allowing…2026-07-31
- mediumGHSA-ff84-5f28-78qj: re2: Out-of-bounds heap read in `exec`/`test`/`match` via attacker-influenced `lastIndex`…2026-07-31
- mediumGHSA-6hxr-mr5r-9836: re2: Global `String.prototype.match` with an empty-matchable pattern never advances → inf…2026-07-31
- mediumGHSA-x83g-979r-f5fh: Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII2026-07-31