Check ID:
Provider: Oracle Cloud (OCI)
Service:
Severity: HIGH
Categories:
Resource type:
network_security_group_ingress_from_internet_to_ssh_portProvider: Oracle Cloud (OCI)
Service:
networkSeverity: HIGH
Categories:
internet-exposedResource type:
NetworkSecurityGroupWhat this check verifies
Network security groups with ingress from0.0.0.0/0 exposing SSH are identified. This includes rules that explicitly permit TCP 22, use all protocols, or define TCP port ranges that encompass 22.
Risk
Public SSH access enables Internet-wide probing, brute force, and credential stuffing that can grant shell access. Compromise allows lateral movement, data exfiltration (confidentiality), unauthorized changes or malware (integrity), and service disruption or ransomware-driven lockouts (availability).Recommendation
Enforce least privilege: limit SSH in NSG rules to trusted CIDRs or private networks. Prefer bastion access (e.g., OCI Bastion) or VPN/private connectivity over direct Internet exposure. Use key-based auth, disablePasswordAuthentication, log and monitor access, and segment workloads for defense in depth.
Remediation
- CLI
- Terraform
- Dashboard steps
oci network nsg rules remove —nsg-id <nsg-ocid> —security-rule-ids ’[“<rule-ocid>”]’
References
- https://www.trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/oci/OCI-Networking/unrestricted-ssh-access-via-nsgs.html
- https://docs.oracle.com/en-us/iaas/Content/Network/Concepts/networksecuritygroups.htm
Where this check fires
This check runs on every scheduled scan against your Oracle Cloud (OCI) account. Findings appear at Cloud Security → Findings filterable byCheck ID = network_security_group_ingress_from_internet_to_ssh_port. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to Oracle Cloud (OCI) checks