CVE Intelligence

Vulnerabilidades do Gogs Gogs

🔔 Criar alerta RSS Verificador de versão

CVEs publicadas que afetam Gogs Gogs: 42 registro(s), com versões afetadas e correções.
cpe:2.3:a:gogs:gogs

CVE-2026-82402 Média · 5.3 CWE-601 14/10/2026
Gogs: Open Redirect in /redirect endpoint via backslash bypass in `IsSameSite`
Gogs is an open source self-hosted Git service. Prior to 0.15.0+dev, an unauthenticated attacker can provide a backslash-containing target to the /redirect endpoint, and similar post-action redirect flows are also affected. internal/urlx/urlx.go IsSameSite validates a normalized form of the target while cmd/gogs/internal/web/web.go getRedirect and other callers use the original value in the Location response. This backslash normalization mismatch lets browsers interpret the Location value as a scheme-relative external URL, allowing links on a trusted Gogs domain to redirect victims to attacker-controlled content for phishing. This vulnerability is fixed in 0.15.0+dev.
CVE-2026-52816 Média · 5.4 CWE-80 24/06/2026
Gogs: Unauthenticated Jupyter Notebook (ipynb) Sanitizer allows arbitrary data: URIs leading to XSS
Gogs is an open source self-hosted Git service. Prior to 0.14.3, the Jupyter Notebook (ipynb) sanitizer endpoint at POST /-/api/sanitize_ipynb allows arbitrary data: URIs without proper restrictions, potentially leading to Cross-Site Scripting (XSS). The endpoint uses bluemonday.UGCPolicy() with p.AllowURLSchemes("data") which permits all data URI schemes including data:text/html, enabling attackers to inject malicious HTML/JavaScript. Additionally, the endpoint has no authentication middleware, allowing any registered user to exploit this vulnerability. This vulnerability is fixed in 0.14.3.
CVE-2026-52815 Média · 5.5 Exploit público CWE-200 24/06/2026
Gogs: Unauthenticated Organization Teams Information Disclosure via API
Gogs is an open source self-hosted Git service. Prior to 0.14.3, Gogs has an unauthenticated information disclosure vulnerability. The GET /api/v1/orgs/:orgname/teams endpoint at internal/route/api/v1/org_team.go:8 returns all teams for any organization without requiring authentication. The route group at internal/route/api/v1/api.go:380-385 lacks the reqToken() middleware, and the listTeams() handler performs no authentication check, exposing team IDs, names, descriptions, and permission levels to any unauthenticated caller. This vulnerability is fixed in 0.14.3.
CVE-2026-52814 Média · 5.5 CWE-400 24/06/2026
Gogs: Unauthenticated Asymmetric Denial of Service (DoS) via SSH Handshake Stall (File Descriptor Exhaustion)
Gogs is an open source self-hosted Git service. Prior to 0.14.3, the Gogs built-in Go SSH server is vulnerable to an unauthenticated, asymmetric Denial of Service (DoS) attack. The application accepts inbound TCP connections and passes them to golang.org/x/crypto/ssh.NewServerConn inside a new goroutine without enforcing any read/write deadlines on the underlying net.Conn. An unauthenticated attacker can open multiple TCP connections to the SSH port and simply withhold the SSH protocol banner. This forces the server to spawn an unbounded number of goroutines that block indefinitely waiting for socket I/O. This leads to complete File Descriptor (FD) exhaustion, preventing legitimate users from accessing the Git SSH service, and ultimately destabilizing the entire Gogs process (e.g., causing internal log rotation failures). This vulnerability is fixed in 0.14.3.
CVE-2026-52813 Crítica · 10.0 CWE-23 24/06/2026
Path traversal no Gogs em nomes de organização leva à execução remota de código
O Gogs é um serviço Git self-hosted de código aberto. Antes da versão 0.14.3, nomes de organização que contêm sequências de path traversal (../) são aceitos pelo Gogs, e repositórios sob elas são gravados em caminhos que seguem esses path traversals. Isso permite armazenar e recuperar dados de repositórios em locais arbitrários do sistema de arquivos. Ao criar uma estrutura aninhada de repositórios Git, é possível sobrescrever a configuração de hooks de outro repositório, resultando em Remote Code Execution (RCE). Esta vulnerabilidade está corrigida na versão 0.14.3.
CVE-2026-52812 Alta · 7.1 CWE-345 24/06/2026
Gogs: LFS dedupe path leaks private repo content across tenants
Gogs is an open source self-hosted Git service. Prior to 0.14.3, Git LFS storage is content-addressed by OID alone (<LFS-root>/<oid[0]>/<oid[1]>/<oid>) but per-repo authorization lives in the lfs_object table keyed (repo_id, oid). serveUpload skips re-uploading when the OID file already exists on disk and inserts a new (repo_id, oid) row pointing at it without verifying the request body hashes to the OID being claimed. Any user with write access to one repo can bind their repo to an OID owned by a private repo and download the original bytes via their own download endpoint. This vulnerability is fixed in 0.14.3.
CVE-2026-52811 Crítica · 9.0 CWE-22 24/06/2026
Gogs: travessia de diretório por lacuna de verificação de symlink em UploadRepoFiles (CVE-2026-52811)
Gogs é um serviço Git open source autohospedado. Antes da 0.14.3, (*Repository).UploadRepoFiles verifica symlinks apenas na folha do destino do upload (osx.IsSymlink(targetPath)). As funções irmãs UpdateRepoFile, DeleteRepoFile e GetDiffPreview usam hasSymlinkInPath, que faz lstat em cada componente — UploadRepoFiles é a única exceção. Um invasor com acesso de escrita ao repositório e um upload multipart cujo nome de arquivo contém uma barra invertida literal (preservada por filepath.Base no Linux e depois convertida em / por pathx.Clean) redireciona a escrita por meio de um symlink de diretório já commitado. iox.CopyFile abre o destino com os.Create (sem O_NOFOLLOW), então o kernel segue o symlink do diretório pai e grava bytes do invasor em qualquer local onde o UID do gogs tenha permissão de escrita — ~git/.ssh/authorized_keys → acesso SSH inicial, ou <repo>.git/hooks/post-receive → RCE no próximo push. Esta vulnerabilidade foi corrigida na 0.14.3.
CVE-2026-52810 Alta · 7.1 CWE-284 24/06/2026
Gogs: Write to readonly repositories using receive-pack + service=git-upload-pack confusion
Gogs is an open source self-hosted Git service. Prior to 0.14.3, Git smart HTTP authorizes POST …/git-receive-pack using the client-supplied service query string (so ?service=git-upload-pack is evaluated as read access) while routing still runs git receive-pack, allowing push where only read should be allowed. This vulnerability is fixed in 0.14.3.
CVE-2026-52809 Média · 6.8 CWE-324 24/06/2026
Gogs: Password-reset tokens use account-activation lifetime, ignoring RESET_PASSWORD_CODE_LIVES
Gogs is an open source self-hosted Git service. Prior to 0.14.3, password-reset tokens are generated using conf.Auth.ActivateCodeLives (the account-activation lifetime), not conf.Auth.ResetPasswordCodeLives. The token lifetime is baked into the token itself at generation time and is re-extracted from the token at verification time, making RESET_PASSWORD_CODE_LIVES irrelevant to actual enforcement. When an administrator configures a shorter reset window (e.g., 10 minutes) for compliance or security reasons, reset tokens remain exploitable for the full activation lifetime instead, while the reset email falsely advertises the shorter expiry. This vulnerability is fixed in 0.14.3.
CVE-2026-52808 Alta · 7.1 CWE-269 24/06/2026
Gogs: Write-level collaborators can mutate admin-only repository settings via API
Gogs is an open source self-hosted Git service. Prior to 0.14.3, three API endpoints — PATCH /api/v1/repos/:owner/:repo/issue-tracker, PATCH /api/v1/repos/:owner/:repo/wiki, and POST /api/v1/repos/:owner/:repo/mirror-sync — are gated by reqRepoWriter() rather than reqRepoAdmin(). The equivalent operations in the web UI sit behind reqRepoAdmin, which requires AccessMode >= AccessModeAdmin. A write-level collaborator (who has AccessMode == AccessModeWrite < AccessModeAdmin) can therefore call these API endpoints directly to disable the native issue tracker or wiki, inject attacker-controlled external tracker/wiki URLs that redirect all repository visitors, or trigger mirror sync — none of which they are authorized to do. This vulnerability is fixed in 0.14.3.
CVE-2026-52807 Média · 4.8 CWE-79 24/06/2026
Gogs: DOM-based XSS via Milestone Name on New Issue Page
Gogs is an open source self-hosted Git service. Prior to 0.14.3, in new_form.tmpl, milestone names are rendered with Go's default auto-escaping ({{.Name}}), which converts < to &lt; etc. This prevents direct HTML injection. However, when the browser renders the DOM, the text content of the element contains the decoded original payload. Semantic UI 2.4.2's dropdown component has preserveHTML: true as the default setting. When a user selects a dropdown item, the internal set.text() method calls jQuery's .html() with the item's text content. This re-parses the decoded text as HTML, creating the injected element and triggering the JavaScript event handler. An attacker can store an HTML/JavaScript payload in a milestone name, and when any user opens the New Issue page and interacts with the milestone dropdown, the payload executes in their browser via Semantic UI's preserveHTML behavior. This vulnerability is fixed in 0.14.3.
CVE-2026-52806 Crítica · 9.9 Alta · 45 Exploit público CWE-77 24/06/2026
Gogs: injeção de comando no rebase de pull request leva a RCE (CVE-2026-52806)
Gogs é um serviço Git auto-hospedado de código aberto. Antes da versão 0.14.3, o Gogs permite que usuários autenticados alcancem Execução Remota de Código (RCE) no servidor ao criar um pull request com um nome de branch especialmente elaborado que injeta a flag --exec no comando git rebase durante a operação de merge "Rebase before merging". Esta vulnerabilidade está corrigida na versão 0.14.3.
CVE-2026-52805 Alta · 8.7 CWE-918 24/06/2026
Gogs: Migration Redirect Bypass Leads to Internal Repository Theft
Gogs is an open source self-hosted Git service. Prior to 0.14.3, a Server-Side Request Forgery (SSRF) vulnerability exists in the repository migration functionality. The application validates only the initially submitted URL hostname, but git clone --mirror follows HTTP redirects. An authenticated user can submit a public URL that redirects to a blocked internal endpoint (e.g., 127.0.0.1), importing the internal repository's contents into an attacker-controlled repository. This vulnerability is fixed in 0.14.3.
CVE-2026-52804 Média · 5.5 CWE-193 24/06/2026
Gogs: Privilege Escalation via Collaboration Access Mode Validation
Gogs is an open source self-hosted Git service. Prior to 0.14.3, a repository admin collaborator can escalate their privileges to owner-level access by exploiting an off-by-one error in the ChangeCollaborationAccessMode function. This vulnerability is fixed in 0.14.3.
CVE-2026-52802 Média · 5.4 CWE-601 24/06/2026
Gogs: Open Redirect via redirect_to in Gogs
Gogs is an open source self-hosted Git service. Prior to 0.14.3, an open redirect vulnerability exists in Gogs where attacker-controlled redirect_to parameters can bypass validation, allowing redirection to arbitrary external sites. All redirects in Gogs that are validated via the IsSameSite function are vulnerable. The function only inspects the first two characters of the URL string. This check fails to account for directory traversal sequences followed by backslashes. This vulnerability is fixed in 0.14.3.
CVE-2026-52801 Alta · 8.1 CWE-20 24/06/2026
Gogs: Ability to import local repositories via Mirror Settings
Gogs is an open source self-hosted Git service. Prior to 0.14.3, the Gogs Mirror Settings functionality provide an alternative way from the well protected New Migration functionality for any authenticated users to import local repositories. This issue stems from a lack of validation of SaveAddress function. This vulnerability is fixed in 0.14.3.
CVE-2026-52800 Alta · 8.8 CWE-352 24/06/2026
Gogs: CSRF Leading to Organization Owner Takeover
Gogs is an open source self-hosted Git service. Prior to 0.14.3, organization team member management can be performed via GET requests without CSRF protection. If a victim who is an organization owner is logged in and is tricked into visiting a crafted link, an attacker-controlled user can be added to the Owners team. As a result, the attacker gains organization owner–equivalent privileges. This vulnerability is fixed in 0.14.3.
CVE-2026-52799 Alta · 7.5 CWE-639 24/06/2026
Gogs: Missing Authorization in Attachment Download
Gogs is an open source self-hosted Git service. Prior to 0.14.3, GET /attachments/:uuid returns the raw attachment file without verifying whether the requester has view permission for the associated Issue/Comment/Release or the repository. In a test environment with REQUIRE_SIGNIN_VIEW = false, we confirmed that an unauthenticated user can download attachments belonging to a private repository. This vulnerability is fixed in 0.14.3.
CVE-2026-52798 Alta · 8.9 CWE-79 24/06/2026
Gogs: Stored XSS in `.ipynb` Preview
Gogs is an open source self-hosted Git service. Prior to 0.14.3, although .ipynb previews are sanitized on the server side via /-/api/sanitize_ipynb, the inserted content is re-rendered on the client side without sanitization using marked() on elements with the .nb-markdown-cell class. During this process, links containing schemes such as javascript: can be regenerated. As a result, when a victim views an attacker-crafted .ipynb file and clicks the link, arbitrary JavaScript is executed in the Gogs origin, leading to a click-based Stored XSS. This vulnerability is fixed in 0.14.3.
CVE-2026-52797 Alta · 8.5 CWE-22 24/06/2026
Gogs: Overwriting critical files results in a denial of service
Gogs is an open source self-hosted Git service. Prior to 0.14.0, as an authorized user, an intruder can dictate the value which is passed to the git diff command which, together with bypassing the filtering of the passed value, allows the user to bypass the target directory and write the result of the comparison to any arbitrary path. This vulnerability is fixed in 0.14.0.
CVE-2026-52796 Baixa · 3.5 CWE-1336 24/06/2026
Gogs: DoS in rendering issue index pattern
Gogs is an open source self-hosted Git service. Prior to 0.14.3, specially crafted issue index pattern can cause a panic when rendering, resulting in denial of service. In internal/markup/markup.go, RenderIssueIndexPattern renders the issue index pattern to a link using com.Expand, which is not safe: when the configured pattern contains an opening brace { but no closing brace }, strings.Index(template, "}") returns -1 and the subsequent slice template[:-1] triggers a panic. Once such a pattern is set, any page in the affected repository that contains an issue index reference such as #1 becomes unavailable. This vulnerability is fixed in 0.14.3.
CVE-2026-52795 Média · 4.3 CWE-863 24/06/2026
Gogs: Authorization Bypass in Watch API allows any user to monitor private repository activity
Gogs is an open source self-hosted Git service. In 0.14.3 and earlier, any authenticated user can watch a private repository they have no access to, because the access check in the Watch API handler is inverted. The code checks if repoCtx.ViewerCanRead() (returns 404 when the user CAN read) instead of if !repoCtx.ViewerCanRead() (return 404 when the user CANNOT read). Once watching, the attacker's dashboard activity feed shows commit messages, branch names, issue titles, and PR details from the private repository. If email notifications are enabled, the attacker also receives emails containing issue and comment content.
CVE-2026-47267 Alta · 8.3 CWE-918 24/06/2026
Gogs: SSRF in webhook deliveries
Gogs is an open source self-hosted Git service. Prior to 0.14.3, the fix for CVE-2022-1285 prevents adding webooks or running webhooks with URLs with a hostname that resolves in localCIDRs. However, webhooks still follow redirects allowing to access hostname inside localCIDRs. This vulnerability is fixed in 0.14.3.
CVE-2026-25119 Alta · 7.7 CWE-290 24/06/2026
Gogs: Authentication Bypass via Unvalidated Reverse Proxy Headers
Gogs is an open source self-hosted Git service. Prior to 0.14.3, when ENABLE_REVERSE_PROXY_AUTHENTICATION is enabled, Gogs accepts the configured authentication header (default: X-WEBAUTH-USER) directly from client requests without validating that the request originated from a trusted reverse proxy. Any remote attacker who can reach the Gogs service can forge this header to impersonate any user or trigger automatic account creation, completely bypassing authentication. This vulnerability is fixed in 0.14.3.
CVE-2025-64719 Média · 4.9 CWE-20 24/06/2026
Gogs: Denial of Service in repository/wiki file listing web pages
Gogs is an open source self-hosted Git service. Prior to 0.14.3, a malicious user with rights to create a new file on a repository or wiki page can trigger a denial of service condition in which the pages containing the listing of files will return HTTP error 500 and render the web interface unusable for the repository or wiki. The issue is present in file internal/route/repo/wiki.go and internal/route/repo/view.go where the pages try to recover commit information. If errors are returned while recovering commit information, the page will return a 500 error and stop rendering, resulting in a denial of service. This vulnerability is fixed in 0.14.3.