Threat reportVulnerabilityTL-2026-1587
Gitea CVE-2026-58443: Authorization Bypass in Pull Request Update API Enables Private Repo Access
A public-only-scoped Gitea API token can be used against the pull request update endpoint to push commits from a public base repository into a private pull request's head branch, bypassing Gitea's public/private token confinement. A demonstrated PoC used an injected commit to trigger a private Gitea Actions workflow (ActionRun), proving code-execution-adjacent impact from what is nominally an access-control bug.
Key facts
| Identifiers | TL-2026-1587, CVE-2026-58443, CVE-2026-58424, CVE-2026-58426 |
|---|---|
| Also known as | GHSA-xxjv-752h-3vp2 |
| Severity | CRITICAL |
| CVSS | 9.6 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:H) |
| Exploitation status | Public proof-of-concept exploit for a linked CVE |
| EPSS | CVE-2026-58443: 0.5% (45.9th percentile); CVE-2026-58424: 0.3% (28.9th percentile); CVE-2026-58426: 0.3% (21.0th percentile) |
| Affected products | Gitea Gitea (self-hosted Git service); Gitea Gitea Docker image (gitea/gitea) |
| Weaknesses (CWE) | CWE-863 |
| Malware | CVE-2026-58424, CVE-2026-58426, CVE-2026-58433, CVE-2026-58435, CVE-2026-58436, CVE-2026-58443, CVE-2026-59765, GHSA-xxjv-752h-3vp2 |
| Tools | Gitea, Gitea Actions, Gitea Actions Artifacts V4 |
| MITRE ATT&CK techniques | T1069 Permission Groups Discovery, T1072 Software Deployment Tools, T1078 Valid Accounts, T1087 Account Discovery, T1098 Account Manipulation, T1190 Exploit Public-Facing Application, T1195.002 Compromise Software Supply Chain, T1199 Trusted Relationship, T1213 Data from Information Repositories, T1548 Abuse Elevation Control Mechanism, T1550.001 Application Access Token, T1565.001 Stored Data Manipulation and 3 more in the attack flow |
| Motivation | UNKNOWN |
| Target sectors | technology, software-development, government administration, finance, health, education |
| Target regions | Global |
| Detection rules | 9 (1 shown free) |
| Sources | 8 cited sources |
Detection coverage
As of 2026-07-21, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-1587 across Splunk SPL, Microsoft KQL and Sigma, covering 29 indicator(s) of compromise. The whole corpus is readable without an account. Every threat comes with one complete detection in Splunk SPL, Microsoft KQL and Sigma, free for everyone; a free account adds daily TL Creds to unlock the rest. Paid plans add a larger daily allowance, correlation and the MCP server. Threadlinqs MCP server · View plans.
Free detection: Gitea Public-Only Token Invoking PR-Update API Against Private Head Repository (CVE-2026-58443 Exploitation)
Detects a Gitea access token flagged public-only-scope authenticating a POST to the pull-request update endpoint (/api/v1/repos/{owner}/{repo}/pulls/{index}/update) where the pull request's resolved head repository is private. This is the initial exploitation step of CVE-2026-58443: the API only validates token restriction against the public base repository named in the route, letting a public-only token write into a private head branch via server-side PR merge/rebase.
- Languages: Splunk SPL, Microsoft KQL, Sigma
- ATT&CK: T1190, T1199
- Data sources: gitea:app, gitea_application_log, reverse_proxy_access_log
- Severity: critical
- Confidence: high
Splunk SPL
index=gitea sourcetype="gitea:app" http_method=POST url_path="/api/v1/repos/*/pulls/*/update"
| rex field=url_path "/api/v1/repos/(?<base_owner>[^/]+)/(?<base_repo>[^/]+)/pulls/(?<pr_index>\d+)/update"
| eval token_scope=coalesce(token_scope, api_token_scope)
| where token_scope="public-only" AND head_repo_visibility="private"
| table _time, src_ip, user, base_owner, base_repo, pr_index, head_repo, head_repo_visibility, token_scope, http_status
| sort -_timeMicrosoft KQL
GiteaAppEvents
| where TimeGenerated > ago(24h)
| where HttpMethod == "POST" and UrlPath matches regex @"/api/v1/repos/[^/]+/[^/]+/pulls/\d+/update"
| where TokenScope == "public-only" and HeadRepoVisibility == "private"
| project TimeGenerated, ClientIP, AccountName, UrlPath, HeadRepo, HeadRepoVisibility, TokenScope, HttpStatusCodeSigma
title: Gitea Public-Only Token Used on Pull Request Update Crossing Private Head Repository
id: 6a2e9b0e-58e4-4a3c-9a5a-cve202658443001
status: experimental
description: Detects a Gitea API token flagged as public-only scope invoking the pull-request update endpoint where the resolved head repository is private, matching the CVE-2026-58443 confused-deputy pattern.
references:
- https://github.com/go-gitea/gitea/security/advisories/GHSA-xxjv-752h-3vp2
- https://cybersecuritynews.com/gitea-vulnerability/
author: Threadlinqs Team
date: 2026-07-21
logsource:
product: gitea
category: application
detection:
selection:
http_method: 'POST'
url_path|re: '/api/v1/repos/[^/]+/[^/]+/pulls/[0-9]+/update'
token_scope: 'public-only'
head_repo_visibility: 'private'
condition: selection
falsepositives:
- Legitimate automation misconfigured to use a public-only token against a repo it also has private write access to (should still be investigated/rotated)
level: high
tags:
- attack.initial-access
- attack.t1190
- attack.t1199
- cve.2026.58443
- attack.tool.giteaKnown false positives:
- Internal automation intentionally configured with a public-only token that also legitimately needs cross-visibility PR access (rare; should still be reviewed and the token re-scoped)
Tuning notes: Requires Gitea to emit token_scope and head_repo_visibility fields in application logs (available via Gitea's structured JSON logging or a custom log hook on the pulls/update handler); if unavailable, fall back to alerting on any pulls/update call where base and head repo differ in an owner/org and cross-reference PR metadata via the Gitea API to backfill visibility.
- Repeated Public-Only Token Probing of Cross-Visibility Pull-Request-Update Relationships (Discovery/Reconnaissance) · unlock with TL Creds
- Anomalous Commit Provenance: Private PR Head Branch Receives Commits Sourced From a Public Base Repository Without Direct Push Credential (Data Manipulation) · unlock with TL Creds
- Private Repository Content Reachable via Public-Only Token Exfiltrated Through Gitea API Response (Exfiltration Over Web Service) · unlock with TL Creds
- Trusted-Relationship Abuse: Human Account Write Permission Borrowed by Restricted Token Across Public/Private PR Boundary · unlock with TL Creds
- Sibling Authorization-Bypass Correlation: Fork PR Approval-Gate Bypass or Actions Artifact HMAC Flaw Co-Occurring With PR-Update Confused-Deputy · unlock with TL Creds
- Post-Bypass Reconnaissance: Account/Permission Enumeration Sourced From a Just-Compromised Private Repository Context · unlock with TL Creds
- Confused-Deputy Application-Access-Token Abuse Elevating to Private Repository Write (CVE-2026-58443 Post-Exploitation) · unlock with TL Creds
- Gitea Actions ActionRun Auto-Triggered on Private Repository Immediately Following Cross-Visibility PR-Update Call (CVE-2026-58443 CI/CD Execution) · unlock with TL Creds
Indicators of compromise
As of 2026-07-21, Threadlinqs Intelligence tracks 29 indicators of compromise for TL-2026-1587.
Technical analysis
Fixed in Gitea v1.27.0 (PR #38406); affects all versions up to v1.26.4.
CVE-2026-58443 (GHSA-xxjv-752h-3vp2) is an Incorrect Authorization vulnerability (CWE-863) in Gitea's pull request update API, `POST /api/v1/repos/{owner}/{repo}/pulls/{index}/update`. Gitea supports 'public-only' access tokens that are supposed to be confined to interacting solely with public repositories and resources. The update endpoint validates the requesting token's public-only restriction against the *public base repository* named in the API route, but fails to re-apply that same restriction when the operation subsequently touches the pull request's *head repository* — which can be a private repository, provided the caller (a human account, not the token itself) already holds normal write permission there through an existing public-base/private-head PR relationship.
Because the authorization check only inspects the base repository's visibility, an attacker holding a public-only token can issue an authenticated API call that pushes new commits onto the private head branch of the pull request, even though the token was never meant to be able to touch private-repository content at all. This is a token-scope confused-deputy flaw: the API borrows the human account's broader write permission on the private repo while the request itself is authenticated with a token that should never have been able to reach it. As one technical writeup summarized it: 'A token that fails when attempting a direct write to a private repository can still modify a private branch through the pull request update function.'
The exploit chain requires: (1) a valid public-only access token with `write:repository` scope, (2) a user account that already holds normal write permission on the private PR head branch, (3) an existing public base repository, and (4) a pull-request relationship permitting base-to-head updates. The attacker stages content in the public base repository, invokes the vulnerable update endpoint targeting the private head branch, and Gitea server-side merges/rebases the public commits into the private branch. If Gitea Actions is enabled with push-triggered workflows on that private repository, the server-side push causes those workflows to execute automatically within the private repository's context — with access to any secrets, deploy credentials, and build artifacts scoped to that workflow. Researchers demonstrated exactly this: an injected commit landing on the private PR head branch via the bypass caused Gitea to start a matching private-repository ActionRun and associated job.
The flaw was reported by security researcher ohxorud-dev and patched by Gitea maintainer bircni via pull request #38406 (co-authored/reviewed by TheFox0x7, techknowlogick, Lunny Xiao, wxiaoguang, and Zettat123, with an automated Copilot AI review covering 84 files), merged 2026-07-12 and released as part of Gitea v1.27.0 (milestone 28.0.0). PR #38406 was a large, coordinated security-hardening PR — 36 commits across 84 files — bundling 46 distinct CVE fixes across four categories: (a) SSRF protections for migration asset/PR-patch fetches, OAuth2 avatar fetches, OpenID discovery, pull-mirror URL re-validation, and outbound proxy path validation (introducing a new `[security].ALLOWED_HOST_LIST` setting that deprecates the old `[webhook].ALLOWED_HOST_LIST`); (b) access-token scope enforcement fixes preventing scope escalation at token creation and confining public-only tokens across feeds, packages, Actions listings, and star/watch lists (CVE-2026-58443 falls in this category); (c) access-control/disclosure fixes blocking go-get default-branch leaks, webhook authorization-header exposure via API, stale watches on private-repo visibility transitions, and cross-repo label/attachment scoping; and (d) DoS mitigations (npm dist-tag bounds, Debian control-file decompression limits, Arch package file-list caps, SSH public-key length validation). Named sibling CVEs from the same v1.27.0 remediation batch include CVE-2026-58433 (team-repository linking endpoint circumvented org settings), CVE-2026-58435 (LFS deploy-key privilege escalation), CVE-2026-58436 (DoS via Accept-Language header parsing), and CVE-2026-59765 (SSRF in migration asset downloads bypassing host validation).
CVE-2026-58443 also sits in a broader 2026 pattern of Gitea authorization/access-control CVEs. An earlier Gitea bulletin (SB2026062240, published 2026-06-22, covering Gitea 0.9.99-1.26.2) catalogued 8 related access-control flaws, several also CWE-863/CWE-284 'incorrect authorization' class bugs (e.g. CVE-2026-27775, 'gain full repository write access'; CVE-2026-20896, CVSS 9.1, 'impersonate arbitrary users' on Docker deployments). Separately, CVE-2026-58424 (CVSS 8.9, CWE-285/CWE-732/CWE-863, fixed in 1.26.3/1.26.4, published 2026-07-03) let attackers bypass permanent-fork pull-request workflow approval gates, and CVE-2026-58426 (CVSS 9.6, CWE-347 HMAC ambiguity, fixed in 1.26.2) allowed cross-repository Gitea Actions Artifacts V4 signed-URL reads and cross-task upload-state writes — both PR-workflow/CI-adjacent authorization flaws in the same subsystem family as CVE-2026-58443, underscoring a recurring class of bugs in Gitea's pull-request/Actions trust boundary. Cyber Security News published a public technical writeup of CVE-2026-58443 specifically on 2026-07-21. As of this writing the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog; exploitability is assessed as proof-of-concept-public rather than confirmed active exploitation in the wild.
MITRE ATT&CK techniques by tactic:
Discovery
T1069 Permission Groups Discovery; T1087 Account Discovery
Lateral Movement
T1072 Software Deployment Tools
Privilege Escalation
T1078 Valid Accounts; T1548 Abuse Elevation Control Mechanism
Persistence
Initial Access
T1190 Exploit Public-Facing Application; T1199 Trusted Relationship
initial-access
T1195.002 Compromise Software Supply Chain
Collection
T1213 Data from Information Repositories
lateral-movement
T1550.001 Application Access Token
Impact
T1565.001 Stored Data Manipulation
Exfiltration
T1567 Exfiltration Over Web Service
Resource Development
Reconnaissance
Remediation
Patches
- Gitea v1.27.0 — fix landed via PR #38406, backported for the 1.27 release line
- Gitea v1.26.3 / v1.26.4 — earlier fixes for related PR-workflow/artifact authorization bugs CVE-2026-58424 and CVE-2026-58426
Immediate actions
- Upgrade all Gitea instances to v1.27.0 or later, which contains the fix from PR #38406
- Audit issued public-only access tokens and rotate any tokens with write:repository scope used against repositories that participate in cross-visibility (public base / private head) pull requests
- Review Gitea Actions run history for private repositories for unexpected ActionRun entries correlated with pull-request-update API calls from public-only tokens
- Restrict or temporarily disable Gitea Actions on privately-hosted repositories that receive pull requests from public base repositories until patched
- Check for the sibling CVEs bundled in the same v1.27.0 release (CVE-2026-58433, -58435, -58436, -59765) and the earlier CVE-2026-58424 / CVE-2026-58426 workflow-and-artifact bypasses when planning the upgrade
Workarounds
- Where upgrading is not immediately possible, revoke or avoid using public-only scoped tokens entirely on instances hosting private repositories that share pull-request relationships with public repositories
Longer-term hardening
- Enforce least-privilege token scoping practices; avoid issuing public-only tokens to automation that also has legitimate write access to private repositories
- Add monitoring/alerting on API calls to the pull request update endpoint (`/api/v1/repos/{owner}/{repo}/pulls/{index}/update`) that cross a public-base/private-head repository boundary
- Treat Gitea Actions workflow triggers on any repository reachable via cross-visibility pull requests as a supply-chain attack surface requiring the same secrets hygiene as public CI/CD
- Subscribe to Gitea's official security advisory feed (about.gitea.com/security) to track future CVEs in the same 2026 remediation series
- Migrate webhook host-allowlisting from the deprecated `[webhook].ALLOWED_HOST_LIST` to the new unified `[security].ALLOWED_HOST_LIST` introduced alongside this patch
Affected and fixed versions
Timeline
- Gitea released v1.26.3 and v1.26.4, fixing related pull-request/Actions authorization bugs CVE-2026-58424 (fork PR approval-gate bypass) and CVE-2026-58426 (Actions Artifacts V4 signed-URL/HMAC flaw) — the same subsystem family as CVE-2026-58443.
- Security bulletin SB2026062240 published, cataloguing 8 access-control vulnerabilities (several CWE-863/CWE-284 incorrect-authorization class) affecting Gitea 0.9.99 through 1.26.2, establishing the broader pattern of authorization flaws this CVE belongs to.
- CVE-2026-58424 and CVE-2026-58426 (fork PR-workflow bypass and Actions Artifacts V4 cross-repository read/write flaw) publicly published.
- Threat-intelligence research (mallory.ai) first documented the CVE-2026-58424/CVE-2026-58426 Gitea PR-workflow and artifact-access vulnerabilities.
- GitHub Security Advisory GHSA-xxjv-752h-3vp2 published, publicly crediting the vulnerability report to security researcher ohxorud-dev and the patch to Gitea maintainer bircni.
- Gitea v1.27.0 released (milestone 28.0.0), bundling the CVE-2026-58443 fix alongside sibling CVEs CVE-2026-58433, CVE-2026-58435, CVE-2026-58436, and CVE-2026-59765, plus SSRF protections and access-token scope-escalation fixes; introduces the new [security].ALLOWED_HOST_LIST setting.
- Fix for CVE-2026-58443 merged into go-gitea/gitea via PR #38406 (36 commits, 84 files, bundling 46 CVE fixes total), authored by maintainer bircni following the report from researcher ohxorud-dev, with co-authorship/review from TheFox0x7, techknowlogick, Lunny Xiao, wxiaoguang, and Zettat123.
- Cyber Security News published a public technical writeup of CVE-2026-58443, detailing the authorization bypass mechanism and the demonstrated PoC that triggered a private Gitea Actions workflow via an injected commit.
Sources cited
- SB2026062240 - Multiple vulnerabilities in Gitea cybersecurity-help.cz · Advisory · 2026-06-22
- Gitea 1.27.0 is released blog.gitea.com · Vendor report · 2026-07-12
- High-Severity Gitea Flaws Enable Workflow Bypass and Artifact Access mallory.ai · Research · 2026-07-04
- Gitea Official Security Page about.gitea.com · Vendor report · 2026-07-21
- fix: Various security fixes (PR #38406) GitHub · Code repository · 2026-07-12
- go-gitea/gitea Security Advisories GitHub · Code repository · 2026-07-21
- GHSA-xxjv-752h-3vp2: Public-only repository tokens could update private pull-request head branches GitHub · Code repository · 2026-07-12
- Gitea Vulnerability Article - CVE-2026-58443 cybersecuritynews.com · Article · 2026-07-21
Previous and next in vulnerability
AI-drafted from 8 cited sources; published ; last updated —.