Azure API Management's exploited flaw is now on CISA KEV, so rotate the secrets your classic instance holds
Microsoft says CVE-2026-139934 in classic Azure API Management has been exploited, and CISA added it to its KEV list on December 4. The service is fixed, but secrets an attacker copied stay valid until you rotate them, so rotate and check what they open.
part 74 of 77 · Platform releases, explained from scratchthe ideaMicrosoft fixed the APIM bug. Copied secrets work until rotated.
after reading, you can- Find out whether your classic APIM instance was exposed, and who can actually see the notice
- Rotate APIM secrets in the right order so the old ones are really revoked
- Check the systems behind APIM for logins that used the copied secrets
CVE-2026-139934 is a flaw in classic Azure API ManagementdefinitionMicrosoft's gateway for APIs. Your apps call it, it checks who they are and passes the call on to the real system, using credentials it keeps. that let someone with no login run admin operations, secrets management included. Microsoft says attackers used it, and CISA added it to its KEV list on December 4. Microsoft fixed the service on November 19, so there's nothing to install. Copied secrets still work until you rotate them. If you run a classic Developer, Basic, Standard or Premium instance, check Service Health for tracking ID MZK9-GH0 today and rotate what it tells you to.
An attacker with no account could do admin work on an exposed instance, and its secrets may already be copied
Azure API Management (APIM) is the front door many companies put in front of their APIs. Apps call APIM, and APIM calls the real systems behind it, so it keeps the passwords, keys and tokens for those systems. Microsoft says a bug in the classic tiers could let an attacker with no account send crafted requests and do admin work on an instance, secrets management included, and that the bug has been exploited. CISA has put it on its exploited list too. Microsoft fixed the service itself, so there's nothing for you to install. The catch is that a fix doesn't change a password someone already copied. That part is yours: rotate the secrets APIM holds and the Key Vault secrets it points to, then check what those secrets open.
Picture an office building whose front desk keeps a key cabinet for every floor. The landlord found that anyone could walk behind the desk and open the cabinet, and has now fixed the desk. Any key copied before that fix still opens its door, so you have to change the locks yourself.
- Teams running APIM classic tiers
- Owners of APIs published through APIM
- Cloud and platform engineers on Azure
- Identity teams that own app secrets
- Security teams handling Azure incidents
If Microsoft has fixed the service, what's still left on your plate?
An APIM instance usually sits on top of the credentials for everything behind it. Backend API keys, client secrets for OAuth apps, connection strings for logging and subscription keys that partners use all tend to live in it or in a Key Vault it reads. If an attacker could do secrets management as an admin, any of those can be in someone else's hands now.
Microsoft published the CVE on December 3, about two weeks after it fixed the platform and sent the first Service HealthdefinitionWhere Azure tells you about problems with your services. For security notices, only people with certain roles see the details and which of your resources were hit. notice. So the quiet part of this incident has already happened. Some teams likely rotated in November. Others may not have seen the notice at all.
CISA added CVE-2026-139934 to its Known Exploited Vulnerabilities catalog on December 4 and gave federal civilian agencies until December 7. The required action fits a cloud service: follow Microsoft's instructions, or stop using the product if you can't. CISA's notes then spell out what a patch dashboard would miss. Rotate the affected credentials and secrets, and look for unexpected activity on whatever they open.
The entry is also marked for forensic triage under BOD 26-04, CISA's directive on when agencies must check whether attackers got in before the fix. That directive only binds federal civilian agencies. Everyone else can still borrow the date. Three days is a tight window for a rotation that touches partners, so start with the secrets that open the most.
How does the attack work?
-
01 Find a classic instance
The attacker reaches a classic-tier APIM instance over the network. They don't need an account in your Azure tenant to start.
-
02 Send crafted requests
An authorization check in APIM got it wrong, so these requests are treated as allowed when they shouldn't be.
-
03 Act as an admin
Microsoft says the attacker could then do admin work on the service. Managing its secrets is one of the things it names.
-
04 Copy stored secrets
APIM holds named values, backend keys, OAuth client secrets and links to Key Vault secrets. Microsoft asks you to rotate all of these.
-
05 Use them elsewhere
Whoever holds those secrets can log in to the systems behind APIM. So Microsoft wants you checking those systems as well.
For engineers: Microsoft classes the bug as CWE-863, incorrect authorization, and scores it AV:N/AC:L/PR:N/UI:N with high impact on confidentiality, integrity and availability. It hasn't said which endpoint or operation was involved, and we won't guess. What matters for your response is the outcome Microsoft does name. Someone outside your tenant could manage secrets on the instance.
Key Vault is in scope for a simple reason. A Key Vault-backed named valuedefinitionA setting APIM keeps for its policies. Some are plain text, some are secrets APIM encrypts, and some just point at a secret in Key Vault. is a pointer, and APIM fetches the secret through its managed identitydefinitionAn identity Azure hands to a resource such as an APIM instance. It gets tokens for other services with it, so nobody has to keep a password around. and uses it. Microsoft tells exposed customers to rotate those too. It doesn't say why, but our reading is simple: an attacker acting as an APIM admin can reach what APIM can reach. Keeping the secret in Key Vault still helps, because rotating it is quick. It just doesn't keep it out of reach in this case.
What did Microsoft fix, and what's left for you?
Where things stand
Microsoft fixed the authorization problem inside the service. You've got nothing to download or install, so the CVE record lists no update.
Microsoft says its fix doesn't invalidate credentials that were exposed earlier. Anything stored in APIM, or in Key Vault and referenced by APIM, on an exposed instance needs rotating.
Microsoft points to the November 24 update of MZK9-GH0 for the criteria on whether an instance was exposed, and the first steps. It isn't public, so read it in your own tenant.
Microsoft says Basic v2, Standard v2, Premium v2 and Consumption aren't affected. Only the classic Developer, Basic, Standard and Premium tiers are.
Microsoft's Integration Services blog posted a guide on November 21 that walks through the main credential types APIM holds. It has Azure CLI and PowerShell examples for most of them, and it's what we followed for the commands below.
Here's what that leaves you with. The service is fixed, so nobody can use this bug against you today. Whether you're still exposed depends on what was in your instance before November 19 and whether it has changed since. If the notice says you were exposed and you haven't rotated, assume someone has the secrets.
| Your situation | Affected? | What's left to do |
|---|---|---|
| Classic Developer, Basic, Standard or Premium, notice says exposed, nothing rotated | Yes | Rotate everything in APIM and the Key Vault secrets it references, then investigate downstream |
| Classic tier, rotated after the November 21 or 24 notice | Yes, handled | No second rotation needed for those secrets. Still check downstream systems for odd activity |
| Classic tier, no MZK9-GH0 notice visible to you | Check | Make sure someone with the right Service Health role has looked before you decide you're clear |
| Basic v2, Standard v2 or Premium v2 | No | Nothing for this CVE. Good moment to tidy secrets anyway |
| Consumption | No | Nothing for this CVE |
How this unfolded
- Nov 19, 2026Microsoft fixes the service
The platform issue is remediated. Secrets copied before this stay valid until someone rotates them.
- Nov 21, 2026First Service Health notice
Subject line: "Important security information about Azure API Management Classic tiers". Tracking ID MZK9-GH0, which you'll need later.
- Nov 21, 2026Rotation guide posted
Someone on Microsoft's Integration Services blog writes up how to find and rotate the main kinds of credential APIM holds.
- Nov 24, 2026Updated notice
Same tracking ID, updated text. The CVE record sends customers to this one for the exposure criteria, so read it first.
- Dec 3, 2026CVE-2026-139934 published
Critical, 9.8, exploited, customer action required. If you missed both November notices, this is likely where you'd first see it.
- Dec 4, 2026NVD publishes the record
NVD posts the CVE with Microsoft's 9.8 score. Later that day it adds the CISA KEV dates to the record.
- Dec 4, 2026CISA adds it to KEV
Listed as Microsoft Azure API Management Incorrect Authorization Vulnerability. CISA's notes tell agencies to rotate affected credentials and secrets and look for unexpected activity, the same steps Microsoft gives.
- Dec 7, 2026KEV due date
The deadline for US federal civilian agencies. Other organizations aren't bound by it, but it's a fair target for your own rotation.
- New backend key pasted into the named value
- Old key never revoked at the backend
- Policies with hard-coded tokens not checked
- Event Hubs logger still on the old connection string
- Nobody looked at backend sign-ins
- New key created at the backend first, then put in APIM
- APIs tested, then the old key revoked at the issuer
- Policy XML searched for passwords and tokens
- Logger switched to the secondary key first, and only then the primary renewed
- Backend and Entra logs read back to before November 19
What should you do now?
What to do now, by who you are
- Ask your Azure team whether you run API Management on a classic tier and who read the MZK9-GH0 notices
- If you're a US federal civilian agency, note that CISA's KEV entry gives you until December 7
- If an outside provider runs your Azure, ask them in writing whether they rotated and when
- Put one named person in charge until every secret is rotated and checked. Otherwise it stalls halfway
- Ask the API owners which partners or customers hold subscription keys, since they'll need new ones
- List every APIM instance and its tier with Azure Resource Graph. Test and dev instances count too
- In Service Health, go to Security advisories, open MZK9-GH0 and read the Impacted resources tab
- On each exposed instance, write down the named values, backends, loggers, OAuth servers, identity providers and Credential Manager providers. That list is your rotation plan
- Search every policy, from global down to operation and product level, for hard-coded passwords and tokens. Those never show up as secrets anywhere else
- Rotate each secret at its issuer first, update APIM, test, then revoke the old one
- Find the Entra app registrations whose client secrets APIM uses for OAuth or the developer portal, and replace them
- Check those apps' sign-in logs for use from places you don't recognize
- Review the Key Vault secrets APIM's managed identity can read, and rotate the ones it references
- Look for subscriptions, users, policies or backends in APIM that nobody on your team created
- Treat a notice that says exposed and no rotation yet as a likely incident, not a patch task
- Treat December 7, CISA's KEV due date, as your own target for rotating exposed secrets, even though the directive behind it binds only federal civilian agencies
- Pull Activity log and ApiManagementGatewayLogs entries from before November 19 if you kept them
- Hunt in the backend systems those secrets open for logins and calls you can't explain
- Write down what you rotated and when. Auditors and your insurer will ask for it later
# 1. APIM instances you can see across subscriptions (first page of results only). Anything on Developer, Basic, Standard or Premium is classic. az graph query -q "resources | where type =~ 'microsoft.apimanagement/service' | project name, resourceGroup, subscriptionId, sku.name" # 2. Named values in one instance. Entries with a keyVault block point at Key Vault, the rest live in APIM. az apim nv list -g {rg} -n {apimName} -o jsonc # 3. Backends, loggers and OAuth servers. Set BASE to the instance's management.azure.com URL and V to the API version Microsoft's guide uses. Step 4 needs HV too, the version on the Service Health page. for r in backends loggers authorizationServers; do az rest -m get -u "$BASE/$r?api-version=$V"; done # 4. Instances Microsoft flagged for MZK9-GH0. EVENT is that event's path under your subscription's resourcehealth provider. If you aren't a Service Health Security Reader, Owner or Contributor, don't expect the list back. az rest -m POST -u "$EVENT/listSecurityAdvisoryImpactedResources?api-version=$HV" # Keep the output out of shared logs and tickets. If it holds a secret, that secret now has one more copy.
Two things trip teams up here. First, Service Health hides a security advisory's details and impacted-resource list behind specific roles: Service Health Security Reader, Owner or Contributor on the subscription, or Security Admin or Global Admin on the tenant. Without one of those roles, an engineer may well open Service Health, see nothing alarming and move on. Second, putting a new value in APIM doesn't revoke the old one. Microsoft's guide says so outright, and the old key keeps working at the backend until someone revokes it there.
How do you make the next one hurt less?
Before: the gateway holds the keys to everything
Secrets live as encrypted named values or hard-coded in policies. Key Vault references are pinned to a version, so rotation means editing APIM by hand, and nobody can say quickly which backends depend on which secret.
After: fewer stored secrets, faster rotation
APIM calls backends with its managed identity where they support it. What remains sits in Key Vault behind versionless references, so a rotation reaches APIM within hours, and Defender for APIs watches the traffic.
Durable fixes, tied to this case
- 01Swap keys for managed identity
Where a backend accepts Entra tokens, have APIM call it with its managed identity. Microsoft's guide lists this first among its best practices, and it leaves fewer stored secrets to steal. Microsoft also warns that anyone who can edit APIM policies can use that identity, so give it only the backend roles it needs.
- 02Move the rest into Key Vault
Store remaining secrets in Key Vault as named values. Use a secret identifier without a version, and APIM picks up a new value within four hours on its own, or straight away if you refresh it.
- 03Get secrets out of policy XML
A token pasted into a policy doesn't show up as a secret anywhere. Replace it with a Key Vault-backed named value referenced as {{display-name}}, so it's listed and rotatable.
- 04Give each secret an owner
Keep a list of every credential in APIM, the system that issued it and the person who can revoke it. Without that list, a rotation like this one turns into days of detective work.
- 05Fix who sees security notices
Give the people on call for Azure a role that can read security advisories in Service Health, and route those notices to a monitored mailbox or alert rule.
- 06Log to Log Analytics
Send APIM resource logs to Log Analytics in the resource-specific tables, and keep the Activity log. If something like this happens again, you'll want the evidence from before the vendor's fix date.
- 07Plan the v2 question
Microsoft has no automated migration from classic to v2, so moving means a new instance and a rebuild. Weigh it on features and support, not on this one CVE.
What if someone already got in?
If an exposed instance had secrets nobody rotated
Maybe the notice says exposed and the secrets predate November 19. Maybe you find config nobody on your team made. Either way, handle it as stolen credentials, since that's what Microsoft's advice is about.
- 01Containfirst day
- Rotate the highest-value secrets first: backend admin keys, database connection strings, OAuth client secrets
- Revoke each old credential at its issuer, not just in APIM
- Give partners new subscription keys, primary then secondary. Warn them before each switch so their calls don't start failing
- Regenerate legacy Direct Management API access keys if that API was ever turned on
- 02Preservebefore cleanup
- Export whatever Activity log, APIM resource logs and Key Vault logs you still have before they age out
- Save the policy XML and the lists of named values and backends as they stand now. You'll need them to spot what someone added
- Copy sign-in logs for the Entra apps and backends those secrets reach. Some of them roll over after a few weeks
- 03Investigatefirst week
- Look for subscriptions, users, policies or backends in APIM that your team didn't create
- Check each backend for calls with the old credentials from addresses you don't know
- Check which Key Vault secrets APIM's managed identity actually read, and ask why if your APIs never needed them
- 04Removeafter scoping
- Delete config the attacker added and restore policies from source control
- Remove client secrets left on Entra app registrations after rotation
- Move hard-coded secrets out of policies into Key Vault-backed named values
- 05Report and learnas required
- Ask counsel whether data reached through those backends triggers customer or regulator notice
- Call your cyber insurer early. Most policies set a deadline for telling them, and missing it can cost you cover
- Fix the Service Health roles and alerting so the next notice reaches someone who acts
What could this look like in practice?
Three typical setups
- the setup
- A retailer publishes order and inventory APIs to suppliers through a classic Standard instance. Backend keys sit in encrypted named values, and dozens of suppliers hold subscription keys.
- what happens
- The Service Health notice went to a subscription owner who left in the summer. Nobody rotated, so the backend keys from before November 19 still work.
- what to do
- Read MZK9-GH0 today, rotate backend keys at the source, then plan subscription key changes with suppliers, secondary key first so nobody's integration breaks.
- the setup
- A bank runs a classic Premium instance in a virtual network. Every secret is a Key Vault-backed named value, pinned to a specific version.
- what happens
- The team assumed Key Vault kept the secrets safe. Microsoft lists the referenced Key Vault secrets as in scope, and the pinned versions mean each rotation needs an APIM change too.
- what to do
- Rotate in Key Vault, repoint each pinned reference to the new version or go versionless, refresh the named values, then revoke the old secrets at the source.
- the setup
- A SaaS company rebuilt its gateway on Standard v2 last spring. An old classic Developer instance still runs for testing, with copies of production secrets.
- what happens
- The v2 instance isn't affected. The forgotten Developer instance is, and its secrets match production.
- what to do
- Find every classic instance, test ones included, rotate the production secrets that were copied there, and delete instances nobody needs.
How can Cohash help?
APIM is Microsoft's to fix, and it has. What's left is the identity work, finding each credential an API gateway holds and who issued it, rotating it without breaking a partner's integration, and replacing what we can with managed identities and Entra tokens. Our Microsoft Entra ID team does that work as part of our non-human identity practice. If you need people for it, see our Entra engineers, or start with a short assessment of which machine credentials could hand an attacker your backends.
What to take from this
- 01
Someone with no account could do admin work on a classic APIM instance, secrets included. Microsoft says attackers used the flaw, and CISA put it on KEV on December 4 with a December 7 federal due date.
- 02
Microsoft fixed the service on November 19. There's no patch to install, and secrets copied before that work until you rotate them.
- 03
Get someone with a Service Health security role to read the MZK9-GH0 notices. Microsoft put the exposure criteria there.
- 04
Rotate at the issuer, update APIM, test, then revoke the old secret. Changing it in APIM alone revokes nothing.
- 05
Include Key Vault secrets APIM references, policy XML, loggers and Entra client secrets, then check what those secrets open.
- 06
v2 and Consumption tiers aren't affected. Forgotten classic test instances are.
01Is there a patch for CVE-2026-139934?
No. Microsoft fixed the service itself on November 19, so there's nothing to download. Your part is rotating the secrets on any exposed instance and checking the systems they open.
02Was our API Management instance exposed, and where do we look?
Start in Service Health. Under Security advisories, find tracking ID MZK9-GH0. Microsoft points to the November 24 update for its exposure criteria, and the Impacted resources tab lists the instances it flagged. If you can't see anything, check your role first. You need something like Service Health Security Reader, Owner or Contributor.
03We run API Management. Which tiers does this flaw hit?
Only the classic tiers: Developer, Basic, Standard and Premium. Microsoft says Basic v2, Standard v2, Premium v2 and Consumption aren't affected. If you're on v2, check you don't also have an older classic instance running somewhere, a test one included.
04We already rotated secrets after the November notice. Do we rotate again?
No. Microsoft says credentials and secrets rotated after either Service Health notice don't need rotating again. Do still check the backends those secrets open for activity from before you rotated.
05Our secrets are in Key Vault. Are they safe?
Not for this one. Microsoft tells exposed customers to rotate the Key Vault secrets APIM references too. Key Vault does make the job faster, since a versionless reference picks up the new value within four hours.
06Is CVE-2026-139934 on the CISA KEV list?
Yes, since December 4. US federal civilian agencies have until December 7. CISA wants them to follow Microsoft's instructions, rotate the affected credentials and secrets and look for unexpected activity, or stop using the product if they can't. Nobody else is bound by that date, but it's a sensible one to aim for.
07Will rotating break our partners' integrations?
It can if you rush it. Move callers to the secondary subscription key, regenerate the primary, move them back, then regenerate the secondary. For backend secrets, create the new one at the source, update APIM and test before revoking the old one.
Three questions, about a minute
Pick an answer and we'll tell you if it's right, and why it is or isn't. The score stays in this browser.
-
Q1Your team pasted a new backend key into the APIM named value last week. What else has to happen?
show the answer
B. Revoke the old key at the backend that issued it Changing the value in APIM doesn't touch the issuer. The old key keeps working at the backend until someone revokes it there, so a copied key still opens the door.
-
Q2An engineer with Reader access found no MZK9-GH0 impacted resources in Service Health. What do you conclude?
show the answer
C. Get someone with a Service Health security role to look before you decide Impacted resources for security advisories show only to certain roles, such as Service Health Security Reader, Owner or Contributor. A Reader seeing nothing tells you little.
-
Q3Your classic Premium instance keeps every secret in Key Vault. If it was exposed, do those need rotating?
show the answer
A. Yes, rotate them too. Microsoft names the Key Vault secrets APIM points to Microsoft tells exposed customers to rotate the Key Vault secrets APIM references. Key Vault makes rotation quicker, but it doesn't take those secrets out of scope.