azure-storage-queue-data-writer

Storage Queue Data Contributor/Message Processor grants queue message write - enabling message poisoning of queues consumed by Functions/Logic Apps with SYSTEM identity.

derived azure emits CanWriteData

match

A conjunctive graph pattern. Variables (?x) bind node ids; every clause must hold.

{'principal': None} HasPermission {'queue': None}

where

node_class(?queue) == Messaging and node_type(?queue) == Queue node_type(?queue) matched provider_type == 'Microsoft.Storage/storageAccounts/queueServices/queues' ?principal has EFFECTIVE dataAction Microsoft.Storage/storageAccounts/queueServices/queues/messages/add at ?queue scope (Storage Queue Data Contributor 974c5e8b or Storage Queue Data Message Processor 8a0f0c08)

emit

source typeIdentity
target typeQueue
source?principal
target?queue
permissionsMicrosoft.Storage/storageAccounts/queueServices/queues/messages/add
conditionsiam_permission network_reachability
state logicif networkAcls.defaultAction == Deny AND no allowed path or PE: CONDITIONAL(network_reachability); elif deny assignment covers messages/add at effective scope: BLOCKED; else ACTIVE.

Narrative

{principal.name} can write messages to queue {queue.name} (Storage Queue Data Contributor or Message Processor), enabling injection of crafted messages that may trigger and poison downstream compute services (Functions, Logic Apps) consuming this queue.

Raw rule rules/derived/azure/storage.yaml

id: azure-storage-queue-data-writer
emits: CanWriteData
description: "Storage Queue Data Contributor/Message Processor grants queue message write \u2014 enabling\
  \ message poisoning of queues consumed by Functions/Logic Apps with SYSTEM identity."
match:
- - principal: null
  - HasPermission
  - queue: null
where:
- node_class(?queue) == Messaging and node_type(?queue) == Queue
- node_type(?queue) matched provider_type == 'Microsoft.Storage/storageAccounts/queueServices/queues'
- ?principal has EFFECTIVE dataAction Microsoft.Storage/storageAccounts/queueServices/queues/messages/add
  at ?queue scope (Storage Queue Data Contributor 974c5e8b or Storage Queue Data Message Processor 8a0f0c08)
emit:
  source_type: Identity
  target_type: Queue
  source: ?principal
  target: ?queue
  permissions:
  - Microsoft.Storage/storageAccounts/queueServices/queues/messages/add
  conditions:
  - iam_permission
  - network_reachability
  state_logic: 'if networkAcls.defaultAction == Deny AND no allowed path or PE: CONDITIONAL(network_reachability);
    elif deny assignment covers messages/add at effective scope: BLOCKED; else ACTIVE.'
  confidence: '0.86'
  derived_from:
  - rule_id: azure-storage-queue-write-permission
    binding: ?principal HasPermission ?queue
  false_positive_note: CanWriteData on a queue alone is not escalation; attack value is realized when
    the queue is a trigger source for downstream compute (Functions, Logic Apps, Data Factory, Databricks).
    Compute service rules derive CanModifyCode/CanExecuteAs from a CanWriteData-capable principal injecting
    crafted messages. Message poisoning is a documented attack path when the downstream consumer runs
    with elevated identity (e.g., SYSTEM role). This is distinct from queue read; message/add dataAction
    is the specific write capability. Network gate applies identically to queue read.
  narrative: '{principal.name} can write messages to queue {queue.name} (Storage Queue Data Contributor
    or Message Processor), enabling injection of crafted messages that may trigger and poison downstream
    compute services (Functions, Logic Apps) consuming this queue.'
move · open · esc close