More Info:

If your RDS instance and it’s security group allows access to everyone by setting 0.0.0.0/0, then it invites malicious users to target your database and make your security posture more vulnerable.

Risk Level

Medium

Address

Security

Compliance Standards

PCIDSS, NIST

Triage and Remediation

Remediation

To remediate the misconfiguration of allowing unrestricted inbound/outbound access to an AWS RDS instance, you can follow these steps using the AWS Management Console:

  1. Login to AWS Console: Go to the AWS Management Console (https://aws.amazon.com/console/) and log in with your credentials.

  2. Navigate to RDS Service: Click on the “Services” dropdown menu at the top left corner and select “RDS” under the Database category.

  3. Select the RDS Instance: In the RDS dashboard, select the RDS instance that you want to remediate from the list of instances.

  4. Modify Security Group: In the RDS instance details page, scroll down to the “Security group rules” section and click on the security group name listed there.

  5. Edit Inbound Rules: In the Security Group dashboard, click on the “Inbound rules” tab to view the inbound rules that are currently configured for the security group.

  6. Edit Outbound Rules: Similarly, click on the “Outbound rules” tab to view the outbound rules that are currently configured for the security group.

  7. Update Security Group Rules:

    • To restrict inbound access, edit the inbound rules to allow access only from specific IP addresses or ranges that require access to the RDS instance. You can add a new rule by clicking on “Add Rule” and selecting the appropriate protocol, port range, and source IP address.
    • To restrict outbound access, edit the outbound rules to allow access only to specific IP addresses or ranges that the RDS instance needs to communicate with. You can add a new rule by clicking on “Add Rule” and selecting the appropriate protocol, port range, and destination IP address.
  8. Save Changes: Once you have updated the security group rules to restrict inbound and outbound access, click on the “Save rules” or “Apply changes” button to apply the changes to the security group.

  9. Verify Changes: Verify that the changes have been successfully applied by checking the inbound and outbound rules in the security group dashboard.

By following these steps, you can remediate the misconfiguration of allowing unrestricted inbound/outbound access to an AWS RDS instance and ensure that only authorized traffic can access the RDS instance.

Additional Reading: