CVE-2022-30187 — azure-storage-blob
MEDIUMCVE-2022-30187 is a medium-severity (CVSS 4.7) Broken Cryptographic Algorithm vulnerability in com.azure:azure-storage-blob. A fix is available for com.azure:azure-storage-blob — see the affected versions and patch details below.
Microsoft: CBC Padding Oracle in Azure Blob Storage Encryption Library
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for CVE-2022-30187.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
com.azure:azure-storage-blob.NETAzure.Storage.Queues.NETAzure.Storage.Blobs🐍azure-storage-queue🐍azure-storage-blobReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven, NuGet packages — download data is not available via public APIs for these ecosystems.
Description
Summary
The Azure Storage Encryption library in Java and other languages is vulnerable to a CBC Padding Oracle attack, similar to CVE-2020-8911. The library is not vulnerable to the equivalent of CVE-2020-8912, but only because it currently only supports AES-CBC as encryption mode.
Severity
Moderate - The vulnerability poses insider risks/privilege escalation risks, circumventing controls for stored data.
Further Analysis
The Java Azure Blob Storage Encryption SDK is impacted by an issue that can result in loss of confidentiality and message forgery. The attack requires write access to the container in question, and that the attacker has access to an endpoint that reveals decryption failures (without revealing the plaintext) and that when encrypting the CBC option was chosen as content cipher.
This advisory describes the plaintext revealing vulnerabilities in the Java Azure Blob Storage Encryption SDK, with a similar issue in the other blob storage SDKs being present as well.
In the current version of the Azure Blob Storage crypto SDK, the only algorithm option that allows users to encrypt files is to AES-CBC, without computing a MAC on the data.
This exposes a padding oracle vulnerability: If the attacker has write access to the blob container bucket and can observe whether or not an endpoint with access to the key can decrypt a file (without observing the file contents that the endpoint learns in the process), they can reconstruct the plaintext with (on average) 128*length(plaintext) queries to the endpoint, by exploiting CBC's ability to manipulate the bytes of the next block and PKCS5 padding errors.
Timeline
Date reported: March 29 2022 Date preview: June 16 2022 Date GA: July 11 2022 Date disclosed: July 17 2022
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | com.azure:azure-storage-blob | all versions | 12.18.0com.azure:azure-storage-blob:12.18.0 |
| .NETNuGet | Azure.Storage.Queues | all versions | 12.11.0dotnet add package Azure.Storage.Queues --version 12.11.0 |
| .NETNuGet | Azure.Storage.Blobs | all versions | 12.13.0dotnet add package Azure.Storage.Blobs --version 12.13.0 |
| 🐍PyPI | azure-storage-queue | all versions | 12.4.0pip install --upgrade 'azure-storage-queue==12.4.0' |
| 🐍PyPI | azure-storage-blob | all versions | 12.13.0pip install --upgrade 'azure-storage-blob==12.13.0' |
Affected Products
azure storage blobsmicrosoftazure storage queuemicrosoftDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for com.azure:azure-storage-blob, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update com.azure:azure-storage-blob to 12.18.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-30187 is resolved across your whole dependency graph.
Workarounds
Close the privilege gap rather than the entry point: audit which accounts, roles and service identities can reach the affected operation, drop the component to the least privilege it actually needs, and review file and directory permissions created by earlier installs — a default left in place is what makes this reachable.
Frequently Asked Questions
Is CVE-2022-30187 in your dependencies?
Find it across Maven, NuGet, PyPI, including transitive dependencies.