Skip to main content

Gitea CVE-2026-55984

| EUVDEUVD-2026-58139 LOW
NULL Pointer Dereference (CWE-476)
2026-07-21 https://github.com/go-gitea/gitea GHSA-m932-crvm-gcp5
2.7
CVSS 3.1 · Vendor: https://github.com/go-gitea/gitea

Severity by source

Vendor (https://github.com/go-gitea/gitea) PRIMARY
2.7 LOW
AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:L
vuln.today AI
2.7 LOW

Network-accessible API requires repository administrator (PR:H); panic yields partial availability impact (A:L) with no confidentiality or integrity consequence.

3.1 AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:N/PR:H/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/go-gitea/gitea).

CVSS VectorVendor: https://github.com/go-gitea/gitea

Attack Vector
Network
Attack Complexity
Low
Privileges Required
High
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

Lifecycle Timeline

2
Source Code Evidence Fetched
Jul 21, 2026 - 21:20 vuln.today
Analysis Generated
Jul 21, 2026 - 21:20 vuln.today

DescriptionCVE.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:

http
POST /api/v1/repos/{owner}/{repo}/issues/{index}/times

Affected file:

text
routers/api/v1/repo/issue_tracked_time.go

Relevant code:

go
user, err = user_model.GetUserByName(ctx, form.User)
if err != nil {
    ctx.APIErrorInternal(err)
    // missing return
}

Execution continues to:

go
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:

http
POST /api/v1/repos/owner/repo/issues/1/times
Content-Type: application/json

{
  "time": 3600,
  "user_name": "nonexistent_user_xyz"
}

Result:

text
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:

go
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.

Share

CVE-2026-55984 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy