Skip to main content

Lack of protection against deletion - DynamoDB

Description

The current configuration has no protection against deletion (recovery points in time). The deletion of DynamoDB instances deletes the information without the possibility of recovery.

Impact

Delete a DynamoDB instance by mistake or without having to go through additional validations.

Recommendation

Securely configure the Amazon Web Services service, enabling protection against accidental deletion with recovery points in time.

Threat

Internet attacker with access to the AWS console.

Expected Remediation Time

⌚ 30 minutes.

Score

Default score using CVSS 3.1. It may change depending on the context of the vulnerability.

Base

  • Attack vector: N
  • Attack complexity: L
  • Privileges required: H
  • User interaction: N
  • Scope: U
  • Confidentiality: N
  • Integrity: N
  • Availability: H

Temporal

  • Exploit code madurity: X
  • Remediation level: O
  • Report confidence: X

Result

  • Vector string: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H/E:X/RL:O/RC:X
  • Score:
    • Base: 4.9
    • Temporal: 4.7
  • Severity:
    • Base: Medium
    • Temporal: Medium

Code Examples

Compliant code

The resource has correctly configured protection against deletion. The deletion_protection_enabled and point_in_time_recovery are both properly configured

resource "aws_dynamodb_table" "test-table" {
name = "example"

deletion_protection_enabled = true
point_in_time_recovery {
enabled = true
}

//Other service configuration settings not shown
}
Resources:
table1:
Type: AWS::DynamoDB::Table
Properties:
DeletionProtectionEnabled: true
PointInTimeRecoverySpecification:
PointInTimeRecoveryEnabled: true

Non compliant code

The resource does not have any protection against deletion or the deletion protection is missconfigured

resource "aws_dynamodb_table" "unsafe-table" {
name = "unsafe_Example"

deletion_protection_enabled = false
point_in_time_recovery {
enabled = false
}

//Other service configuration settings not shown
}
Resources:
table1:
Type: AWS::DynamoDB::Table
Properties:
DeletionProtectionEnabled: true
PointInTimeRecoverySpecification:
PointInTimeRecoveryEnabled: false

Requirements

free trial

Search for vulnerabilities in your apps for free with our automated security testing! Start your 21-day free trial and discover the benefits of our Continuous Hacking Machine Plan. If you prefer a full service that includes the expertise of our ethical hackers, don't hesitate to contact us for our Continuous Hacking Squad Plan.