gcp-memorystore-no-auth-data-write

When AUTH is disabled (the GCP default), any in-VPC client (Identity, Compute, Container, KubernetesWorkload) with network reachability to port 6379/6380 gains full unauthenticated Redis data-plane write access (SET, DEL, FLUSHALL, CONFIG), enabling cache poisoning and supply-chain injection attacks.

derived gcp emits CanWriteData

match

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

{'principal': None} LocatedIn {'vpc': None} {'instance': None} LocatedIn {'vpc': None}

where

node_class(?principal) in [Identity, Compute] node_type(?instance) == Cache ?instance.authEnabled == false ?principal has network reachability to ?instance.host on port 6379 or 6380

emit

source typeIdentity
target typeCache
source?principal
target?instance
conditionsnetwork_reachability
state logicACTIVE when: both ?principal and ?instance are LocatedIn the same VPC, AUTH is disabled (authEnabled == false) on the instance, and VPC topology confirms port 6379/6380 reachability (no blocking firewall rule). CONDITIONAL(network_reachability) when VPC topology is unresolved. Do NOT emit if instance.authEnabled == true (use gcp-memorystore-auth-string- grants-data-write instead).

Narrative

{principal.name} is in VPC {vpc.name}, where {instance.name} is also located. AUTH is disabled on {instance.name}; any in-VPC client with network reach to port 6379/6380 can connect without credentials and write to all keys (SET, DEL, FLUSHALL, CONFIG, etc.), enabling cache poisoning attacks.

Raw rule rules/derived/gcp/memorystore.yaml

id: gcp-memorystore-no-auth-data-write
emits: CanWriteData
description: When AUTH is disabled (the GCP default), any in-VPC client (Identity, Compute, Container,
  KubernetesWorkload) with network reachability to port 6379/6380 gains full unauthenticated Redis data-plane
  write access (SET, DEL, FLUSHALL, CONFIG), enabling cache poisoning and supply-chain injection attacks.
match:
- - principal: null
  - LocatedIn
  - vpc: null
- - instance: null
  - LocatedIn
  - vpc: null
where:
- node_class(?principal) in [Identity, Compute]
- node_type(?instance) == Cache
- ?instance.authEnabled == false
- ?principal has network reachability to ?instance.host on port 6379 or 6380
emit:
  source_type: Identity
  target_type: Cache
  source: ?principal
  target: ?instance
  permissions: []
  conditions:
  - network_reachability
  state_logic: 'ACTIVE when: both ?principal and ?instance are LocatedIn the same VPC, AUTH is disabled
    (authEnabled == false) on the instance, and VPC topology confirms port 6379/6380 reachability (no
    blocking firewall rule). CONDITIONAL(network_reachability) when VPC topology is unresolved. Do NOT
    emit if instance.authEnabled == true (use gcp-memorystore-auth-string- grants-data-write instead).'
  confidence: min(contributing_confidences) * 0.9
  derived_from:
  - '<LocatedIn edge: principal -> vpc>'
  - '<LocatedIn edge: instance -> vpc>'
  - <instance.authEnabled == false>
  false_positive_note: 'Write access to Redis without AUTH enables cache poisoning: an attacker can inject
    malicious data (SET key value) that downstream applications trust and consume, leading to RCE, privilege
    escalation, or data corruption. Cite credential-chains.yaml for the ContainsSecret->CanImpersonate
    roll-up when poisoned cached credentials flow back to downstream identity consumption. When network
    reach is unresolved, emit CONDITIONAL(network_reachability).'
  narrative: '{principal.name} is in VPC {vpc.name}, where {instance.name} is also located. AUTH is disabled
    on {instance.name}; any in-VPC client with network reach to port 6379/6380 can connect without credentials
    and write to all keys (SET, DEL, FLUSHALL, CONFIG, etc.), enabling cache poisoning attacks.'
move · open · esc close