Exposed SSH Port on AI Gateway Leads to Cryptomining Compromise
Written by AI from the linked story. Not reviewed by an editor. How this works
An AI gateway (LiteLLM) connected to Amazon Bedrock was hijacked for Monero cryptomining after an SSH port was left exposed to the internet, allowing attackers to deploy XMRig malware. The root issue is a misconfigured, internet-facing service with insufficient access restrictions on a privileged component that had direct cloud infrastructure access. This matters because AI gateways often carry elevated permissions to cloud services like Bedrock, making them high-value targets — a single compromise can cascade into broader cloud account abuse, cost explosion, and data exposure. Organizations are rapidly deploying AI infrastructure without applying the same hardening rigor used for traditional systems, creating a growing and underappreciated attack surface.
Tactical Insight
Immediate actions
- Disable or firewall all non-essential ports (including SSH) on internet-facing AI gateway instances immediately.
- Audit existing cloud permissions granted to AI gateways and apply least-privilege IAM policies to limit blast radius.
Long-term improvements
- Replace direct SSH access with a bastion host or VPN-based access model so management interfaces are never publicly exposed.
- Enforce Infrastructure-as-Code (IaC) security scanning to catch exposed ports and overly permissive security groups before deployment.
- Treat AI gateway infrastructure with the same hardening standards as privileged cloud management systems.
Detection measures
- Deploy anomaly-based monitoring on cloud egress traffic to flag unexpected outbound connections to mining pools or unknown IPs.
- Implement host-based intrusion detection (e.g., Falco, Wazuh) on AI gateway instances to alert on suspicious process execution like XMRig.
- Set cloud cost and API usage alerts to detect abnormal Bedrock invocation spikes that may indicate compromise.