Gitea: Null Pointer Dereference in AddTime API Causes Authenticated Denial of ServiceGHSA-m932-crvm-gcp5
LOWGHSA-m932-crvm-gcp5 is a low-severity (CVSS 2.7) CWE-284 vulnerability in code.gitea.io/gitea. A fix is available for code.gitea.io/gitea — see the affected versions and patch details below.
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for GHSA-m932-crvm-gcp5.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-m932-crvm-gcp5 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 395,249 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
code.gitea.io/giteaReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
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
}
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | code.gitea.io/gitea | all versions | 1.27.0go get code.gitea.io/gitea@v1.27.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for code.gitea.io/gitea, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update code.gitea.io/gitea to 1.27.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-m932-crvm-gcp5 is resolved across your whole dependency graph.
Workarounds
Put an independent control in front of the weakness: restrict the affected endpoint or interface to trusted networks, require an additional authentication factor or proxy-level check, and invalidate existing sessions and credentials in case the flaw has already been used.
Frequently Asked Questions
Is GHSA-m932-crvm-gcp5 in your dependencies?
Find it across Go, including transitive dependencies.