Dgraph Unauthenticated Database Overwrite (CVE-2026-349
CVE-2026-34976
Dgraph is an open source distributed GraphQL database. Prior to 25.3.1, the restoreTenant admin mutation is missing from the authorization middleware config (admin.go), making it completely unauthenti...
Overview
A critical security flaw in the open-source Dgraph database allows unauthenticated attackers to completely compromise the system. The vulnerability, tracked as CVE-2026-34976, stems from a missing authorization check for the restoreTenant admin mutation. This function was omitted from the security middleware configuration, leaving it completely open to any network request without any authentication.
Vulnerability Details
In Dgraph versions prior to 25.3.1, the restoreTenant administrative function executes with zero security checks. Unlike the similar restore mutation, which requires high-level “Guardian-of-Galaxy” authentication, restoreTenant bypasses all middleware. The mutation accepts attacker-controlled parameters, including backup source URLs, cloud storage credentials, and paths to encryption or credential files.
Impact
The impact of this vulnerability is severe and multifaceted. An unauthenticated remote attacker can:
- Overwrite the entire database by supplying a malicious backup source.
- Read sensitive server-side files by using the
file://protocol to access the local filesystem. - Perform Server-Side Request Forgery (SSRF) by forcing the server to make requests to internal network resources.
- Exfiltrate credentials provided for S3, MinIO, or Vault integrations.
With a CVSS score of 10.0, this flaw represents the highest severity risk, requiring no privileges or user interaction to exploit.
Remediation and Mitigation
The primary and immediate action is to upgrade Dgraph to version 25.3.1 or later, which contains the fix. This update adds the restoreTenant mutation to the authorization middleware.
If immediate upgrading is not possible, consider these temporary mitigation steps:
- Network Segmentation: Restrict network access to Dgraph’s administrative HTTP/GraphQL ports (typically 8080) to only trusted management networks. Do not expose these ports to the internet.
- Firewall Rules: Implement strict ingress firewall rules to block external access to the Dgraph service from untrusted networks.
- Monitor for Exploitation: Review server and Dgraph logs for unexpected calls to the
/adminendpoint orrestoreTenantmutation activity. For more on attack patterns, recent breach reports can provide context.
Security Insight
This vulnerability highlights the critical risk of “missing middleware” bugs in API-driven systems, where a single configuration oversight can bypass an entire security model. It mirrors past incidents in other platforms where backup/restore functions were left unguarded, becoming a primary attack vector. The flaw underscores that in complex distributed systems, automated security coverage checks for all administrative endpoints are not just beneficial but essential.
Further Reading
Never miss a critical vulnerability
Get real-time security alerts delivered to your preferred platform.
Related Advisories
Gogs is an open source self-hosted Git service. Versions 0.13.4 and below expose unauthenticated file upload endpoints by default. When the global RequireSigninView setting is disabled (default), any ...
The YayMail – WooCommerce Email Customizer plugin for WordPress is vulnerable to unauthorized modification of data that can lead to privilege escalation due to a missing capability check on the `yayma...
The Vertex Addons for Elementor plugin for WordPress is vulnerable to Missing Authorization in all versions up to and including 1.6.4. This is due to improper authorization enforcement in the activate...
act is a project which allows for local running of github actions. Prior to version 0.2.86, act's built in actions/cache server listens to connections on all interfaces and allows anyone who can conne...