Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹 Go
Not in CISA KEV

CVE-2026-58438

CVE-2026-58438 is a CWE-862 vulnerability in gitea.dev. O3 Security confirms whether CVE-2026-58438 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

Gitea: Cross-repository IDOR in issue-dependency removal lets an attacker tamper with and comment on private repos they cannot access

Also known asGO-2026-6085
Published
Jul 21, 2026
Updated
Jul 27, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Jul 27, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

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.
  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-58438.

Real-World Exposure

1 pkg affected
🐹gitea.dev

Real-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

Details

RemoveDependency in routers/web/repo/issue_dependency.go takes a removeDependencyID form parameter identifying the other issue by its global numeric ID, and fetches it with issues_model.GetIssueByID(ctx, depID) - no repository or permission check at all. It then calls issues_model.RemoveIssueDependency(ctx, ctx.Doer, issue, dep, depType) (models/issues/dependency.go), which deletes the dependency join row and then writes a comment referencing the removal, attributed to the calling user, onto the dependency record.

The sibling function in the very same file, AddDependency, does this correctly when the two issues are in different repos (which ALLOW_CROSS_REPOSITORY_DEPENDENCIES, on by default, permits):

if issue.RepoID != dep.RepoID {
  if !setting.Service.AllowCrossRepositoryDependencies { ... }
  depRepoPerm, err := access_model.GetDoerRepoPermission(ctx, dep.Repo, ctx.Doer)
  if !depRepoPerm.CanReadIssuesOrPulls(dep.IsPull) {
    return // you can't see this dependency
  }
}

RemoveDependency has no equivalent block at all - it goes straight from resolving dep by ID to deleting the link, regardless of which repo dep lives in or whether the caller can see it. I confirmed this same code is present in the current latest release, v1.26.4.

PoC

Prerequisites: an account with write access to issues on some repo ownerA/repoA, and the global numeric issue ID of an issue in a private repo repoB that is (or was) legitimately dependency-linked to one of the attacker's issues in repoA (cross-repo dependencies are commonly used between related public/private repos, and ALLOW_CROSS_REPOSITORY_DEPENDENCIES defaults to enabled).

curl -s -b "gitea_session=$ATTACKER_SESSION_COOKIE" -X POST \
  --data-urlencode "removeDependencyID=<repoB_issue_global_id>" \
  --data-urlencode "dependencyType=blockedBy" \
  "https://TARGET_HOST/ownerA/repoA/issues/N/dependency/delete"
# Expected: the dependency link is deleted and a "removed dependency" comment
# authored by the attacker is added to the repoB issue, even though the
# attacker has no read access to repoB.

Impact

This is a cross-repository IDOR / broken access control issue. An attacker can tamper with issue-tracking state (dependency relationships) and inject an attacker-authored comment into a private repository they cannot otherwise read or write to, crossing a trust boundary the "add" path explicitly enforces. Impact is bounded - it requires an existing dependency link and discloses no repository content - but it is a genuine unauthorized-write primitive across a private-repo boundary.

Fix

Add the same cross-repo permission check used in AddDependency (access_model.GetDoerRepoPermission(ctx, dep.Repo, ctx.Doer).CanReadIssuesOrPulls(dep.IsPull)) to RemoveDependency before allowing the deletion to proceed when issue.RepoID != dep.RepoID.

If possible, please apply for a CVE number when publishing. I would greatly appreciate it.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogitea.devall versions1.27.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for gitea.dev. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update gitea.dev to 1.27.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-58438 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether CVE-2026-58438 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to CVE-2026-58438. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### Details `RemoveDependency` in `routers/web/repo/issue_dependency.go` takes a `removeDependencyID` form parameter identifying the other issue by its global numeric ID, and fetches it with `issues_model.GetIssueByID(ctx, depID)` - no repository or permission check at all. It then calls `issues_model.RemoveIssueDependency(ctx, ctx.Doer, issue, dep, depType)` (`models/issues/dependency.go`), which deletes the dependency join row and then writes a comment referencing the removal, attributed to the calling user, onto the dependency record. The sibling function in the very same file, `AddDepende
O3 Security · Impact-Aware SCA

Is CVE-2026-58438 in your dependencies?

O3 detects CVE-2026-58438 across Go dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.