← All Articles 🔒 Security Vulnerabilities Critical By Nishant Kumar Verma

Azure API Management Classic Vulnerability: What to Rotate

An Azure API Management Classic flaw (advisory MZK9-GH0) may have exposed stored secrets. What Microsoft and Norway's NSM say, and how to rotate each one.

SEC-014 GIT-002 GIT-012

Quick Answer

On 18 November 2026 Microsoft found a flaw in the Classic tiers of Azure API Management that an unauthorised party could have used to access secrets stored in the service. It closed the flaw the next day, according to a private customer advisory reported by BleepingComputer. Microsoft says named values, identity-provider client secrets, subscription keys and management API tokens may have been exposed, and that its fix does not automatically invalidate credentials that may already have been accessed. Norway's National Security Authority tells everyone using the service to assume their secrets are compromised, so rotate every stored credential at the system that issued it, then check your logs.

What Microsoft Told Customers in Advisory MZK9-GH0

According to BleepingComputer and Help Net Security, Microsoft's notice was an Azure Service Health security advisory, tracking ID MZK9-GH0, sent to customers through the Azure portal. We found no public Microsoft page about the issue, so everything below about that advisory comes from outlets that saw it.

According to BleepingComputer, Microsoft identified the vulnerability on 18 November 2026 and deployed a mitigation the following day. The advisory says "customers were exposed and an unauthorized party could have used the issue to access secrets" in Classic instances, before Microsoft found the problem.

Microsoft told BleepingComputer that four Classic tiers were affected: Developer, Basic, Standard and Premium. The Classic Consumption tier and all v2 tiers were not. It said five kinds of data may have been exposed:

  • secrets stored in named values,
  • client secrets for identity providers,
  • client secrets for OpenID Connect providers,
  • subscription keys,
  • tokens used to call the direct management APIs.

Microsoft says it closed the access path on 19 November and rotated keys it controls where appropriate. In the advisory's words, as BleepingComputer quotes them: "However, it does not automatically invalidate credentials that may have been accessed before the fix was deployed." Microsoft asks affected customers to rotate potentially exposed credentials immediately, look for suspicious activity in the systems those credentials open, and review their logs.

None of the reports quotes Microsoft on who the attacker is or how many customers were affected. CSO Online notes that neither Microsoft's advisory nor Norway's notice includes a CVE identifier.

What Norway's Security Authority Says

Norway's National Security Authority (NSM) published an advisory on 20 November (updated 23 November 2026), in Norwegian. The quotes below are our translation.

NSM says the vulnerability affects several Norwegian organisations, and that an unknown actor "has actively gone after access tokens, secrets and named values in APIM" (translated from Norwegian). It names Equinor and Skagerak Energi among the organisations hit, says the Norwegian energy sector discovered the flaw first, and says sectors in Norway and abroad are affected. How widespread the exploitation has been is still unclear, it adds.

Its advice is broader than Microsoft's:

  1. Assume compromise. Everyone with the service "must assume that their secrets and named values have gone astray" (translated from Norwegian), which means rotating all tokens and secrets.
  2. Map what sits behind each instance, so you can judge the possible scope if evidence of compromise turns up.
  3. Check that the instance is patched. Open https://<your-gateway-hostname>/internal-status-0123456789abcdef and read RuntimeVersion. These version numbers come from NSM's advisory: it says 0.52.x is patched when the last number is 31936 or higher and 0.53.x when it is 31938 or higher, that other patterns, such as 0.53.4608.0, mean a v2 or Consumption instance, which is not vulnerable, and that lower numbers are still vulnerable.
  4. Escalate. If the instance has not been updated, contact the supplier. If you see signs of compromise, contact NSM.

Where the sources differ

Scope. Microsoft's advisory, as Help Net Security quotes it, covers Classic instances when "the service was not configured according to documented security best practices". SecurityWeek reports the same limit. According to Help Net Security, the advisory describes those as instances without Microsoft's recommended network integration, or with secrets kept in API Management rather than Azure Key Vault. NSM makes no such distinction and addresses everyone with the service.

The patch. Microsoft told BleepingComputer the 19 November fix was fully deployed to Microsoft-hosted instances and needed no customer action. NSM still asks you to check the runtime version, and BleepingComputer says Microsoft did not explain why.

If You Use Azure API Management: What to Do Now

Microsoft's own public guidance is Rotating credentials in Azure API Management, posted on its Azure Integration Services blog on 21 November 2026. It does not mention the incident, but covers the same credential types with CLI and PowerShell examples, to be tested in a non-production instance first.

When the old and new credential can both stay valid for a while, the guide says to rotate in this order:

  1. Create the replacement at the issuer, such as the backend service or identity provider.
  2. Update API Management with the new secret.
  3. Test your APIs.
  4. Revoke the old secret.

The guide explains why in one line: "Updating the value in API Management doesn't revoke the old credential at its issuer."

Credential Portal location Rotate it at Microsoft's order
Subscription keysAPIs, then SubscriptionsAPI ManagementMove callers to the secondary key, regenerate the primary, switch back, regenerate the secondary
Named values holding secretsAPIs, then Named valuesThe service that issued the secretKey Vault-backed: update Key Vault, then refresh. Stored in API Management: replace the value
Backend credentialsAPIs, then Backends, then Authorization credentialsThe backend serviceStage the new one, update and test, then revoke the old one
OAuth 2.0 and OpenID Connect client secretsDeveloper portal, then OAuth 2.0 + OpenID ConnectThe identity provider. For Microsoft Entra ID: App registrations, your app, Certificates & secretsNew secret, update API Management, test with a fresh token, delete the old one
Event Hubs connection strings in loggersNot given in the guideThe Event Hubs namespace's shared access policiesSwitch the logger to the secondary key, confirm events arrive, renew the primary
Credentials written into policiesDesign, plus each product's PoliciesThe source systemMove it to a Key Vault-backed named value and test before revoking the old one
Legacy management access keysNot given in the guideAPI ManagementConfirm callers have switched off each key before regenerating it

Microsoft's list of exposed data, as BleepingComputer reports it, includes identity-provider client secrets, and the guide lists Developer portal sign-in providers under Developer portal, then Identities. Rotate those at the identity provider too.

For the CLI, select the subscription with az account set --subscription "{subscriptionId}" and use https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{rg}/providers/Microsoft.ApiManagement/service/{apimName} in place of {base}. These commands are from Microsoft's guide:

# List named values; the KeyVaultBacked column shows which ones point at Key Vault
az apim nv list --resource-group {rg} --service-name {apimName} \
  --query '[].{NamedValueId:name, Name:displayName, Secret:secret, KeyVaultBacked:!!(keyVault.secretIdentifier)}' \
  --output table

# Subscription keys: move callers off a key before you regenerate it
az rest --method post --url "{base}/subscriptions/{sid}/regeneratePrimaryKey?api-version=2024-05-01"
az rest --method post --url "{base}/subscriptions/{sid}/regenerateSecondaryKey?api-version=2024-05-01"

# Key Vault-backed named value: store the new secret in Key Vault first, then refresh
az rest --method post --url "{base}/namedValues/{namedValueId}/refreshSecret?api-version=2024-05-01"

# Secret stored in API Management itself: replace the value
az apim nv update --resource-group {rg} --service-name {apimName} --named-value-id {namedValueId} --value "{newValue}"

# Legacy management access keys
az rest --method post --url "{base}/tenant/access/regeneratePrimaryKey?api-version=2024-05-01"
az rest --method post --url "{base}/tenant/access/regenerateSecondaryKey?api-version=2024-05-01"

Then, as the guide advises, look for subscriptions, users, policies or backends you did not create. If the old direct management API is still switched on, Microsoft's retirement notice says to disable it. Support for it ended on 15 March 2025.

Store a Pointer, Not the Secret

Named values come in three types, per Microsoft Learn: Plain, Secret (encrypted by API Management) and Key vault (an identifier of a secret held in Azure Key Vault). Microsoft recommends Key Vault secrets, and secrets kept outside Key Vault are one of the exposure conditions Help Net Security reports.

// BAD: the real key sits in the template, in git and inside API Management
resource apim 'Microsoft.ApiManagement/service@2024-05-01' existing = {
  name: 'contoso-apim'
}

resource backendKey 'Microsoft.ApiManagement/service/namedValues@2024-05-01' = {
  parent: apim
  name: 'backend-api-key'
  properties: {
    displayName: 'backend-api-key'
    secret: false
    value: '<real backend key>'
  }
}

With secret: true the value is only encrypted inside API Management. It still lives in the service, and here in your repository too.

// GOOD: API Management keeps only a pointer, the secret stays in Key Vault
resource apim 'Microsoft.ApiManagement/service@2024-05-01' existing = {
  name: 'contoso-apim'
}

resource backendKey 'Microsoft.ApiManagement/service/namedValues@2024-05-01' = {
  parent: apim
  name: 'backend-api-key'
  properties: {
    displayName: 'backend-api-key'
    secret: true
    keyVault: {
      secretIdentifier: 'https://contoso-vault.vault.azure.net/secrets/backend-api-key'
    }
  }
}

The property names come from Microsoft's Bicep reference for named values, and secret: true with a keyVault block matches Microsoft's REST API sample. Without identityClientId, the instance's system-assigned identity is used. Use an identifier without a version, because Microsoft says a versioned one stops automatic refresh. Policies reference the value as {{backend-api-key}}.

The instance's managed identity needs permission to get and list the vault's secrets, for example through the Key Vault Secrets User role. Microsoft says a secret updated in Key Vault then reaches API Management within four hours, and you can also refresh it manually in the Azure portal or through the management REST API. That gives you one place to rotate each secret.

Key Vault is not a wall, though. Microsoft Learn warns that anyone allowed to edit policies can read any named value, Key Vault ones included, and that Key Vault values are visible to users with access to subscriptions enabled for request tracing. Keep policy editing and tracing to a short list of people.

How to Fix It on Any Platform

API Management is one case of a common pattern: a platform that holds the keys to everything behind it. You cannot patch its flaws yourself, but you can make the clean-up shorter.

  • Keep an inventory of secrets: what each one is, where it is stored, who issued it and where to revoke it. NSM's advice to map what sits behind each instance is the same idea.
  • Prefer identities over keys. Microsoft's guide says to use managed identities instead of keys and connection strings wherever supported. For backends, the authentication-managed-identity policy sends a Microsoft Entra ID token from the instance's identity instead of a stored key.
  • Give keys an expiry and rotate on a schedule. The guide recommends regular rotation, automated where possible, and its Entra ID PowerShell example gives each new client secret a one-year end date.
  • Scan your code for secrets. Infrastructure templates like the BAD example above are an easy way for a real key to end up in git, where it stays in the history after you delete the file.
# GOOD: find secrets in your files, then in your full git history
gitleaks dir .
gitleaks git .

A key removed from a template can still sit in old commits, so see our guide to secrets in git history. For another platform breach where every stored secret had to be replaced, see what leaked in the Zeabur breach.

Tools like VibeDoctor's Vibe Check (vibedoctor.io) automatically scan your codebase with Gitleaks and their own secret checks, and flag each secret's type with specific file paths and line numbers. Free to sign up.

FAQ

Which Azure API Management tiers are affected?

Microsoft told BleepingComputer the Developer, Basic, Standard and Premium tiers of API Management Classic were affected, and that the Classic Consumption tier and all v2 tiers were not.

Microsoft fixed the flaw. Do I still need to rotate my secrets?

Yes. Microsoft's advisory, as BleepingComputer quotes it, says the fix does not automatically invalidate credentials accessed before it was deployed, and NSM tells everyone with the service to rotate all tokens and secrets.

Where can I read Microsoft's advisory?

According to BleepingComputer and Help Net Security, Microsoft sent it through Azure Service Health in the Azure portal (tracking ID MZK9-GH0). We found no public Microsoft page for it. Its public rotation steps are in the 21 November Azure Integration Services blog post.

Is this the same as CVE-2026-35425?

No. CVE-2026-35425 is a separate API Management flaw that Microsoft published on 23 July 2026, marked as not exploited, with no action for users to take. CSO Online reports that neither Microsoft's advisory nor NSM's notice includes a CVE identifier for the November issue.

Does moving secrets to Key Vault make them safe?

It helps: Microsoft recommends it, and you rotate in one place. But Microsoft Learn warns that anyone who can edit policies can read any named value, Key Vault ones included, so limit who has that permission.

Diagnose your codebase - free

VibeDoctor checks for SEC-014, GIT-002, GIT-012 and 148 other issues across 21 diagnostic areas - security, performance, code quality, and more.

SCAN MY APP →