Last updated: September 29, 2026 at 8:42 AM UTC
All 891 Vulnerability 357 Breach 144 Threat 383 Defense 7
Tag: gitea (4 articles)Clear

Attackers exploit a critical Gitea flaw to run code on self-hosted Git servers

CISA warned that attackers are exploiting a critical flaw in Gitea, the popular self-hosted Git service, and added it to its exploited-vulnerabilities catalog. Tracked as CVE-2026-60004 and scored 9.8, the code-injection bug lets a user with repository write access send a malicious patch to the diffpatch API endpoint, planting an executable Git hook that runs shell commands as the Gitea service account. Crucially, default installations have open self-registration, so an unauthenticated attacker can simply register, create a repository, and gain code execution. It affects versions 1.17 through 1.27.0 and was fixed in July, and reports describe attackers dropping cryptocurrency miners, with one intrusion taking about eleven seconds.

Check
Upgrade Gitea to 1.27.1 or later immediately, disable open self-registration on internet-facing instances, and treat any exposed, registration-enabled server as an incident-response case rather than just a patch.
Affected
Organizations running self-hosted Gitea 1.17 through 1.27.0 (CVE-2026-60004); an attacker with repository write access, obtainable through default open registration, can execute shell commands as the Gitea service account.
Fix
Patch to a fixed release, turn off self-registration where not needed, restrict internet exposure of Gitea, and hunt patched servers for rogue Git hooks, miner processes, and other signs of compromise.

Critical Gitea flaw lets anonymous users read server secrets from public repos

Gitea patched a critical flaw in the self-hosted Git platform that lets an unauthenticated attacker read any file the service account can access, needing only a public repository and crafted Org-mode markup. Tracked as CVE-2026-59774 and scored 9.8, it stems from the markup-rendering endpoint: Gitea initializes its Org-mode library without restricting file access, so the include directive accepts absolute paths and returns their contents. No login or write access is required. Gitea warns it can chain to command execution: read the configuration file, extract the internal token, inject a Git hook, and trigger it during an anonymous clone. It affects versions 1.22.1 through 1.27.0, fixed in 1.27.1.

Check
Upgrade self-hosted Gitea to 1.27.1 immediately, and if logs show requests to the markup endpoint on an affected build, treat all secrets readable by the Gitea service account as exposed.
Affected
Organizations running Gitea 1.22.1 through 1.27.0 with any public repository (CVE-2026-59774); an unauthenticated attacker can read configuration files, internal tokens, and signing keys, and potentially chain to code execution.
Fix
Update to 1.27.1, rotate the internal token and any credentials the service account can read, keep Gitea off the public internet where possible, and review logs for Org-mode markup requests.

Gitea Docker images trusted a forged header, letting anyone log in as any user

Attackers have started probing a critical flaw in Gitea's official Docker images, the self-hosted Git service used by many development teams. The images shipped a configuration that trusted the X-WEBAUTH-USER header from any source address, so with reverse-proxy login enabled, anyone who could reach the port could send that header and be authenticated as any user, no password required. Tracked as CVE-2026-20896 and rated 9.8, it was fixed in version 1.26.3 late last month, which removes the wildcard and makes reverse-proxy authentication opt-in. Sysdig reported the first exploitation attempt 13 days after disclosure, so far just reconnaissance, against some of the roughly 6,200 internet-facing Gitea instances.

Check
Check whether you run Gitea from its Docker image and on what version, review the app.ini reverse-proxy trusted-proxies setting for a wildcard, and whether the instance is internet-reachable.
Affected
Self-hosted Gitea Docker deployments on version 1.26.2 or earlier with reverse-proxy login enabled (CVE-2026-20896); an unauthenticated attacker who can reach the service can impersonate any user by forging one header.
Fix
Update Gitea to 1.26.3 or later, remove the wildcard from the reverse-proxy trusted-proxies setting, keep management interfaces off the public internet, and review logs for spoofed X-WEBAUTH-USER authentication attempts.

Gitea CVE-2026-27771 (CVSS 8.2) lets unauthenticated attackers pull private container images - ~30,000 deployments exposed for four years, Forgejo affected

Noscope has disclosed CVE-2026-27771 (CVSS 8.2), a flaw in the self-hosted Gitea version-control platform that lets unauthenticated remote attackers pull private container images with no account, password, or prior access. The 'private' designation on a container repository simply failed to enforce. It affects all Gitea versions before 1.26.2 and went undetected for nearly four years; Noscope estimates 30,000+ exposed deployments across 30+ countries, with most exposure in China, the US, Germany, France, and the UK, spanning healthcare, aerospace, retail, and ISPs. Forgejo is confirmed affected, and any Gitea fork should be treated as vulnerable until verified. Technical details were withheld to allow patching.

Check
Inventory self-hosted Gitea and Forgejo instances and confirm version. Check whether the container registry is internet-exposed. Review registry pull logs for unauthenticated access to private images.
Affected
All Gitea versions before 1.26.2 and confirmed-affected Forgejo, plus unverified Gitea forks. ~30,000 exposed deployments across 30+ countries in healthcare, aerospace, retail, and ISP sectors.
Fix
Upgrade Gitea to 1.26.2 immediately. Temporary workaround: set [service].REQUIRE_SIGNIN_VIEW=true (unsuitable if some containers must stay public). Rotate any secrets baked into exposed private images.