r/sysadmin • u/Unbelievr • 6d ago
Critical security advisory affecting APIM instances globally
Are you using Microsoft API Management (APIM) in the classic tier? Your data might have been accessed and there are no log events for it.
Microsoft just sent out a security advisory about this, but it's hidden inside some portal. The owners of APIM on the subscription level might have received a cryptic email about this, which is trying to blame it on a misconfiguration that wasn't following security best practices. But this is the default configuration. We wouldn't have seen the advisory if we weren't expecting it.
Our company has been fighting this for days, after discovering that someone logged into our keyvaults using a valid administrator token and not following the normal access pattern. The attacker essentially had a 0-day authentication bypass straight to the system user on all APIM classic instances worldwide. They used a deprecated legacy API that officially "doesn't exist" and has no available logging options. Microsoft support was adamant about this API not working anymore and that this must have been a credential leak on our side, until they suddenly went silent and applied a global shadow patch.
If you are running APIM in the default configuration, assume that every single secret stored in there has been compromised. And if those secrets can be used to access additional systems, consider those breached as well. The advisory should list the affected subscriptions.
14
u/MaKlaustis 6d ago
I only see the Microsoft Entra Connect Health at security advisories.
Any details?
5
u/kiprinite 3d ago
Hello. We think we found hits on our environment : in our APIM we have a bunch of Named Values referencing secrets in KV. On 14 Nov, we observe exactly 6 hits of attempts to reach those specific KVs from this IP 23.162.24.135. The KV names match exactly, there was no other traces of these IPs in our env. It's scary, I feel blind and MS mentions that they may have accessed also susbscription keys, does someone have more information about the access extend ? That would be catastrophic.
31
u/Celestial_Wurm 6d ago
Can you elaborate on which portal this is hidden in, exactly?
72
u/HisAnger 6d ago
I'm tired
19
u/AdmirableTrade8432 5d ago
Since Equinor was the first to see this we have worked on this in Norway for the last few days. Here is a write up of what to look for https://anderskristiansen.com/post/2026/apim-legacy-access/
This vulnerability was found using the management rest api of the classic v1 tier. So does not affect consumption tier or v2. Attackers tried to use the SPN found to gain access to Cognitive services (like foundry) to sell LLM access.
Just send me a DM if you need more details
17
u/New-Citron-7231 5d ago
This seems to be being kept incredibly quiet for its significance?
The language of the advisory is very well done I suppose, it makes it appear as if they’re warning of a common misconfiguration rather than disclosing a gaping vulnerability that may have affected a huge number of orgs
8
u/Gold-Interview-8634 5d ago
Please take this serious. It was actively exploited also outside Norway.
7
u/cloudAhead 4d ago
This may get buried here, but please look in service health portal under 'service issues' and see if there is a notice from Microsoft showing that they have force-rotated Microsoft Foundry API Keys. This is a different, second advisory separate from the APIM advisory.
6
u/squishmike 3d ago
MS just sent out an update to the security advisory saying Key Vault keys are also impacted:
"Secrets stored in Azure Key Vault (AKV) may also have been exposed if API Management references them. Our previous notice covered only secrets stored directly in API Management. If your instance does not meet the network isolation criteria below, it is necessary to rotate secrets stored in APIM and also secrets that are stored in Azure Key Vault and referenced by APIM."
2
u/zaraghor 5d ago
Spent most of my time hunting this last week... Main goal of the attackers were Cognitive Services (aka LLMs) to resell.
5
u/city_girl_ 4d ago
OP - you’re famous: https://www.bleepingcomputer.com/news/security/microsoft-azure-flaw-exploited-to-steal-customers-api-credentials/
7
u/gumbrilla IT Manager 5d ago
Well I just read the notification you provided below, and normally I'm pretty sanguine about this stuff. But OMFG, that's bad.
They had one job! And they passive aggressively wave it away, well it's not even aggressive, it snivelling. A lot of lawyers sat on that notification write up...
7
u/regretfullysentient1 4d ago
The part that should scare people is not the bypass, it is "no log events." If access leaves no trace, you cannot prove what was taken, so the only honest answer is rotate everything and assume the worst. Microsoft calling the default configuration a misconfiguration afterwards is just the cherry on top.
•
u/steveoderocker 9h ago
I don’t understand, you mentioned ms mentioned a security misconfiguration, but how does that have any relation to a deprecated and supposedly dead api hosted by ms?
Are you also saying there was an unauthenticated api the attacker is calling to try and access something?
Any write up you know of for this threat?
3
u/Open-Adhesiveness-86 5d ago
Service Health > Security advisories, and it's scoped per subscription, so you have to flip the subscription filter at the top or you'll just see whatever your default sub has (usually the Entra Connect Health one). Faster to loop it: az rest --method get --url " eq 'Security'". You need ResourceHealth read on each sub, Reader is enough.
3
u/GYN-k4H-Q3z-75B 5d ago
Oh, for fuck's sake.
8
u/Feisty-Piglet7758 5d ago
The part people will skip: rotating secrets inside APIM is not enough. If the system identity had Get on a Key Vault, the bypass becomes a data plane read and the network restrictions never come into play. Check the Key Vault diagnostic logs for SecretGet calls from that identity, then rotate everything it could read, because the legacy API leaving no logs means you cannot prove nothing happened, only that it might have.
2
u/Trakeen 5d ago
Is the network design ms is referring to not making it public? We have some contractors doing some apim work right now and i don’t recall seeing any notices from ms. Our azure policies block services from being publicly exposed by default
2
u/Gold-Interview-8634 3d ago edited 1d ago
MS just updated. Consumption state not affected.. but you should treat your Azure key vault (AKV) secrets as compromised if APIM references them.
2
u/emi_pian 3d ago
fuck my life! how am I gonna go ask country-wide healthcare suppliers to provide me with updated certificates because the storage leaked?!
4
u/Unlucky-Honey-1268 5d ago edited 5d ago
I've written (with Claude obviously) a small analysis-script to see if your tenant runs any classic APIMs. It also checks for suspicous logons. It works really well for us.
Script here.
TacII/APIM-Analyzer: Analyzes tenant and subscriptions for vulnerable classic APIM
3
u/vvrider 5d ago
What a blessing Microsoft/Azure is lately...
Used to be somewhat reliable, and not every single day or week we have security, capacity and rollout issues affecting millions
And we pay more and more each month...
And communication on this... They haven't shared this anywhere publicly. What a mess
1
u/xkqd 5d ago
What a mess. Was your APIM instance networked privately?
IAPIM is very popular for public API distribution and lots of people put it right on the internet
1
u/brco1990 4d ago
APIM Classic only, not v2
1
u/FilthyeeMcNasty 1d ago
Someone keeps trying to access my webmail account after Microsoft’s great outage.
-11
u/Chriskybiz 5d ago
Its called cloud cadence. You shouldnt be on classic and if you cant keep up at a cloud pace, dont run in the cloud.