CVE-2026-13540 GitBucket SSRF Vulnerability: Authenticated Server-Side Request Forgery in Repository Clone
GitBucket versions up to 4.46.1 contain a server-side request forgery (SSRF) vulnerability in how they handle repository clone operations. An authenticated attacker can manipulate the URL argument passed to the repository creation function, causing the GitBucket server to make requests to unintended internal or external systems. The vulnerability requires valid login credentials to exploit but poses a meaningful risk to network confidentiality and integrity.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 6.3 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
- Weaknesses (CWE)
- CWE-918
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-06-29 / 2026-06-29
NVD description (verbatim)
A security flaw has been discovered in GitBucket up to 4.46.1. This affects the function Git.cloneRepository.setURI of the file src/main/scala/gitbucket/core/service/RepositoryCreationService.scala. Performing a manipulation of the argument url results in server-side request forgery. The attack is possible to be carried out remotely. The exploit has been released to the public and may be used for attacks. The patch is named 487a9b980f56aa73b6a044b1e86a92eed5043215. To fix this issue, it is recommended to deploy a patch.
8 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability exists in the Git.cloneRepository.setURI function within src/main/scala/gitbucket/core/service/RepositoryCreationService.scala. Insufficient input validation on the URL parameter allows an authenticated user to inject arbitrary URLs, triggering server-side HTTP requests under the server's network context. This is a classic SSRF vector (CWE-918) where attacker-supplied input flows directly into URL processing without adequate sanitization. The attack surface is network-accessible and does not require special conditions beyond valid authentication.
Business impact
An authenticated user within or with access to your GitBucket instance could probe internal network segments, access cloud metadata endpoints, or interact with services that trust the GitBucket server's IP address. In cloud deployments, this could expose AWS/Azure/GCP credentials. In on-premises environments, it may allow discovery and lateral movement toward internal infrastructure such as databases, monitoring systems, or CI/CD pipelines. The confidentiality and integrity impact is limited to what the server can reach; direct code execution is not possible through this flaw alone.
Affected systems
GitBucket 4.46.1 and earlier versions are affected. Organizations running any version up to and including 4.46.1 should evaluate their exposure immediately. Later versions or the patched commit (487a9b980f56aa73b6a044b1e86a92eed5043215) resolve this issue.
Exploitability
Public exploit code is available, lowering the bar for opportunistic attackers. However, exploitation requires valid authentication—a user or account with GitBucket login permissions. In environments where GitBucket is internet-facing or has high user turnover, this significantly increases risk. The attack is trivial to execute once credentials are obtained; no special timing, race conditions, or user interaction is required.
Remediation
Apply the patch identified by commit 487a9b980f56aa73b6a044b1e86a92eed5043215 or upgrade to a version confirmed to include this fix. Verify patch application against the official GitBucket release notes or repository. As an interim control, restrict network egress from the GitBucket server to only necessary destinations and consider tightening access controls to limit who can create repositories.
Patch guidance
Consult the official GitBucket repository and release notes to confirm the exact version tag or release that includes commit 487a9b980f56aa73b6a044b1e86a92eed5043215. Apply patching in a test environment first to verify compatibility with your configuration. If you are running a version significantly older than 4.46.1, test thoroughly before deploying to production, as intervening updates may carry additional changes. Consider scheduling patching during a maintenance window given the authentication requirement—exploitation risk is elevated but not zero-day critical.
Detection guidance
Monitor GitBucket logs for unusual repository clone operations, particularly those targeting internal IP ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 127.0.0.1) or cloud metadata endpoints (169.254.169.254). Network-based detection should capture HTTP requests originating from the GitBucket server to unexpected internal or external hosts. Log authentication events to identify compromised accounts or privilege escalation before exploitation. Search for repository creation or clone events immediately following suspicious login or user activity.
Why prioritize this
This vulnerability merits prompt attention despite CVSS 6.3 (MEDIUM) because public exploits are available and the attack surface spans any authenticated user. In multi-tenant or untrusted-user environments, the risk is elevated. However, it is not critical because exploitation requires valid credentials, limiting opportunistic automated attack. Prioritize patching if GitBucket is internet-facing or contains sensitive IP ranges in your internal network; deprioritize if it is internal-only with strict access controls.
Risk score, explained
CVSS 6.3 reflects the combination of network accessibility (AV:N), low attack complexity (AC:L), requirement for authentication (PR:L), and moderate impact on confidentiality, integrity, and availability. The score does not account for public exploit availability or the increased likelihood of abuse in cloud and hybrid environments. Your risk may be higher if you operate GitBucket in a segmented network with high-value internal services reachable from the GitBucket server.
Frequently asked questions
Do we need to patch immediately if our GitBucket is internal-only behind a corporate firewall?
Internal-only deployments with strict access controls are lower priority but should not be deferred indefinitely. The attack still requires valid credentials, so assess your user population and password hygiene. If GitBucket users have weak or shared passwords, or if lateral movement from GitBucket would expose critical systems, patch within your next scheduled maintenance window.
Can this vulnerability be exploited without a valid GitBucket account?
No. The vulnerability requires authentication (PR:L in the CVSS vector). An attacker must possess valid login credentials. If you have reason to believe user accounts are compromised, treat this as a higher urgency and patch immediately while investigating account security.
What internal systems are at greatest risk from this SSRF?
Cloud metadata endpoints (169.254.169.254) are high-priority targets in cloud environments, as are internal CI/CD systems, artifact repositories, databases listening on private IPs, and monitoring/logging infrastructure. Conduct an inventory of services reachable from your GitBucket server and evaluate their sensitivity before prioritizing the patch timeline.
Are there workarounds if we cannot patch immediately?
Implement network-based controls: restrict outbound traffic from GitBucket to only necessary external domains and block access to private IP ranges and metadata endpoints. Apply strong authentication policies, rotate GitBucket user credentials, and monitor repository creation activity closely. These are not permanent solutions and should not delay patching.
This analysis is provided for informational purposes and reflects the vulnerability details and CVSS score as published. Exploitation impact varies by deployment architecture, network segmentation, and GitBucket access controls. SEC.co makes no warranty regarding patch completeness, compatibility, or timing. Always test patches in non-production environments before deployment and verify against official vendor advisories. If you believe you are subject to active exploitation, engage your incident response team immediately. Source: NVD (public-domain), retrieved 2026-08-07. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2025-36324MEDIUMIBM watsonx.data Intelligence SSRF Vulnerability - Patch & Detection Guide
- CVE-2025-58175MEDIUMGeoServer SSRF Vulnerability in Proxy Configuration
- CVE-2026-0285MEDIUMPAN-OS Server-Side Request Forgery (SSRF) – Palo Alto Networks
- CVE-2026-10052MEDIUMQuay SSRF in LDAP/SMTP Validation—Internal Network Reconnaissance Risk
- CVE-2026-10177MEDIUMSSRF in Aider-AI Aider 0.86.3 AWS Metadata Endpoint
- CVE-2026-10239MEDIUMJeecgBoot Server-Side Request Forgery (SSRF) in Word Editing Module
- CVE-2026-10240MEDIUMJeecgBoot SSRF Vulnerability in /airag/airagModel/test Endpoint
- CVE-2026-10241MEDIUMJimuReport SSRF in File Download Function – Patch to 3.9.2