Back to Labs
Security Advisory

CVE-2026-60004

About

Gitea before 1.27.1 allows remote code execution via the diffpatch API through Git hook installation.

Weakness (CWE):CWE-94

Rainforest analyst review

Gitea before 1.27.1 allows the diffpatch API to be abused to install a Git hook — a script that Git runs automatically on repository events such as receiving a push. By writing an attacker-controlled hook through that API path, an ordinary-looking repository operation is turned into arbitrary code execution on the server that hosts the repository, since the malicious hook runs with the privileges of the Gitea process the next time its triggering event fires.

Gitea is a self-hosted Git service, and while many instances are internal they are frequently exposed for developer and CI access, which puts a code-execution foothold squarely in the software supply chain: source code, stored credentials, and build pipelines all sit within reach. Upgrade to 1.27.1 or later, restrict who can reach the affected API and repository administration features, and audit repositories for unexpected server-side hooks, since a planted hook persists until someone removes it regardless of the patch.

References

Related CVEs

Frequently asked questions

What is CVE-2026-60004?

Gitea before 1.27.1 allows remote code execution via the diffpatch API through Git hook installation.

How severe is CVE-2026-60004?

CVE-2026-60004 carries a CVSS 3.1 base score of 9.8, rated critical. On the Rainforest Risk Index — which weighs the severity alongside how easy the flaw is to reach and how broad its impact is — it scores 99 out of 100, in the critical band.

How is CVE-2026-60004 exploited?

According to the CVSS vector (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H): attack vector Network, attack complexity Low, privileges required None, user interaction None. Impact on confidentiality High, integrity High and availability High.

Which products are affected by CVE-2026-60004?

Public advisories list the following as affected: gitea. Check the references on this page for the exact versions each vendor confirms.

How do I fix CVE-2026-60004?

Apply the fix the vendor published — the references on this page link to the primary advisories and patches. When patching can't happen right away, reduce the exposure of the affected component and watch it for exploitation attempts. Rainforest customers see this vulnerability correlated to their own assets and prioritized by real exposure, not by score alone.

Empower Your Security Strategy with Rainforest

Discover vulnerabilities early, prioritize critical threats, and protect what truly matters. Rainforest streamlines your security operations, saving you time and reducing costs, so you can focus on what drives your business forward.

Share this:LinkedInX Email