Unit 42 Discloses Universal Bucket Hijacking Flaw Affecting AWS, Google Cloud, and Azure

New Cloud Attack Vector: Universal Bucket Hijacking Technique Exposes Major CSPs to Data Exfiltration

HIGH
June 23, 2026
13m read
VulnerabilityCloud SecurityThreat Intelligence

Related Entities

Products & Tech

IAM Google Cloud Logging Pub/Sub Storage Transfer Service

Other

Yahav Festinger

Full Report

Executive Summary

Palo Alto Networks' Unit 42 has identified a critical architectural vulnerability, termed "bucket hijacking," that affects major cloud service providers (CSPs), including Amazon Web Services (AWS), Google Cloud (GCP), and Microsoft Azure. This technique exploits the global namespace system for storage buckets, where a bucket's name is a unique identifier across the entire platform. An attacker with permissions to delete a target bucket can intercept active data streams by deleting the original bucket and immediately recreating one with the identical name under an account they control.

This silent redirection of data, such as audit logs, application telemetry, and sensitive business information, poses a severe data exfiltration risk. The attack does not require modification of the data stream's configuration, bypassing typical permissions required for such changes. While Unit 42 has not observed this technique used by threat actors in the wild, its potential for stealthy, high-impact attacks is significant. Organizations are strongly advised to review and harden their Identity and Access Management (IAM) policies, specifically restricting bucket deletion permissions and implementing robust monitoring for such activities.


Vulnerability Details

The bucket hijacking vulnerability stems from a fundamental design choice in modern cloud infrastructure: the use of a global, shared namespace for storage bucket names. When a service, such as Google Cloud Logging or AWS CloudTrail, is configured to stream data to a storage bucket (e.g., an S3 bucket or GCS bucket), the destination is identified solely by its name.

The attack hinges on the separation of permissions between managing a data stream's configuration and managing the destination bucket itself. An attacker does not need permissions to alter the data stream (e.g., logging.sinks.update in GCP). Instead, they only need permissions to delete the target bucket.

The attack flow is as follows:

  1. Gain Initial Access: The attacker compromises a cloud environment and obtains IAM credentials with specific permissions.
  2. Acquire Permissions: The attacker secures the permissions required to delete the target bucket. In Google Cloud, this would be storage.objects.delete (to empty the bucket first) and storage.bucket.delete.
  3. Execute Hijack: The attacker deletes the legitimate bucket. Since the bucket name is now available in the global namespace, they immediately recreate a new bucket with the exact same name but within their own attacker-controlled cloud account.
  4. Intercept Data: The existing, unchanged data stream configuration automatically begins routing all new data to the attacker's bucket, believing it is the original destination. This results in the silent exfiltration of all data processed by the stream from that point forward.

This method is particularly insidious because the data stream service itself remains unaltered and may not generate any errors, leading to a prolonged and undetected data breach.


Affected Systems

The research from Unit 42 confirms this architectural flaw impacts multiple services across the three largest cloud providers. While the principle is universal, specific services tested and confirmed to be vulnerable include:

  • Google Cloud Platform (GCP):
    • Google Cloud Logging sinks
    • Pub/Sub subscriptions pushing to storage
    • Storage Transfer Service jobs
  • Amazon Web Services (AWS):
    • Services that stream data to S3 buckets (e.g., CloudTrail, VPC Flow Logs, ELB access logs).
  • Microsoft Azure:
    • Services that stream data to Azure Blob Storage containers.

Essentially, any cloud service that uses a bucket name as the sole identifier for a data stream destination is potentially vulnerable. The risk is not limited to logging services but extends to data pipelines, backup processes, and any automated data transfer mechanism.


Exploitation Status

As of the publication of the research on June 22, 2026, Unit 42 has not identified any instances of this bucket hijacking technique being used by threat actors in the wild. However, the disclosure of this method significantly increases the likelihood that it will be incorporated into the toolkits of cloud-focused threat actors. Its stealth and high potential for impact make it an attractive vector for espionage and data theft. The low barrier to entry—requiring only delete permissions rather than high-level administrative access—further elevates the risk.

Given the difficulty in detecting this attack post-facto, organizations should treat this as a high-priority, proactive mitigation scenario rather than waiting for evidence of active exploitation.


Impact Assessment

The business impact of a successful bucket hijacking attack is severe and multifaceted:

  • Data Exfiltration: The primary impact is the theft of sensitive information. This could include customer PII, financial records, intellectual property, application logs containing credentials or tokens, and critical infrastructure telemetry.
  • Compliance and Regulatory Violations: The exfiltration of regulated data (e.g., GDPR, HIPAA, PCI-DSS) can lead to massive fines, legal action, and reputational damage. The loss of audit logs can itself be a compliance failure.
  • Loss of Visibility: If the hijacked data stream consists of security logs (e.g., CloudTrail, VPC Flow Logs), the organization loses critical visibility into its own environment. This blinds security teams to other malicious activities, effectively creating a backdoor for the attacker to operate undetected.
  • Reconnaissance for Future Attacks: By intercepting logs and operational data, an attacker can gather detailed intelligence about the victim's infrastructure, applications, and user behavior to plan more sophisticated, targeted attacks.

Because the attack is silent and does not disrupt service availability, it can persist for long periods, leading to a catastrophic and continuous data breach.


IOCs — Directly from Articles

No Indicators of Compromise (IOCs) were provided in the source article, as this technique has not yet been observed in a real-world attack.


Cyber Observables — Hunting Hints

Security teams can proactively hunt for activity related to this technique. The following patterns could indicate preparatory or active bucket hijacking attempts:

Type
Log Event
Value
DeleteBucket (AWS), storage.buckets.delete (GCP), Microsoft.Storage/storageAccounts/blobServices/containers/delete (Azure)
Description
A bucket deletion event, especially for a bucket known to be a destination for critical data streams.
Type
Permission Change
Value
iam.policy.set (GCP), PutRolePolicy / AttachRolePolicy (AWS)
Description
Granting of bucket deletion permissions (storage.bucket.delete, s3:DeleteBucket) to users or roles that do not require them.
Type
Error Pattern
Value
Data stream or application errors indicating Destination not found followed by a sudden resolution.
Description
This could indicate the brief time window between the legitimate bucket's deletion and the attacker's recreation of it.
Type
Cross-Account Activity
Value
A data stream writing to a bucket now owned by a different Account ID or Project ID than the one that created the stream.
Description
This is the definitive indicator of a hijack. Auditing stream configurations against bucket ownership is key.

Detection & Response

Detecting this attack requires moving beyond simple error monitoring and focusing on the lifecycle of critical cloud resources. Effective detection and response strategies include:

  1. Audit Log Monitoring: Implement real-time monitoring and alerting on specific, high-risk API calls. Create high-severity alerts for the deletion of any bucket that is a known data sink. In GCP, this is the storage.buckets.delete event. In AWS, it's s3:DeleteBucket via CloudTrail. These alerts should trigger an immediate investigation.

  2. Permission Change Auditing: Monitor for any changes to IAM policies that grant storage.bucket.delete or s3:DeleteBucket permissions. Such changes should require a justification and approval process.

  3. Configuration Drift Detection: Regularly run automated checks to validate that the account/project ID of a destination bucket matches the account/project ID of the data stream source. Any mismatch is a red flag for a successful hijack. This can be achieved with custom scripts or a Cloud Security Posture Management (CSPM) tool.

  4. D3FEND Techniques for Detection:

    • Network Traffic Analysis (D3-NTA): While the stream configuration doesn't change, post-hijack data flows to a new, external endpoint. Monitoring network egress from the cloud service generating the data might reveal traffic to an unexpected attacker-owned account, although this can be difficult to distinguish.
    • File Analysis (D3-FA): In this context, analyzing cloud audit logs for the specific sequence of DeleteBucket followed by successful writes from the same data stream is the most effective detection method.

Response Plan: If a hijack is suspected, the immediate response should be to disable the data stream to stop the data leakage. Then, investigate the account that now owns the bucket and analyze audit logs to determine who deleted the original bucket and when. Finally, recreate the bucket under the correct account and re-enable the data stream after ensuring the compromising permissions have been revoked.


Mitigation

Mitigation focuses on proactive hardening and the principle of least privilege.

  1. Strict IAM Policies (M1026 - Privileged Account Management): This is the most critical mitigation. The permission to delete storage buckets (storage.bucket.delete, s3:DeleteBucket) is highly destructive and should be denied by default. Only grant it to a very small number of trusted administrative roles, and even then, require multi-factor authentication for its use. Avoid using wildcard permissions like storage.*.

  2. Use Resource Locks (M1054 - Software Configuration): All major CSPs provide mechanisms to prevent the accidental or malicious deletion of critical resources.

    • AWS: Enable Termination Protection on CloudFormation stacks that define S3 buckets. Use S3 Object Lock in compliance mode to make data immutable, which can also prevent bucket deletion under certain conditions.
    • Google Cloud: Apply a Bucket Lock to implement a retention policy, which prevents the deletion of the bucket until the lock is removed.
    • Azure: Use Resource Locks (CanNotDelete or ReadOnly) on the storage account or container to prevent deletion.
  3. Regular Audits (M1047 - Audit): Continuously audit and review all IAM roles and policies to ensure least privilege is maintained. Use automated tools to identify and alert on roles with excessive permissions, especially those related to resource deletion.

  4. Decouple Permissions: Ensure that roles responsible for day-to-day operations do not have permissions to delete shared infrastructure resources like data stream destination buckets. Separate duties between application/service owners and infrastructure administrators.

By combining these strategies, organizations can significantly reduce their exposure to this novel and dangerous attack vector.

Timeline of Events

1
June 23, 2026
This article was published

MITRE ATT&CK Mitigations

