
Security case-study repository reconstructing Gitea source at historical commits to demonstrate reachability analysis versus SCA for CVE-2024-45337. Demo only, not for deployment.
ef9d1e9 — baseline (last-vulnerable state) — CVE-2024-45337⚠️ DEMONSTRATION / CASE-STUDY branch — NOT FOR ANY REAL USE. Reconstructs real Gitea source at a historical commit for security-analysis demonstration. Do not deploy, install, build, run, or depend on it. Not a fork; no upstream git history; not affiliated with or endorsed by Gitea. Source © its original authors under the upstream
LICENSE(retained in this branch's snapshot commit). This case-study README replaces upstream's project README at the branch tip; upstream's originalREADME.mdis preserved byte-identical in this branch's snapshot commit.
The last-vulnerable state — Gitea at upstream
ef9d1e9002a1f791e5ee6d0c55d1524a8e9a1777
(release/v1.22, immediate parent of the failed dependency bump). This is the PoE-reproducible
state: the reachable PublicKeyCallback misuse is present and no mitigation has been applied.
There is no separate vulnerability-introduced branch: the misuse predates the CVE by years and is not
cheaply pinnable to a single introducing commit, so baseline doubles as the vulnerable PoE state.
modules/ssh/ssh.go)const giteaKeyID = contextKey("gitea-key-id")
// ...
func publicKeyHandler(ctx ssh.Context, key ssh.PublicKey) bool {
// ... stores EVERY offered candidate key's ID, last-write-wins:
ctx.SetValue(giteaKeyID, pkey.ID)
}
func sessionHandler(session ssh.Session) {
// ... trusts whatever landed in the context, regardless of which key authenticated:
keyID := fmt.Sprintf("%d", session.Context().Value(giteaKeyID).(int64))
}
SSH permits a client to offer multiple candidate public keys before proving control of any one.
Because publicKeyHandler writes each offered key's ID into the context (last-write-wins) and
sessionHandler reads it back unconditionally, a client can be attributed a key it never proved
control of. This is exactly the misuse the upstream golang.org/x/crypto advisory warns against.
go.mod pins golang.org/x/crypto v0.26.0 (pre-mitigation) and github.com/gliderlabs/ssh v0.3.6.
reachable_candidate — the sink symbol giteaKeyID and its reachable call path are present.
ef9d1e9002a1f791e5ee6d0c55d1524a8e9a1777.main
README for the full case-study index.
Ghidra ist ein Software-Reverse-Engineering (SRE)-Framework.

Regelbasiertes statisches und dynamisches Analyse-Tool, das Fähigkeiten in PE-, ELF-, .NET- und Shellcode-Dateien identifiziert und sie MITRE ATT&CK-Techniken zur Malware-Triage zuordnet.

Eine Neuimplementierung von YARA in Rust.