Skip to content

Microsoft: CBC Padding Oracle in Azure Blob Storage Encryption Library

Moderate severity GitHub Reviewed Published Jul 13, 2022 to the GitHub Advisory Database • Updated May 23, 2024

Package

nuget Azure.Storage.Blobs (NuGet)

Affected versions

< 12.13.0

Patched versions

12.13.0
nuget Azure.Storage.Queues (NuGet)
< 12.11.0
12.11.0
pip azure-storage-blob (pip)
< 12.13.0
12.13.0
pip azure-storage-queue (pip)
< 12.4.0
12.4.0
maven com.azure:azure-storage-blob (Maven)
< 12.18.0
12.18.0

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

References

Published by the National Vulnerability Database Jul 12, 2022
Published to the GitHub Advisory Database Jul 13, 2022
Reviewed Jul 21, 2022
Last updated May 23, 2024

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
High
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N

EPSS score

0.043%
(11th percentile)

Weaknesses

CVE ID

CVE-2022-30187

GHSA ID

GHSA-64x4-9hc6-r2h6

Source code

No known source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.