{"answers":{"affected":"5 open source packages ship an affected version, including gitea.dev, gitea and code.gitea.io/gitea. It affects 1 product.","exploited":"Yes. Attackers have exploited CVE-2026-60004 in the wild since at least 25 Aug 2026.","fix":"Upgrade gitea.dev to 1.27.1 or later. US federal agencies must fix it by 28 Aug 2026.","what":"CVE-2026-60004 is a critical code injection vulnerability in Gitea Gitea, published on 26 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-60004 and fix it if it is affected.\n\nWhat it is: CVE-2026-60004 is a critical code injection vulnerability in Gitea Gitea, published on 26 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: Yes. Attackers have exploited CVE-2026-60004 in the wild since at least 25 Aug 2026.\n\nAffected packages and fixed versions:\n- gitea.dev (Go): affected all versions; fixed in 1.27.1\n- gitea.dev (Go): affected from 1.17.0; fixed in 1.27.1\n- gitea.dev (Go): affected from 1.17.0; fixed in 1.27.1\n- gitea (Bitnami): affected from 1.17.0; fixed in 1.27.1\n- code.gitea.io/gitea (Go): affected from 1.17.0; no fix listed\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-60004/ (Markdown: https://insights.sbomify.com/CVE-2026-60004/index.md)","id":"CVE-2026-60004","markdown":"https://insights.sbomify.com/CVE-2026-60004/index.md","name":"CVE-2026-60004","record":{"aliases":["BIT-gitea-2026-60004","GHSA-rcr6-4jqh-j84m","GO-2026-6433","MINI-252m-7m6c-8xmj","MINI-rx98-74qr-5jgg"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Gitea Git hosting","requires_auth":"none","summary":"Attackers can achieve remote code execution in Gitea by exploiting the diffpatch API to install malicious Git hooks.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"gitea","vendor":"gitea"}],"cvss":{"score":9.8,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"description":"Gitea before 1.27.1 allows remote code execution via the diffpatch API through Git hook installation.","ecosystems":["Bitnami","Go"],"exploits":{"exploitdb":0,"first_seen":"2026-07-29","github_poc":11,"max_poc_stars":17,"metasploit":0,"nuclei":1,"refs":[{"date":"2026-08-03T07:48:39Z","kind":"github_poc","ref":"https://github.com/imbas007/CVE-2026-60004-POC","stars":17,"title":"CVE-2026-60004 Pre-Auth RCE Exploit — Gitea \u003c= 1.27.0 diffpatch git hook injection (CVSS 9.8)"},{"date":"2026-07-30T22:24:16Z","kind":"github_poc","ref":"https://github.com/0xredash/CVE-2026-60004","stars":6,"title":"CVE-2026-60004"},{"date":"2026-07-29T08:35:16Z","kind":"github_poc","ref":"https://github.com/HORKimhab/CVE-2026-60004","stars":5,"title":"CVE-2026-60004"},{"date":"2026-08-04T12:16:59Z","kind":"github_poc","ref":"https://github.com/HackSpeak/CVE-2026-60004","stars":2,"title":"Gitea diffpatch RCE (CVE-2026-60004) PoC - repo-write to RCE as Gitea service account"},{"date":"2026-08-08T13:08:31Z","kind":"github_poc","ref":"https://github.com/gagaltotal/CVE-2026-60004-poc-gitea","stars":2,"title":"CVE-2026-60004 — Gitea Pre-Auth RCE via diffpatch hook injection"},{"date":"2026-07-30T08:19:19Z","kind":"github_poc","ref":"https://github.com/EQSTLab/CVE-2026-60004","stars":1,"title":"Gitea diffpatch RCE"},{"date":"2026-08-21T04:19:02Z","kind":"github_poc","ref":"https://github.com/yym8538/CVE-2026-60004","stars":1,"title":null},{"date":"2026-08-03T12:32:49Z","kind":"github_poc","ref":"https://github.com/shinthink/CVE-2026-60004","stars":0,"title":"CVE-2026-60004 — Gitea/Forgejo Diffpatch Git Hook RCE. Bare clone → post-index-change hook injection. CVSS 9.8 | CWE-94 | Gitea \u003c 1.27.1"}],"tier":"exploited"},"has_fix":true,"headline":"Gitea Code Injection","id":"CVE-2026-60004","indexable":true,"kev":{"dateAdded":"2026-08-25","dueDate":"2026-08-28","knownRansomwareCampaignUse":"Unknown","product":"Gitea","requiredAction":"Apply mitigations in accordance with vendor instructions, ensuring compliance with CISA’s BOD 26-04 Prioritizing Security Updates Based on Risk (see URL in Notes) guidance and CISA’s “Forensics Triage Requirements” (see URL in Notes). Follow applicable BOD 26-04 guidance for cloud services or discontinue use of the product if mitigations are unavailable. Stakeholders are responsible for evaluating each asset's internet exposure and ensuring adherence to BOD 26-04 patching guidelines.","vendorProject":"Gitea","vulnerabilityName":"Gitea Code Injection Vulnerability"},"kind":"cve","links":{"ecosystem":"Bitnami","product":"gitea:gitea","products":["gitea:gitea"],"type":"code_injection","year":"2026"},"n_packages":5,"n_references":4,"next":{"headline":"NGINX ngx_http_slice_module vulnerability","id":"CVE-2026-60005"},"packages":[{"ecosystem":"Bitnami","fixed":["1.27.1"],"introduced":["1.17.0"],"last_affected":[],"package":"gitea","purl":"pkg:bitnami/gitea","source":"BIT-gitea-2026-60004"},{"ecosystem":"Go","fixed":[],"introduced":["1.17.0"],"last_affected":[],"package":"code.gitea.io/gitea","purl":"pkg:golang/code.gitea.io/gitea","source":"GO-2026-6433"},{"ecosystem":"Go","fixed":["1.27.1"],"introduced":["0"],"last_affected":[],"package":"gitea.dev","purl":"pkg:golang/gitea.dev","source":"GO-2026-6433"},{"ecosystem":"Go","fixed":["1.27.1"],"introduced":["1.17.0"],"last_affected":[],"package":"gitea.dev","purl":null,"source":"GHSA-rcr6-4jqh-j84m"},{"ecosystem":"Go","fixed":["1.27.1"],"introduced":["1.17.0"],"last_affected":[],"package":"gitea.dev","purl":"pkg:golang/gitea.dev","source":"GHSA-rcr6-4jqh-j84m"}],"prev":{"headline":"Use after free in OpenSSH","id":"CVE-2026-60002"},"products":["Gitea"],"published":"2026-08-26","related":[{"cvss_score":9.8,"headline":"Gitea WebAuthn bypass during OAuth and OIDC sign-in","id":"CVE-2026-73278","kev_date_added":null,"published":"2026-10-06"},{"cvss_score":9.8,"headline":"Gitea fork workflow approval bypass through maintainer-triggered events","id":"CVE-2026-94205","kev_date_added":null,"published":"2026-10-06"},{"cvss_score":9.8,"headline":"Gitea vulnerable to Argument Injection","id":"CVE-2022-42968","kev_date_added":null,"published":"2022-10-16"},{"cvss_score":9.8,"headline":"Improper Privilege Management in Gitea","id":"CVE-2021-45330","kev_date_added":null,"published":"2022-02-09"},{"cvss_score":9.8,"headline":"Reuse of one time passwords allowed in Gitea","id":"CVE-2021-45331","kev_date_added":null,"published":"2022-02-09"},{"cvss_score":9.8,"headline":"Capture-replay in Gitea","id":"CVE-2021-45327","kev_date_added":null,"published":"2022-02-08"}],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"open","licence":"CC0 1.0","name":"CISA KEV"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"active","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-09-08","vendors":["Gitea"]},"summary":"Attackers can achieve remote code execution in Gitea by exploiting the diffpatch API to install malicious Git hooks.","url":"https://insights.sbomify.com/CVE-2026-60004/"}