Strictly control and limit accounts with permissions to delete storage buckets. These permissions should be considered highly privileged.

Mapped D3FEND Techniques:

Audit

M1047enterprise

Enable and monitor cloud audit logs (CloudTrail, Azure Monitor, GCP Audit Logs) for bucket deletion events and permission changes.

Mapped D3FEND Techniques:

Utilize cloud-native resource protection mechanisms like AWS S3 Object Lock, GCP Bucket Lock, or Azure Resource Locks to prevent deletion of critical buckets.

Mapped D3FEND Techniques:

Enforce the principle of least privilege for all user and service accounts, ensuring they do not have bucket deletion rights unless absolutely necessary.

Mapped D3FEND Techniques:

D3FEND Defensive Countermeasures

To counter the bucket hijacking threat, organizations must apply robust configuration hardening to their cloud storage resources. This goes beyond IAM policies and involves using native cloud features to protect buckets from deletion. For any bucket acting as a destination for critical data streams (e.g., audit logs, backups, sensitive data), enable resource protection mechanisms immediately. In AWS, this means applying 'S3 Object Lock' or enabling 'Termination Protection' on the CloudFormation stack that manages the bucket. In Google Cloud, apply a 'Bucket Lock' to enforce a retention policy, which prevents the bucket from being deleted. In Microsoft Azure, place a 'CanNotDelete' or 'ReadOnly' 'Resource Lock' on the storage container. These locks act as a crucial safeguard, preventing even an account with delete permissions from removing the resource, thereby breaking the attack chain at its most critical step. This should be a day-one configuration for all critical infrastructure resources.

In the context of bucket hijacking, Domain Account Monitoring translates to vigilant monitoring of cloud-level IAM activity. Security teams must configure their SIEM or cloud monitoring solution (e.g., AWS CloudWatch, Google Cloud's operations suite) to generate high-severity alerts for two specific scenarios. First, any API call that attempts to delete a critical storage bucket (e.g., AWS DeleteBucket, GCP storage.buckets.delete). Second, any IAM policy change that grants these deletion permissions to a user or role (s3:DeleteBucket, storage.bucket.delete). These alerts should not be informational; they must trigger an immediate incident response playbook. The playbook should verify the legitimacy of the action and, if suspicious, automatically disable the account and revert the change. By treating these specific events as precursors to a major breach, organizations can detect and stop a hijacking attempt before data exfiltration begins.

The most fundamental defense against bucket hijacking is enforcing the principle of least privilege for user account permissions. The ability to delete a storage bucket is a highly destructive permission that should be denied by default to all users and service roles. Conduct a thorough audit of all IAM policies in your cloud environment to identify every principal that holds s3:DeleteBucket, storage.bucket.delete, or equivalent permissions. For each one, validate the business justification. In almost all cases, these permissions can be removed from daily operational roles and restricted to a small, break-glass administrative group that requires multi-factor authentication and an approval workflow to use. Avoid using wildcards in IAM policies (e.g., s3:* or storage.objects.*) as they often inadvertently grant deletion rights. By aggressively restricting these permissions, you remove the primary tool the attacker needs to initiate the hijack.

Sources & References

Article Author

Jason Gomes

Jason Gomes

• Cybersecurity Practitioner

Cybersecurity professional with over 10 years of specialized experience in security operations, threat intelligence, incident response, and security automation. Expertise spans SOAR/XSOAR orchestration, threat intelligence platforms, SIEM/UEBA analytics, and building cyber fusion centers. Background includes technical enablement, solution architecture for enterprise and government clients, and implementing security automation workflows across IR, TIP, and SOC use cases.

Threat Intelligence & AnalysisSecurity Orchestration (SOAR/XSOAR)Incident Response & Digital ForensicsSecurity Operations Center (SOC)SIEM & Security AnalyticsCyber Fusion & Threat SharingSecurity Automation & IntegrationManaged Detection & Response (MDR)

Tags

Cloud SecurityBucket HijackingData ExfiltrationAWSGoogle CloudAzureIAMNamespace RiskThreat Research

📢 Share This Article

Help others stay informed about cybersecurity threats

🎯 MITRE ATT&CK Mapped

Every tactic, technique, and sub-technique used in this threat has been identified and mapped to the MITRE ATT&CK framework for consistent, actionable threat language.

🧠 Enriched & Analyzed

Observables and indicators of compromise (IOCs) have been extracted and cataloged. Risk has been assessed and correlated with known threat actors and historical campaigns.

🛡️ Actionable Guidance

Detection rules, incident response steps, and D3FEND-aligned mitigation strategies are included so your team can act on this intelligence immediately.

🔗 STIX Visualizer

Structured threat data is packaged as a STIX 2.1 bundle and can be visualized as an interactive graph — relationships between actors, malware, techniques, and indicators.

Sigma Generator

Sigma detection rules are derived from the threat techniques in this article and can be converted for deployment across any major SIEM or EDR platform.