Lack of protection against deletion
Description
The system does not prevent critical objects from being deleted accidentally.
Impact
- Result in loss information in case of an accidental modification or deletion.
- Result in loss information in the case of a security incident.
Recommendation
Set up automatic backup on DynamoDB tables and enable protection against accidental deletion.
Threat
Attacker in any scenario that modifies or deletes information from databases.
Expected Remediation Time
⌚ 15 minutes.
Score
Default score using CVSS 3.1. It may change depending on the context of the vulnerability.
Base
- Attack vector: A
- Attack complexity: L
- Privileges required: L
- User interaction: R
- Scope: U
- Confidentiality: N
- Integrity: H
- Availability: H
Temporal
- Exploit code madurity: U
- Remediation level: O
- Report confidence: X
Result
- Vector string: CVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H/E:U/RL:O/RC:X
- Score:
- Base: 6.7
- Temporal: 5.8
- Severity:
- Base: Medium
- Temporal: Medium
Code Examples
Compliant code
Sensitive resources have protection against deletion and backup policies
resource "azurerm_key_vault" "not_vulnerable" {
name = "examplekeyvault"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
tenant_id = data.azurerm_client_config.current.tenant_id
soft_delete_retention_days = 7
soft_delete_enabled = true
purge_protection_enabled = true
}
Non compliant code
There is a resource configure without deletion prevention policies and safeguards
resource "azurerm_key_vault" "vulnerable" {
name = "examplekeyvault"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
tenant_id = data.azurerm_client_config.current.tenant_id
soft_delete_retention_days = 7
}
Requirements
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.