[QUERY] BlobContainerClient is not restricted to a specific container #48284
Labels
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Service Attention
Workflow: This issue is responsible by Azure service team.
Storage
Storage Service (Queues, Blobs, Files)
Library name and version
Azure.Storage.Blobs 12.23.0
Query/Question
For blob client / blob container client, there is no validation to not leave the original container, e.g. in the following example
result
will be filled with the actual content of the file, even though the blob is in another container.Is it a deliberate choice in design to not validate whether the blob path is contained within the original container? From naming and the fact that a container name was provided in construction, one might think that the client cannot access anything outside the provided container.
In the current situation, it's pretty easy to forget to validate the path and thus become vulnerable to https://cwe.mitre.org/data/definitions/22.html
Providing such a validation library-side would be nice IMO.
Environment
No response
The text was updated successfully, but these errors were encountered: