Direct naar de inhoud
⚡ Kritieke cyberalerts voor jouw sector & systemen — direct in je inbox. Aanmelden →
cybernieuws.nl Cybersecurity en informatiebeveiling nieuws alerts live · 8 min 166 bronnen 1 kritiek 29 vandaag
CVE's Videos Dagbriefing

← Terug naar CVE-database

CVE-2026-52811

NONE Gepubliceerd: CWE-22

Beschrijving NL

GOGS is een open source zelf-gehoste Git-service. Voorafgaand aan 0.14.3 controleert (*Repository) .UploadRepoFiles alleen op symlinks op het blad van het uploaddoel (osx.IsSymlink(targetPath)). De broers en zussen UpdateRepoFile, DeleteRepoFile en GetDiffPreview gebruiken hasSymlinkInPath, dat elke component bevat — UploadRepoFiles is de enige uitschieter. Een aanvaller met repo-write toegang plus een multipart upload waarvan de bestandsnaam een letterlijke backslash bevat (bewaard door filepath.Base op Linux, vervolgens geconverteerd naar / door pathx.Clean) leidt het schrijven om via een eerder toegezegde directory-symlink. iox.CopyFile opent de bestemming met os.Create (geen O_NOFOLLOW), dus de kernel volgt de bovenliggende symlink en schrijft aanvallerbytes overal waar de UID van de gogs kan schrijven — ~git/.ssh/authorized_keys → SSH-voetstuk, of .git/hooks/post-receive volgende druk → op RCE. Deze kwetsbaarheid is opgelost in 0.14.3.

Origineel (Engels) tonen

Gogs is an open source self-hosted Git service. Prior to 0.14.3, (*Repository).UploadRepoFiles checks for symlinks only on the leaf of the upload target (osx.IsSymlink(targetPath)). The siblings UpdateRepoFile, DeleteRepoFile, and GetDiffPreview use hasSymlinkInPath, which lstats every component — UploadRepoFiles is the lone outlier. An attacker with repo-write access plus a multipart upload whose filename contains a literal backslash (preserved by filepath.Base on Linux, then converted to / by pathx.Clean) redirects the write through a previously-committed directory symlink. iox.CopyFile opens the destination with os.Create (no O_NOFOLLOW), so the kernel follows the parent symlink and writes attacker bytes anywhere the gogs UID can write — ~git/.ssh/authorized_keys → SSH foothold, or .git/hooks/post-receive → next-push RCE. This vulnerability is fixed in 0.14.3.

References